W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2001] R-23. pfiattrRestrict: Restrictions of attributes specifying "use"

From: <bugzilla@wiggum.w3.org>
Date: Wed, 07 Sep 2005 19:45:01 +0000
To: www-xml-schema-comments@w3.org
Cc:
Message-Id: <E1ED5qv-0003PS-0f@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2001

           Summary: R-23. pfiattrRestrict: Restrictions of attributes
                    specifying "use"
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 1: Structures
        AssignedTo: ht@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org


The constraints listed for "derivation-ok-restriction" do not appear to 
prohibit the following: 

<xsd:complexType name="baseType">
     <xsd:attribute name="attrib1" type="xsd:string" use="prohibited"/>
<xsd:complexType>

<xsd:complexType name="restrictedType">
     <xsd:complexContent>
          <xsd:restriction base="baseType">
               <xsd:attribute name="attrib1" type="xsd:string" use="required"/>
          </xsd:restriction>
     </xsd:complexContent>
</xsd:complexType>
Shouldn't this be disallowed, since instances of the restricted type are not 
valid instances of the base?

See
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001AprJun/0225.html
Received on Wednesday, 7 September 2005 19:45:05 GMT

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