aspose file tools*
The moose likes XML and Related Technologies and the fly likes Using both xs:sequence and xs:all Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Using both xs:sequence and xs:all" Watch "Using both xs:sequence and xs:all" New topic
Author

Using both xs:sequence and xs:all

Luis Machado
Greenhorn

Joined: Oct 04, 2010
Posts: 2
Hi!

I'm making a schema to a file where i have a sequence os elements:

<A> bla </A>
<B> bla </B>
<C> bla </C>
<D> bla </D>
<E> bla </E>
<F> bla </F>

However, i need to have the C, D and E nodes in any order, per example:

A
B
E
D
C
F

How can I maintain a sequence A,B ... F and inside of it something with no order?

I already tried something like:
<sequence>...</sequence>
<all>...</all>
<sequence>...</sequence>

but with no sucess.

Thanks ;)
Luis Machado
Greenhorn

Joined: Oct 04, 2010
Posts: 2
No one?

I was thinking about using the choose tag, and list all the possible combinations, but with 3 elements that would mean 9 combinations.
I dont know if that is the best way to do it...
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
You might have better luck trying to create an XML DTD with these rules rather than an XML Schema.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18993
    
    8

When I see a question like this, my thought is "Who invented this requirement and can they be persuaded to change it to something more practical?"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using both xs:sequence and xs:all