W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2008

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

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 March 2009 11:13:42 GMT