Re: [xml] RFE: Schema-validation API



On Tue, Oct 14, 2003 at 10:13:07AM +1000, Steve Ball wrote:
The WXS module in libxml2-2.5.11 provides an interface
to schema-validate an instance document, given the schema
document as either a URL or in a memory buffer.
However, in my project I already have the schema document
as a xmlDocPtr object (ie. it is already parsed as an XML document).
At the moment my code serializes the schema document into
a memory buffer and then passes that buffer to
xmlSchemaNewMemParserCtxt.  This routine then re-parses the
document.

Accordingly, my RFE is to have a new API that accepts the
schema document as an xmlDocPtr.  Something like:

xmlSchemaParserCtxtPtr xmlSchemaNewDocParserCtxt   (xmlDocPtr doc);

The code would be fairly straight-forward, in fact almost
trivial.  I can do the implementation and submit it as a
patch if desired.

  Yep, should be trivial to add this entry point, I take patches :)
Still I'm a bit scared that you use the Schemas implementation, I
suppose it all depends on the schemas you actually use, if simple
enough you may not hit any bug.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]