The all Element
The all element provides an XML
representation that describes an unordered set of element types. For
each element type associated with an all
element in an XML Schema Document, there must be a corresponding
element in the corresponding XML instance. However, they may appear
in the any order. In fact, there may be zero or many elements for
each type depending upon the values of the
minOccurs and
maxOccurs attributes associated with the
corresponding element type.
<xsd:complexType name="partOptionType"
block="#all"
final="#all"
id="partOptionType.catalog.cType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Appropriate parts can have a color,
a size, or both. Note that the use
of the "all" element indicates that
the "color" and "size" are unordered.
That is, they can appear in either
order.
-- Shorthand Notation --
</xsd:documentation>
</xsd:annotation>
<xsd:all id="pot.all">
<xsd:element name="color"
type="colorOptionType"
minOccurs="0"
maxOccurs="1"/>
<xsd:element name="size"
type="sizeOptionType"
minOccurs="0"
maxOccurs="1"/>
</xsd:all>
</xsd:complexType>
|