Name

xs:complexType

Attributes

abstract

Set to false (the default) when the type can appear in a document; true when it can be used only as a base for deriving other types.

block

Used to determine whether subtypes of the type can appear where the type is specified. If set to extension, then extensions of this type may not appear where it is used. If set to restriction, then restrictions of this type may not appear where it is used. If set to #all, then neither extensions nor restrictions of this type may appear where it is used.

final

Used to determine whether or not subtypes of the type can be defined in the schema. If set to extension, then extensions of this type may not be defined. If set to restriction, then restrictions of this type may not be defined. If set to #all, then neither extensions nor restrictions may be defined.

mixed

Can be set to true when mixed content (text interspersed among the child elements) is allowed; false when mixed content is prohibited. (The default is false.)

name

A name for the type, not a namespace-qualified name.

Contents

xs:annotation?, ( xs:simpleContent | xs:complexContent |
                  ( (xs:group | xs:all | xs:choice | xs:
                  sequence )?,
                  ( (xs:attribute | xs:attributeGroup)*,
                  xs:anyAttribute? ) ) )

The xs:complexType element is a key component for most schemas, allowing the creation of types that can be restricted or extended, as well as simpler things such as elements with attributes. The attributes define rules for the type, while the contents of the xs:complexType ...

Get XML Pocket Reference, 3rd Edition 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.