Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > schema unordered element list with any element

Reply
Thread Tools

schema unordered element list with any element

 
 
CJ
Guest
Posts: n/a
 
      12-17-2003
I started with this schema:
<xs:schema xmlnss="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="response">
<xs:complexType>
<xs:sequence>
<xs:element name="SysTime" type="xs:string"/>
<xs:element name="Item">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:long"/>
<xs:element name="Time"
type="xs:string"/>
<xs:any minOccurs="0"
maxOccurs="unbounded" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:any minOccurs="0" maxOccurs="unbounded"
processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

The need has risen to have the elements in any order.

I tried various combinations to no avail, including using xs:choice like
this:

<xs:schema xmlnss="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="response">
<xs:complexType>
<xs:choice minOccurs="0">
<xs:element name="SysTime" type="xs:string"/>
<xs:element name="Item">
<xs:complexType>
<xs:choice minOccurs="0">
<xs:element name="Id" type="xs:long"/>
<xs:element name="Time"
type="xs:string"/>
<xs:any minOccurs="0"
maxOccurs="unbounded" processContents="skip"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:any minOccurs="0" maxOccurs="unbounded"
processContents="skip"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

Can someone help me out?

the intent for this schema is to be fed into jaxb xml processor but it
throws errors on the xs:choice version (even though xml-spy says it is
fine)

TIA,
CJ
 
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
Build unordered list in HTML from a python list Nico Grubert Python 0 06-30-2010 08:34 AM
Newbie question, schema, complex types and unordered multiple elemets davidjones@myself.com XML 3 10-17-2007 05:52 PM
how to transform a list form of hyphens to an html unordered list ibiza ASP .Net 5 02-09-2006 04:10 PM
Schema for validating unordered sequences? Kevin Campbell XML 3 04-26-2004 04:59 PM
XML Schema 0- unordered set containing multiple occuring element Naresh Agarwal XML 1 03-07-2004 12:39 PM



Advertisments