OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Schema Either Text Or Sequence

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: XML Schema Either Text Or Sequence
  • From: Alan Gutierrez <alan-xml-dev@engrm.com>
  • Date: Sun, 19 Dec 2004 21:46:55 -0500
  • Mail-followup-to: xml-dev@lists.xml.org
  • User-agent: Mutt/1.4.1i

    I'd like to assert that the element set either contains a simple
    type or more set elements.

    <set name="phone">
      <set name="type">work</set>
      <set name="number">555-1212</set>
    </set>

    I figured out this bit:

    <xsd:complexType name="set">
      <xsd:simpleContent>
        <xsd:extension type="xs:string">
          <xsd:attribute name="name" type="xs:string"/>
        </xsd:extension>
      </xsd:simpleContent>
    </xsd:complexType>

    I figured out this bit:

    <xsd:complexType name="set">
      <xsd:sequence>
        <xsd:element name="set" type="set"/>
      </xsd:sequence>
      <xsd:attribute name="name" type="xs:string"/>
    </xsd:complexType>

    I can't figure out how to make a union of the two. I'm beginning
    to think that this is non-deterministric, or in some other
    way a bad design.

--
Alan Gutierrez - alan@engrm.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS