Amar, 

Amar Basu wrote: 
> Is it possible to define a custom parser configuration that will
> validate against schemas only, and not DTD's?

Yes, it is possible. xerces.parsers.StandardParserConfiguration has a
method configurePipeline() that configures the pipeline. You need to
either extend this configuration and overwrite this method or modify the
standard configuration to exclude DTD validator.

The pipeline should be Scanner->NamespaceBinder->XMLSchemaValidator. 

However, note that if you file did include a DTD+XML Schema, this
configuration might not be conformant, since XML Schema requires as a
precondition for assessment the information as described in XML Infoset.
XML Infoset includes DTD default attributes as well as attributes value
have been normalized according to XML 1.0 spec. Xerces scanner performs
CDATA attribute value normalization, however the rest of attribute value
normalization (for non-CDATA attributes) is done in DTD validator. DTD
Validator is also responsible for including default attributes.


-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to