Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XML Schema: inheritance with variable order of childs [Thread Next] Re: XML Schema: inheritance with variable order of childsTo: NULL Date: 11/5/2007 5:51:00 AM On 5 Nov, 11:20, Sven <s...@ast.dfs.de> wrote: > What is the intention of xs:all? Is it just the same like xs:sequence > with having no strict order? But in xs:all all elements have to be > present exactly one time, right? There is no possibility to define > optional or multiple elements?! > xs:all is similar to xs:sequence, but, as you say, does not impose a strict order. Elements from an xs:all in an XML instance can occur 0 or 1 times, but _not_ 2 or more. Unlike like xs:sequence, xs:all does not allow anonymous compositors, can't be used as an anonymous compositor, and can't extend from a base or be extended. > By the way, why is s sequence the main collection type? I can see no > reason for a strict order of the child elements anyway. The restrictions on xs:all were imposed because at the time it was thought that the impact on a finite state machine implementing validation would suffer combinatorial explosion type problems. I imagine that xs:sequence is ordered for similar reasons. (Note that it's now considered that there are better ways to validate xs:all than implementing a finite state machine and future versions of schema are likely to allow more relaxed forms of xs:all.) HTH, Pete Cordell Codalogic Visit http://www.codalogic.com/lmx/ for XML Schema to C++ data binding | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
