From: Marvin M. Goodgame

I am running an xmlvalidator application that is built on the Xerces-2.0.2
release using org.apache.xerces.parsers.SAXParser class for parsing.  The
following features are set "true" on the parser:
      http://xml.org/sax/features/validation
      http://xml.org/sax/features/namespaces
      http://apache.org/xml/features/validation/schema
      http://apache.org/xml/features/validation/schema-full-checking

This xmlvalidator fails to report the violation of uniqueness for attribute
"b":
      <A
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
            xmlns="http://www.example.com/A";
            xsi:schemaLocation="http://www.example.com/A
                                file:/home/goodgame/tmp/A.xsd">
        <B b="1"/>
        <B b="2"/>
        <B b="1"/>
      </A>

as specified in the following schema:
      <xsd:schema
              targetNamespace="http://www.example.com/A";
              xmlns:xsd="http://www.w3.org/2001/XMLSchema";
              xmlns="http://www.example.com/A";>

      <xsd:complexType name="AType">
        <xsd:sequence>
          <xsd:element ref="B" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="BType">
        <xsd:attribute name="b" type="xsd:positiveInteger" use="required"/>
      </xsd:complexType>

      <xsd:element name="A" type="AType">
        <xsd:unique name="dummy">
              <xsd:selector xpath="B"/>
              <xsd:field xpath="@b"/>
        </xsd:unique>
      </xsd:element>

      <xsd:element name="B" type="BType"/>

      </xsd:schema>

Can anyone tell me what I'm doing wrong?

Thanks,
Marv



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

Reply via email to