You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Amar Basu <am...@yahoo.com> on 2002/03/24 07:40:32 UTC

Custom parser configuration for Schema validation only

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

I was thinking about having a pipeline consisting of a
DocumentScannerImpl, followed by the NamespaceBinder and then the
XMLSchemaValidator

Will this work?

Thanks in advance,
Amar


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Custom parser configuration for Schema validation only

Posted by Elena Litani <el...@ca.ibm.com>.
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: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org