I am having trouble getting the Xerces 1.4.1 parser (for
Java) to detect a violation of the uniqueness constraint.
I used the sample schema personal.xsd and the sample XML
file personal-schema.xml that comes with Xerces. I then
changed personal-schema.xml to use the same given name for
the two of the entries, i.e.,
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>[EMAIL PROTECTED]</email>
<link manager="Big.Boss"/>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>One</given></name>
<email>[EMAIL PROTECTED]</email>
<link manager="Big.Boss"/>
</person>
The name element is constrained to be unique as follows in
personal.xsd:
<xs:unique name="unique1">
<xs:selector xpath="person"/>
<xs:field xpath="@name"/>
</xs:unique>
But when I run this through the sample program SAX2Writer,
no errors are detected by the parser. Is this a bug in
Xerces 1.4.1?
Thanks -
Hugh Rodgers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]