Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - How to *not* specify the order of occurrence? >Thread Next - Re: How to *not* specify the order of occurrence? Re: How to *not* specify the order of occurrence?To: NULL Date: 7/2/2009 8:30:00 PM Stephan Mann <groups@s...> writes: > Hi, > > I want to give this one more try before I accept that this can't be > done. I did ask for this two weeks ago in this group[1] but did not > receive any answers, so I'm trying to rephrase my question. > > I'm trying to remove the (inherent?) specification of the order of > occurrence from my XML schema. The goal is to allow elements to occur > in any order but still be able to set elements required or optional. It's a bit late to be following up on this, probably too late to help the OP. But if the OP's description of the goal is correct (allow any order, and mark elements required or optional) and the example is characteristic (none of the elements in question appears more than once), the xsd:all can do what appears to be required. N.B. using xsd:all does NOT mean that the order of elements is not significant. (If the order has no significance, there is really very little reason to allow the order to vary. Variable but meaningless ordering is also a method of steganography, which may worry some security people.) If some elements are allowed or required to appear more than once, the XSD 1.0 all-group cannot be used to express the desired constraint; that restriction has been relaxed in XSD 1.1. I hope this helps. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
