You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Kitty aa <bv...@hotmail.com> on 2004/04/01 09:09:49 UTC
Question on ids in schema
I had a question on id handling in xerces.
For eg. if I have schema A.xsd
<xsd:schema id="ABC">
<xsd:include schemaLocation="B.xsd">
<xsd:element name="x" type="xsd:string">
</xsd:schema>
schema B.xsd
<xsd:schema id="ABC"> //HERE ABC value is repeated as a id
</xsd:schema>
If we look A.xsd as standalone XML having a id attribute it is unique.
However if I parse A.xsd, I get an error in B.xsd saying the id attribute is
duplicated.
Strangely the schema spec is silent on this. Looks like the xerces schema
parser checks ids in totality including 'includes' and 'imports'. What is
the correct behaviour. Should this resort to a single document with an id
like XML or consider the include and import set for id uniqueness.
Appreciate your help
Thanks
Kiran
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.com/go/onm00200415ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org