XML Schema complexContent
Element
Definition and Usage
The complexContent
element defines extensions or restrictions on a complex type that contains mixed content or elements only.
Element Information
- Parent element:
complexType
Syntax
(? symbol indicates the element can appear zero or one time within the complexContent
element.)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element. |
mixed | Optional. Specifies whether character data is allowed to appear between the child elements of this complexType element. The default value is false. |
any attributes | Optional. Specifies any other attributes with non-schema namespaces. |
Example 1
The following example defines a complex type "fullpersoninfo", which is derived from another complex type "personinfo" by extending it with three additional elements:
In the example above, the "employee" element must contain the following elements in order: "firstname", "lastname", "address", "city", and "country".