homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

XML Schema: Arbitrary Positioning
I Know This Can be Done, but How?

WebmasterWorld Senior Member 5+ Year Member

Msg#: 3435878 posted 8:06 pm on Aug 29, 2007 (gmt 0)

I want to have a schema that validates green when I have the proper enclosed elements in any order.

To wit:

The schema:

<xs:element name="container">
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element name="element_a" type="xs:string" maxOccurs="1" minOccurs="1" nillable="true"/>
<xs:element name="element_b" type="xs:string" maxOccurs="1" minOccurs="1" nillable="true"/>
<xs:element name="element_c" type="xs:string" maxOccurs="1" minOccurs="1" nillable="true"/>

Says this is OK:


But I also want this to be OK:


Currently, my experience with schema says that I cannot arbitrarily place <element_c/> before <element_a/>. I can make them optional, but they need to be placed in order.

I know this can be done, I'm just not sure how.

Can someone give a ticket to the cluetrain?


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved