[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[XML Schema 1.1] Multiple <alternative> elements apply ... which one wins?

From: Costello, Roger L. <costello@mitre.org>
Date: Wed, 1 Jul 2009 16:22:49 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB500400458C4C@IMCMBX3.MITRE.ORG>
[XML Schema 1.1] Multiple <alternative> elements apply ... which  one wins?

Hi Folks,

Suppose that several <alternative> elements apply. Which one will be used? 

Example: the below <Beverage> element has two <alternative> elements. If the value of its current-time attribute is 08:00:00 then both <alternative> elements apply. Which one will be used?

<xs:element name="Beverage" type="BeverageType">
    <xs:alternative test="@current-time le '12:00:00'" type="MorningBeverage" />
    <xs:alternative test="@current-time le '09:00:00'" type="EarlyMorningBeverage" />
</xs:element>

/Roger
Received on Wednesday, 1 July 2009 20:23:26 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.