[xml] XML Schema Validation
- From: Kent Wilson <kenton wilson gmail com>
- To: xml gnome org
- Cc: kenton wilson gmail com
- Subject: [xml] XML Schema Validation
- Date: Thu, 6 Jan 2005 11:18:25 -0500
I have a question regarding the validation of XML schemas using libxml2.
It is my understanding (In looking at the mail archive and the available doc-
1. libxml2 provides no support for at all for validation (DTD or Relax-NG)
of XML schemas if you are using the SAX model and APIs.
2. libxml2 provides support for validation of DTDs if you are using a DOM
model and APIs.
3. libxml2 provides an "new" XmlTextReader interface which offers an altern-
ative to SAX for "stream" processing of XML and also provides full DTD
validation and partial or limited Relax-NG validation of the XML schema.
Is my understanding correct?
Concerning the XmlTextReader interface and validation:
1. What are the limitations or restrictions on performing Relax-NG validation.
I don't understand what the "...only subsets which cannot be..." comment
means (see http://xmlsoft.org/xmlreader.html#Validating).
2. If using the XmlTextReader interface for validation how much of the
XML schema has to be kept in memory to perform the validation? My
only concerng is that I don't defeat my original motiviation for using
a "streaming" approach (i.e. a XmlTextReader (SAX-like)) to begin with.
kenton wilson gmail com
] [Thread Prev