xml schema complextype indicator

T

tsolbjor

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top