XML Schema 0- unordered set containing multiple occuring element

N

Naresh Agarwal

Hi

How can I write a XML Schema for a XML document, which contains an
unordered set of elements and one of these element, who is of complex
type can have multiple occurences.

xsd:sequence provides ordered set. xsd:all provides ordered set but
cardinality of it elements cann't be more than one. so none of these
can be used.

Any help will be greatly appreciated.

thanks,
Naresh Agarwal
 
M

Martin Honnen

Naresh said:
How can I write a XML Schema for a XML document, which contains an
unordered set of elements and one of these element, who is of complex
type can have multiple occurences.

xsd:sequence provides ordered set. xsd:all provides ordered set but
cardinality of it elements cann't be more than one. so none of these
can be used.

Using <xs:choice> with maxOccurs should allow you to describe the
content model you want to have but I don't think the W3C XML schema
language will allow you to restrict the content to an unordered set
where one element can occur several times, with the choice all elements
can occur multiple times.
 

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,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top