W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2004

Bug in "Particle Valid (Restriction)"

From: <Ulrich.Post@softwareag.com>
Date: Tue, 7 Dec 2004 18:59:48 +0100
Message-ID: <0AE50E462665EB4898CACAC8DA16982203F08C0B@DAEMSG03.eur.ad.sag>
To: <www-xml-schema-comments@w3.org>
Hello

I'm wondering whether the following is a bug in the XML Schema
Recommendation:

At http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
<http://www.w3.org/TR/xmlschema-1/>  it is stated that

     "3.2.3 R's declaration's {identity-constraint definitions}
<http://www.w3.org/TR/xmlschema-1/>  is a subset of B's declaration's 
               {identity-constraint definitions}
<http://www.w3.org/TR/xmlschema-1/> , if any."

To my opinion this would mean, that there are fewer constraints on R
than on B 
- which is probably not intended.

Look at the following two element declarations:

(1)
    <xs:element name="e">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="uid" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xs:element>

(2)
    <xs:element name="e">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="uid" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:unique name="uid">
        <xsd:selector xpath="uid"/>
        <xsd:field xpath="."/>
      </xsd:unique>
    </xs:element>

Obviously, (1)'s identity constraints are a subset of (2)'s.
When looking at these I end up with the conclusion that (2) is a valid
restriction of (1) rather than vice versa.

Would you agree on this?

Best regards
Uli Post
Received on Tuesday, 7 December 2004 18:00:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:07 GMT