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

Re: inquiry into the <choice> element behavior

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Fri, 31 Oct 2008 22:11:18 +0530
Message-ID: <7870f82e0810310941m768c15e0n3aa7db15bb19a782@mail.gmail.com>
To: "Alex Porras" <alex.porras@dds.mediaocean.com>
Cc: xmlschema-dev@w3.org
Re: inquiry into the <choice> element behavior

On Fri, Oct 31, 2008 at 7:58 PM, Alex Porras
<alex.porras@dds.mediaocean.com> wrote:
> <xs:choice maxOccurs="1">
>    <xs:element name="foo" type="xs:string" maxOccurs="unbounded"/>
>    <xs:element name="bar" type="xs:string" maxOccurs="unbounded"/>
> </xs:choice>

This is something like,

(a* | b*)

> <xs:choice maxOccurs="unbounded">
>    <xs:element name="foo" type="xs:string" maxOccurs="unbounded"/>
>    <xs:element name="bar" type="xs:string" maxOccurs="unbounded"/>
> </xs:choice>

this is like,

(a* | b*)*

I think, this could be simplified to,

(a | b)*

or in xs:choice terms,

<xs:choice maxOccurs="unbounded">
   <xs:element name="foo" type="xs:string" />
   <xs:element name="bar" type="xs:string" />
</xs:choice>


-- 
Regards,
Mukul Gandhi
Received on Friday, 31 October 2008 16:41:53 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.