Using xs:all instead of xs:sequence improves the error messages of the PVCollada XML doc validator. xs:sequence and xs:all allow us to define XMLSchema element definitions with multiple fields, but they differ by how many times a field is allowed to appear and what order fields can appear in:
xs:sequence:
- Using
minOccurs and maxOccurs, fields can appear at least zero times.
- The order of an element's fields in an XML document must match the order they appear in the XML schema's element definition.
xs:all:
- Fields can only appear at most once.
- The order of an element's fields is not enforced.
Here is their XMLSchema specification.
Element definitions that do not represent arrays of elements should use xs:all instead of xs:sequence. For example, the project element has fields that appear at most once (i.e., none of them have the attribute maxOccurs="unbounded"), so project can use xs:all. Making this change improves the error messages of the validator. When defining project with xs:sequence, the validator only reports the next missing field; however, when defining project with xs:all, the validator reports all the missing fields.
On the other hand, here is an observation that suggests xs:all should not be used -- xs:all is never used by the COLLADA schema.
Using
xs:allinstead ofxs:sequenceimproves the error messages of the PVCollada XML doc validator.xs:sequenceandxs:allallow us to define XMLSchema element definitions with multiple fields, but they differ by how many times a field is allowed to appear and what order fields can appear in:xs:sequence:minOccursandmaxOccurs, fields can appear at least zero times.xs:all:Here is their XMLSchema specification.
Element definitions that do not represent arrays of elements should use
xs:allinstead ofxs:sequence. For example, theprojectelement has fields that appear at most once (i.e., none of them have the attributemaxOccurs="unbounded"), soprojectcan usexs:all. Making this change improves the error messages of the validator. When definingprojectwithxs:sequence, the validator only reports the next missing field; however, when definingprojectwithxs:all, the validator reports all the missing fields.On the other hand, here is an observation that suggests
xs:allshould not be used --xs:allis never used by the COLLADA schema.