xml schema complextype indicator

tsolbjor

Usenet Archive
Joined
Jun 24, 2004
Messages
2
Reaction score
0
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

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top