Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema complexContent Element

XML Schema complexContent Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The complexContent element defines extensions or restrictions of complex types (containing mixed content or elements only).

Element Information

Syntax

id=ID

mixed=true|false

any attributes

(annotation?,(restriction|extension))

(The ? symbol declares that the element can appear zero or one time within the complexContent element.)

property 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 is false.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

In the example below there is a complex type "fullpersoninfo", which is derived from another complex type "personinfo" by extending the inherited type with three additional elements:

  xs:sequence

    

    

  

  xs:complexContent

    

      xs:sequence

        

        

        

      

    

  

In the example above, the "employee" element must contain the following elements in order: "firstname", "lastname", "address", "city", and "country".


XML Schema Reference Manual Complete XML Schema Reference Manual