Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema 0- unordered set containing multiple occuring element

Reply
Thread Tools

XML Schema 0- unordered set containing multiple occuring element

 
 
Naresh Agarwal
Guest
Posts: n/a
 
      03-07-2004
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      03-07-2004


Naresh Agarwal wrote:

> 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.
--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question, schema, complex types and unordered multiple elemets davidjones@myself.com XML 3 10-17-2007 05:52 PM
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Schema for validating unordered sequences? Kevin Campbell XML 3 04-26-2004 04:59 PM
schema unordered element list with any element CJ XML 0 12-17-2003 07:48 PM



Advertisments