XSD: Allow any combination of subelements

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

XSD: Allow any combination of subelements

Ralph Kutschera-5
Hallo!

   I'm trying to represent a mathematical formula with XML and cannot
find the correct schema definition.

I.e:
<formula>
   <plus>
     <minus>
       ..
     </minus>
     <plus>
       ..
     </plus>
     <minus>
       ..
     </minus>
   </plus>
</formula>


What I want is that, for example, <plus> can have any number of
unordered <plus> and <minus> elements.

This does not work:
<xsd:complexType name="plus">
   <xsd:sequence>
     <xsd:choice>
       <xsd:element name="plus" type="plus"></xsd:element>
       <xsd:element name="minus" type="minus"></xsd:element>
     </xsd:choice>
   </xsd:sequence>
</xsd:complexType>


Thanks,
   Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]