W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2008

UPA or not UPA violation?

From: Florent Georges <lists@fgeorges.org>
Date: Wed, 16 Apr 2008 13:14:41 +0200 (CEST)
To: xmlschema-dev@w3.org
Message-ID: <774212.49457.qm@web23014.mail.ird.yahoo.com>

  Hi

  Considering the following schema:

    <xs:group name="g1">
       <xs:sequence>
          <xs:element name="a" type="xs:int" minOccurs="0"/>
          <xs:element name="b" type="xs:int" minOccurs="0"/>
       </xs:sequence>
    </xs:group>

    <xs:group name="g2">
       <xs:sequence>
          <xs:element name="c" type="xs:int" minOccurs="0"/>
          <xs:element name="d" type="xs:int" minOccurs="0"/>
       </xs:sequence>
    </xs:group>

    <xs:element name="elem">
       <xs:complexType>
          <xs:sequence>
             <xs:choice>
                <xs:group ref="g1"/>
                <xs:group ref="g2"/>
             </xs:choice>
          </xs:sequence>
       </xs:complexType>
    </xs:element>

  Should it be an UPA violation if we have an "elem" element with no
child?  Because in this case we know the content of the element is
either of the groups but we don't know which one (because both can be
empty).

  Or I missed something?

  Regards,

--drkm

























      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
Received on Wednesday, 16 April 2008 11:15:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:46 UTC