Hi,

If I validate this files with Xerces 1.4.3 it returns OK, ignoring the Identity
Constrain.

<?xml version="1.0" encoding="UTF-8"?>
<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="testfile.xsd">
        <Element name="NAME1"/>
        <Element name="NAME1"/>
</Root>


<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";>
        <element name="Root">
                <complexType>
                        <choice minOccurs="0" maxOccurs="unbounded">
                                <element name="Element">
                                    <complexType>
                                        <attribute name="name"/>
                                    </complexType>
                                </element>
                         </choice>
                </complexType>
                <unique name="IdentityContraint1">
                    <selector xpath=".//*"/>
                    <field xpath="@name"/>
                </unique>       
        </element>
</schema>


But If you test it with the XSV validator it detects a identity constraint
violation:
        http://ima.udg.es/~jpujol/Xsv/prova.xml:5:6: Invalid per
cvc-identity-constraint.2.1.2: duplicate key NAME1 for 
{None}IdentityContraint1, first appearance was in unnamed entity at line 4 char
6 of http://ima.udg.es/~jpujol/Xsv/prova.xml

NOTE: If you change the selector for * it goes well.
Is this a Xerces bug?

Bye,
-- 
---
Joan Jesús Pujol Espinar
PTS Sistemes Departament IMA

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to