You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Dane Foster <df...@equitytg.com> on 2001/04/10 17:09:15 UTC

Hello all.  I'm hoping one of you schema gurus can help me with a little
problem I'm having.  I'm trying to specify in a schema that a group of
elements can appear multiple times in any order.  I know I can't use the
[<all>] element because it has a maximum carnality of one.  EX

<xsd:complexType name="myComplexType">
  <xsd:the_type_that_will_make_this_work>
    <!-- I want the two elements below to appear in any order and multiple
times-->
    <xsd:element ref="some_ref" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element ref="some_other_ref" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:the_type_that_will_make_this_work>
</xsd:complexType>


Any help is appreciated.


Dane Foster
Equity Technology Group, Inc
http://www.equitytg.com.



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re:

Posted by Birgit Wolter <bi...@gmx.net>.
Hello Dane,

this should do:

<xsd:complexType name="myComplexType">
  <choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="some_ref" minOccurs="1" maxOccurs="1"/>
    <xsd:element ref="some_other_ref" minOccurs="1" maxOccurs="1"/>
  </choice>
</xsd:complexType>
-- 
 Birgit                            mailto:birgit.wolter@gmx.net

Tuesday, April 10, 2001, 5:09:15 PM, you wrote:

> Hello all.  I'm hoping one of you schema gurus can help me with a little
> problem I'm having.  I'm trying to specify in a schema that a group of
> elements can appear multiple times in any order.  I know I can't use the
> [<all>] element because it has a maximum carnality of one.  EX

> <xsd:complexType name="myComplexType">
>   <xsd:the_type_that_will_make_this_work>
>     <!-- I want the two elements below to appear in any order and multiple
times-->>
>     <xsd:element ref="some_ref" minOccurs="0" maxOccurs="unbounded"/>
>     <xsd:element ref="some_other_ref" minOccurs="0" maxOccurs="unbounded"/>
>   </xsd:the_type_that_will_make_this_work>
> </xsd:complexType>


> Any help is appreciated.


> Dane Foster
> Equity Technology Group, Inc
> http://www.equitytg.com.



> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re:

Posted by Dane Foster <df...@equitytg.com>.
It works!  Thanx :-)


Dane Foster
Equity Technology Group, Inc
http://www.equitytg.com.
954.360.9800
----- Original Message -----
From: "Ian Roberts" <ir...@decisionsoft.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, April 10, 2001 11:18 AM
Subject: Re: <xsd:any>


On Tue, 10 Apr 2001, Dane Foster wrote:

> Hello all.  I'm hoping one of you schema gurus can help me with a little
> problem I'm having.  I'm trying to specify in a schema that a group of
> elements can appear multiple times in any order.  I know I can't use the
> [<all>] element because it has a maximum carnality of one.  EX
>
> <xsd:complexType name="myComplexType">
>   <xsd:the_type_that_will_make_this_work>
>     <!-- I want the two elements below to appear in any order and multiple
> times-->
>     <xsd:element ref="some_ref" minOccurs="0" maxOccurs="unbounded"/>
>     <xsd:element ref="some_other_ref" minOccurs="0"
maxOccurs="unbounded"/>
>   </xsd:the_type_that_will_make_this_work>
> </xsd:complexType>

An <xsd:choice minOccurs="0" maxOccurs="unbounded">, with the elements
inside the choice having min/maxOccurs of 1 should do what you want
(though I'm not exactly sure of the CR/PR syntax).

Ian

--
Ian Roberts, Software Engineer        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re:

Posted by Ian Roberts <ir...@decisionsoft.com>.
On Tue, 10 Apr 2001, Dane Foster wrote:

> Hello all.  I'm hoping one of you schema gurus can help me with a little
> problem I'm having.  I'm trying to specify in a schema that a group of
> elements can appear multiple times in any order.  I know I can't use the
> [<all>] element because it has a maximum carnality of one.  EX
> 
> <xsd:complexType name="myComplexType">
>   <xsd:the_type_that_will_make_this_work>
>     <!-- I want the two elements below to appear in any order and multiple
> times-->
>     <xsd:element ref="some_ref" minOccurs="0" maxOccurs="unbounded"/>
>     <xsd:element ref="some_other_ref" minOccurs="0" maxOccurs="unbounded"/>
>   </xsd:the_type_that_will_make_this_work>
> </xsd:complexType>

An <xsd:choice minOccurs="0" maxOccurs="unbounded">, with the elements
inside the choice having min/maxOccurs of 1 should do what you want
(though I'm not exactly sure of the CR/PR syntax).

Ian

-- 
Ian Roberts, Software Engineer        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org