Name

xs:complexType(global definition) — Global definition of a complex type that can be referenced within the same schema by other schemas.

Synopsis

<xs:complexType
           abstract       = xs:boolean : “false”
           block          = ( “#all” | list of ( “extension” | “restriction” ) )
           final          = ( “#all” | list of ( “extension” | “restriction” ) )
           id             = xs:ID
           mixed          = xs:boolean : “false”
           name           = xs:NCName
           {any attributes with non-schema namespace}
           >
           Content: (xs:annotation?, (xs:simpleContent | xs:complexContent | (,
                      (xs:group | xs:all | xs:choice | xs:sequence)?,
                      ((xs:attribute | xs:attributeGroup)*, xs:anyAttribute?
          ?))))
</xs:complexType>

May be included in: xs:redefine, xs:schema

Description

This component is used to create global complex types as direct descriptions of their content model, or by derivation from simple types or other complex types. The creation of a new complex type is done by a compositor (xs:sequence, xs:choice, or xs:all) that describes the child elements, followed by a list of attributes (or attribute groups or attribute wildcards). The derivation of a complex type through existing simple or complex types is done by including an xs:simpleContent (for simple contents) or an xs:complexContent (for complex contents) element. In both cases, when the content is not simple, the mixed attribute defines if the content model is mixed (i.e., allows both text and element nodes) or not.

Several controls are provided through attributes. Complex types can be declared “abstract,” their substitution can ...

Get XML Schema now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.