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 Vinay Shukla <vi...@oracle.com> on 2003/07/08 15:04:16 UTC

JAXP 1.2, uniform parser configuration for both dtd and w3c schema validation

Hi All,

I need some help in figuring out this issue. I think as per JAXP 1.2
specification the defined parser behavior makes it difficult in the
below case.

Case: Validate an XML deployment descriptor with out knowing whether it
needs to be validated against a dtd or a w3 xml schema.

Currently as per JAXP  1.2 I could configure my parser to validate an
xml descriptor against either dtd or a w3 xml schema. However these two
configurations are different. I need to find a uniform way to configure
a parser, where I don't have to worry whether I am going to be
validating against a dtd or a schema.

How do I do this.

As per the JAXP 1.2 specification (Table 1 on page 29 of 148) with
validation turned on, and schema language property set, the document is
only validated against a w3 schema (irrespective of the DOCTYPE).

I would like to find out what is the recommended way to use a JAXP 1.2
compliant parser so that I can validate against both schemas and dtds
with out reconfiguring my parser.

I could directly get hold of xerces parser to achieve the above
behavior. However I have to use JAXP 1.2 APIs.

Thank you for your time,

Vinay Shukla


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