Andreas Posted March 28, 2006 Share Posted March 28, 2006 My problem is to define a schema for a file like: <Root> <Elemant1/> <Elemant2/> <Elemant3/> <Elemant3/> <Elemant2/> <!--optional<ElemantX/>--> <Elemant3/> <Elemant4/></Root> my problem is the repeating of elements and the optional elements.I tried the following schema: ...<sequence minOccurs=0 maxOccurs=unbound> <Elemant1/> <Elemant2/> <Elemant3/> <ElemantX/> <Elemant4/></sequence>... but now the order is fix, if I use <all> I can't define more than one occurance of an element.Thanks for Help Link to comment Share on other sites More sharing options...
radikaled Posted April 5, 2006 Share Posted April 5, 2006 i'm new at this, but i believe if you do something like this: <sequence><choice maxOccurs="unbounded"><Elemant1/> <Elemant2/> <Elemant3/> <ElemantX/> <Elemant4/></choice></sequence> that should allow multiple elements in any order.see this topic:http://w3schools.invisionzone.com/index.php?showtopic=1828 Link to comment Share on other sites More sharing options...
Andreas Posted April 6, 2006 Author Share Posted April 6, 2006 Thats right, but now you can only have one item of each sort. And that exactly is my problem, would need a coice where each item can appear more than one time.Thanks for trying ! i'm new at this, but i believe if you do something like this:<sequence><choice maxOccurs="unbounded"><Elemant1/> <Elemant2/> <Elemant3/> <ElemantX/> <Elemant4/></choice></sequence> that should allow multiple elements in any order.see this topic:http://w3schools.invisionzone.com/index.php?showtopic=1828 <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now