[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Andrew Welch" <andrew.j.welch@g...>
  • To: "Costello, Roger L." <costello@m...>
  • Date: Thu, 14 Aug 2008 14:01:40 +0100

> Consider this problem: you have 3 elements - A, B, C - and you need at
> least one of them to be present in your XML instance document.

How about:

    <xs:element name="baseType"/>

    <xs:element name="A" substitutionGroup="baseType"/>
    <xs:element name="B" substitutionGroup="baseType"/>
    <xs:element name="C" substitutionGroup="baseType"/>

    <xs:complexType name="whatever">
        <xs:sequence>
            <xs:element ref="baseType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

?

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member