http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Download
CVS Repository

Samples
API JavaDoc
XNI Manual
FAQs

Features
Properties

Release Info
Limitations
Report a Bug

Questions
 

Answers
 
What's the result of having a DTD validator or XML Schema validator in the pipeline?
 

If a validator is included in the pipeline, assessment is done, whether the validation feature is set to true or false. Currently, validation only enables the validation constraint error reporting. The validation feature does not control the infoset augmentation: if a validator is included in the pipeline the parser will augment the infoset according to the grammar specified for the instance document. This behaviour may be revisited/changed in the future.


What validation behavior do I expect from the default parser configuration?
 

The default configuration includes both DTD validator and XML schema validator, so it's capable of validating an instance against both kinds of grammars. But this could bring some performance hit for those applications that only process XML documents with DTD. If you care about performance, and only use DTD, please use DTD configuration instead.


What happens if I set both validation and schema validation features on?
 

If only one of DTD validation and XML Schema validator is present in the pipeline, then we only consider the feature corresponding to this validator, and ignore the other one.

If both validators are present in the pipeline, then

  • if the instance document has only a DTD grammar (DOCTYPE before the root element), then only DTD validation errors are reported;
  • if the instance document has only XML Schema grammars, then only XML Schema validation errors are reported (we consider an instance document to have a XML Schema grammar if either xsi:schemaLocation or xsi:noNamespaceSchemaLocation attribute is present on the root element. This might change after we support grammar caching);
  • if the instance document has both DTD and XML Schema grammars, validation errors for both DTD and XML Schema are reported;
  • if no grammar can be found for the instance document, then XML Schema validation errors are reported.

NOTE: The above is the current interpretation of the validation features. It may change in future Xerces releases.


Where are the two schema location properties introduced in Xerces 1?
 

External schema location properties are not currently supported in Xerces 2. We're examining how to support this for the next Schema release.




Copyright © 1999-2001 The Apache Software Foundation. All Rights Reserved.