Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xml schema question

From: George Cristian Bina <george@----.-->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent