XML Schema complexType Element
Complete XML Schema Reference Manual
Definition and Usage
The complexType element defines a complex type. Elements of a complex type are XML elements that contain other elements and/or attributes.
Element Information
- Parent elements: element, redefine, schema
Syntax
id=ID name=NCName abstract=true|false mixed=true|false block=(#all|list of (extension|restriction)) final=(#all|list of (extension|restriction)) any attributes (annotation?,(simpleContent|complexContent|((group|all| choice|sequence)?,((attribute|attributeGroup)*,anyAttribute?)))) (The ? symbol declares that within the complexType element, the element can appear zero or one time; the * symbol declares that the element can appear zero or more times.) Optional. Specifies whether character data is allowed to appear between the child elements of the complex type. The default is false. Optional. Prevents complex types with the specified derivation from being used to substitute for this complex type. The value can contain #all or a list that is a subset of extension or restriction: Optional. Prevents the specified types from being derived from this complexType element. The value can contain #all or a list that is a subset of extension or restriction. The example below has a complex type element named "note": In the example below there is a complex type "fullpersoninfo", derived from another complex type "personinfo" by extending the inherited type with three additional elements (address, city, and country): In the example above, the "employee" element must contain the following elements in order: "firstname", "lastname", "address", "city", and "country".
property
Description
id
Optional. Specifies a unique ID for the element.
name
Optional. Specifies the name of the element.
abstract
Optional. Specifies whether the complex type can be used in the instance document. If the value is true, the element cannot use the complex type directly, but must use a complex type derived from it. The default is false.
mixed
| | final |
| | *any attributes* | Optional. Specifies any other attributes with a non-schema namespace. |
Example 1
Example 2
Complete XML Schema Reference Manual