W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

Spec issue with pointless occurrences of <sequence>, <choice> or <all>

From: Yan Leshinsky <yanl@microsoft.com>
Date: Tue, 29 May 2001 09:01:25 -0700
Message-ID: <45359FDEC14E8C4CA23BA1CF2A8004370188E5B1@red-msg-03.redmond.corp.microsoft.com>
To: <www-xml-schema-comments@w3.org>
> Schema Component Constraint: Particle Valid (Restriction) 
> ...
> 2.2 Any pointless occurrences of <sequence> <l >, <choice> <l > or
> <all> <l > are ignored
> 
> Application of this rule will make following schema invalid. Is that
> desired behavior?
> 
> <xs:schema elementFormDefault="qualified" targetNamespace=""
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xs:complexType name="base">
>         <xs:sequence>
>             <xs:sequence maxOccurs="2">
>                 <xs:element name="a"/>
>                 <xs:element name="b"/>
>             </xs:sequence>
>             <xs:sequence maxOccurs="2">
>                 <xs:element name="a"/>
>                 <xs:element name="b"/>
>             </xs:sequence>
>         </xs:sequence>
>     </xs:complexType>
>     <xs:complexType name="derived">
>         <xs:complexContent>
>             <xs:restriction base="base">
>                 <xs:sequence>
>                     <xs:sequence maxOccurs="1">
>                         <xs:element name="a"/>
>                         <xs:element name="b"/>
>                     </xs:sequence>
>                     <xs:sequence maxOccurs="1">
>                         <xs:element name="a"/>
>                         <xs:element name="b"/>
>                     </xs:sequence>
>                 </xs:sequence>
>             </xs:restriction>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
> 
> Thanks, Yan
> 
Received on Tuesday, 29 May 2001 12:02:20 GMT

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