Hi Greg,
This would be a bug. As you'll have noticed, a Jira bug entry has already
been opened.
Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
05/12/2004 02:51 cc:
PM Subject: ? Xerces-C vs. Xerces-J
(impl diff in regards to ID attr on <schema/>
Please respond to element)
xerces-c-dev
I have a question identical to that recently posted by Kiran BV:
>> Subject: Difference in XercesC and XercesJ implementation
Specifically, consider the the following 2 XSD files:
(namespaces omitted for brevity)
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
*~*~*~*~*
A.xsd
*~*~*~*~*
<xsd:schema id="ABC" targetNamespace>
<xsd:include schemaLocation="B.xsd">
<xsd:element name="x" type="xsd:string">
</xsd:schema>
*~*~*~*~*~*~*
*~*~*~*~*
B.xsd
*~*~*~*~*
<xsd:schema id="ABC">
<xsd:element name="y" type="xsd:string">
</xsd:schema>
*~*~*~*~*~*~*
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Note that B.xsd has the same value in it's ID attribute ABC value is
repeated as a id.
! This duplicate use of the 'ABC' value for the 'id' attr is the crux of
the issue.
Many Parsers and Schema validators (Spy, Turbo, SQC, MSV, XSV, .NET XML
Framework) do not produce exceptions given this situation.
Xerces-J DOES NOT either.
Xerces-C DOES, however, produce an exception: "ID 'ABC' is not unique"
Xerces-C DOES, however, produce an exception: "ID 'ABC' is not unique"
Xerces-C DOES, however, produce an exception: "ID 'ABC' is not unique"
The W3C spec states:
*~*~*~*~*~*~*~*~*~*~*~*
Validity constraint: ID
Values of type ID MUST match the Name production. A name MUST NOT appear
more than once in an XML document as a value of this type; i.e., ID values
MUST uniquely identify the elements which bear them.
*~*~*~*~*~*~*~*~*~*~*~*
...but, as stated, Xerces-C is the only parser I have found which seems to
apply this rigor to a Schema (not just to an instance).
Can someone provide insight into whether Xerces-C is 'right' to produce
this exception ?
Thanks in advance !
GregW
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]