Name
xs:complexType
Synopsis
<xs:complexType abstract = "( true |false
)" block = "( #all | extension | restriction )" final = "( #all | extension | restriction )" id = "ID
" mixed = "( true |false
)" name = "NCName
" > <!-- ( xs:annotation?, (xs:simpleContent | xs:complexContent | ((xs:group | xs:all | xs:choice | xs:sequence)?, ((xs:attribute | xs:attributeGroup)*, xs:anyAttribute?)))) --> </xs:complexType>
The xs:complexType
element defines a new complex type, that is, an element type that
can potentially contain child elements, attributes, or both. The
valid child elements and attributes for elements of this type are
specified by the contents of the xs:complexType
element. The mixed
attribute specifies whether the
complex type is allowed to contain text interspersed with its
child elements. If the xs:complexType
element is a top-level
element, then it has a name
attribute and defines a named type. Otherwise, if the xs:complexType
element appears inside an
xs:element
element, then it
does not have a name
attribute
and defines an anonymous type for that element alone.
If the abstract
attribute
has the value true
, then no
elements of this type can be included in instance documents—only
elements of subtypes derived from this type, which are marked as
elements of the subtype by an xsi:type
attribute, can be included. If
the final
attribute has the
value restriction
, then this
type cannot be subtyped by restriction. If the final
attribute has the value extension
, then this type cannot ...
Get XML in a Nutshell, 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.