Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: xml schema question [Thread Next] Re: xml schema questionTo: Robert Koberg <rob@------.---> Date: 7/23/2004 6:57:00 PM
Hi Rob,
That will be equivalent with
<xsd:complexType>
<xsd:choice minOccurs='0' maxOccurs='unbounded'>
<xsd:element ref='dd'/>
<xsd:element ref='cc'/>
<xsd:element ref='aa'/>
<xsd:element ref='bb'/>
</xsd:choice>
</xsd:complexType>
minOccurs and maxOccurs will constrain the number of occurances inside
the choice model and they have a default value of 1.
If you have
<xsd:complexType>
<xsd:choice minOccurs='0' maxOccurs='unbounded'>
<xsd:element ref='dd'/>
<xsd:element ref='cc'/>
<xsd:element ref='aa' minOccurs="2" maxOccurs="2"/>
<xsd:element ref='bb'/>
</xsd:choice>
</xsd:complexType>
then you should have pairs of aa elements (one aa element after the other).
Best Regards,
George
-----------------------------------------------
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger
www.---.com
Robert Koberg wrote:
> Just curious: Could something like this work?
>
>
> <xsd:element name='element'>
> <xsd:complexType>
> <xsd:choice minOccurs='0' maxOccurs='unbounded'>
> <xsd:element ref='dd'/>
> <xsd:element ref='cc'/>
> <xsd:element ref='aa' minOccurs='1' maxOccurs="1"/>
> <xsd:element ref='bb' minOccurs='1' maxOccurs="1"/>
> </xsd:choice>
> </xsd:complexType>
> </xsd:element>
>
> In other words, can you override the choice's min/max at the element level?
>
> best,
> -Rob
>
From simon.kampa@s... Fri Jul 23 11:27:33 2004
Return-Path: <simon.kampa@stas | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
