Hi,
Im trying to make a Schema with a complexType that can include different elements.
It is not a sequence, and when I use the "all" indicator I cant set the maxOccurs="unbounded".
Heres the exerpt:
<xsd:element name="p">
<xsd:complexType mixed="true">
<xsd:all>
<xsd:element name="ul" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element ref="listItem" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="ol"> <xsd:complexType> <xsd:sequence> <xsd:element ref="listItem" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element type="date" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="person" minOccurs="0" maxOccurs="unbounded" /> </xsd:all> </xsd:complexType> </xsd:element>
Basically, I want a <p> that can, but dont have to, consist of one or more of a set of elements.
Hope this make some kind of sense to someone
Im trying to make a Schema with a complexType that can include different elements.
It is not a sequence, and when I use the "all" indicator I cant set the maxOccurs="unbounded".
Heres the exerpt:
<xsd:element name="p">
<xsd:complexType mixed="true">
<xsd:all>
<xsd:element name="ul" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element ref="listItem" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="ol"> <xsd:complexType> <xsd:sequence> <xsd:element ref="listItem" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element type="date" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="person" minOccurs="0" maxOccurs="unbounded" /> </xsd:all> </xsd:complexType> </xsd:element>
Basically, I want a <p> that can, but dont have to, consist of one or more of a set of elements.
Hope this make some kind of sense to someone