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

RE: One of more elements required

From: Michael Kay <mike@saxonica.com>
Date: Wed, 22 Oct 2008 23:47:00 +0100
To: "'Stan Kitsis'" <Stan.Kitsis@microsoft.com>, "'Age Bosma'" <agebosma@gmail.com>, <xmlschema-dev@w3.org>
Message-ID: <18DD6BBBDB2E4A20A3B608C15DB2C1E6@Sealion>
RE: One of more elements required

> 
> If I understand your requirements right, you want
> 
>    <xsd:choice minOccurs="1" maxOccurs="unbounded">
>       <xsd:element name="platform" type="platformType"/>
>       <xsd:element name="device" type="deviceType"/>
>    </xsd:choice>
> 
> Stan Kitsis

Or if you want to insist that the platform elements come before the device
elements, you have a classic problem with XSD 1.0 (easily solved in 1.1 with
assertions). In 1.0 the usual solution is to expand the content model to

device+ | (platform+, device*)

Michael Kay
http://www.saxonica.com/
Received on Wednesday, 22 October 2008 22:47:41 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.