XML technologies / XML Schema / XML Schema element reference / xs:all (within a group)

(Excerpt from “XML Schema” by Eric van der Vlist)

Compositor describing an unordered group of elements. Occurrence frequency cannot be specified when xs:all is used within a group.

<xs:all
    id = xs:ID
    {beliebige Attribute mit einem Nicht-Schema-Namensraum}
    >
    Content: (xs:annotation?, xs:element*)
</xs:all>

May occur within: xs:group (definition)

Description

Within a group, xs:all has the same meaning as directly beneath xs:complexType, except that attributes minOccurs and maxOccurs  disappear completely; the compositor cannot be marked optional.

Restrictions

Restrictions applying to xs:all also apply to the group containing compositor xs:all. This group may occur at most once and cannot be used as a particle. It must occur directly beneath xs:complexType, xs:restriction or xs:extension.

All other restrictions of xs:all  apply here too.

Example

<xs:group name="authorSubElements">
    <xs:all>
        <xs:element ref="name"/>
        <xs:element ref="born"/>
        <xs:element ref="dead" minOccurs="0"/>
    </xs:all>
</xs:group>

Attributes

id
Element ID according to W3C XML Schema.

   

 

 

 

back to top