Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using both xs:sequence and xs:all

 
Luis Machado
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have better luck trying to create an XML DTD with these rules rather than an XML Schema.
 
Paul Clapham
Sheriff
Pie
Posts: 20959
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic