XML technologies / XML Schema / XML Schema element reference / xs:sequence (outside a group)

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

Compositor defining an ordered group of elements.

<xs:sequence
    id = xs:ID
    maxOccurs = ( xs:nonNegativeInteger | "unbounded" ) : "1"
    minOccurs = xs:nonNegativeInteger : "1"
    {beliebige Attribute mit einem Nicht-Schema-Namensraum}
    >
    Content: (xs:annotation?, (xs:element | xs:group | xs:choice | xs:sequence | xs:any) )*)
</xs:sequence>

May occur within: xs:choice (outside a group), xs:choice (within a group), xs:complexType (local definition), xs:complexType (global definition), xs:extension (complex content), xs:restriction (complex content), xs:sequence (within a group), xs:sequence (outside a group)

Description

This compositor defines an ordered list or set of elements. Its own attributes minOccurs and maxOccurs can specify occurrence frequency for the entire sequence.

Restrictions

xs:sequence must not occur within an xs:all compositor, and xs:sequence must not contain xs:all compositors.

When xs:sequence occurs within an xs:group compositor, its content model differs slightly; see xs:sequence (within a group).

Example

<xs:element name="library">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="book" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>

Attributes

id
Element ID according to W3C XML Schema.

maxOccurs
Maximum occurrence count.

minOccurs
Minimum occurrence count.

   

 

 

 

back to top