[xsd-users] Enabling the Full Checking parameter on the Xerces
Parser
Boris Kolpackov
boris at codesynthesis.com
Thu Sep 10 03:13:29 EDT 2009
Hi Duncan,
Duncan Blair <duncan.blair at scu.edu.au> writes:
> I am trying to enable the fgXercesSchemaFullChecking option on the
> xerces parser. It appears that there is no way to enable it no matter
> what flags are passed. This results in (atleast) an unreported error
> being thrown if an element in the schema is missing a required attribute.
The full schema checking feature in Xerces-C++ enables the more
expensive error detection in the schema definition itself, as
opposed to the XML documents. Since the schemas that you use
for validation were presumably compiled with XSD (which has
the full checking enabled), there is normally no need to do
the same in the application. In other words, if you use the
same schemas for code generation and validation, then the
full checking has been performed during code generation.
There could be (rare) situations where you use schemas for
validation which haven't been processed by XSD. For example,
you could have schemas that are used to validate content
matched by wildcards. In such situations it may make sense
to use the full schema checking feature. To enable it, you
will need to perform your own XML-to-DOM parsing. This way
you will be able to configure the parser the way you want.
See the 'multiroot' example in the examples/cxx/tree/
directory, in particular, the dom-parser.* files, for an
example on how to do this.
Boris
More information about the xsd-users
mailing list