cxml and cxml-rng folks,
I see that I can use a validator like so (from the examples):
(cxml:parse-file "example.xml" (cxml-rng:make-validator (cxml-rng:parse-schema #p"example.rng") (cxml-dom:make-dom-builder)))
But is there any way I can validate an already parsed (in-memory) XML (preferably STP) document?
thanks,
Cyrus
Hi,
Quoting Cyrus Harmon (ch-lisp@bobobeach.com):
But is there any way I can validate an already parsed (in-memory) XML (preferably STP) document?
if (stp:serialize doc (cxml-rng:make-validator ...)) doesn't work, then it's either a bug, or I'm misremembering. :-)
Technically, of course, this serializes to SAX and then validates that; RNG doesn't know anything about STP specifically.
d.
Indeed, that does work. It returns nil on success, but I can live with that. Sorry I missed the obvious!
thanks,
Cyrus
On Feb 29, 2012, at 2:21 PM, David Lichteblau wrote:
Hi,
Quoting Cyrus Harmon (ch-lisp@bobobeach.com):
But is there any way I can validate an already parsed (in-memory) XML (preferably STP) document?
if (stp:serialize doc (cxml-rng:make-validator ...)) doesn't work, then it's either a bug, or I'm misremembering. :-)
Technically, of course, this serializes to SAX and then validates that; RNG doesn't know anything about STP specifically.
d.