This documentation is archived and is not being maintained.

<xsd:complexContent> Element

Contains extensions or restrictions on a complex type that contains mixed content or elements only.

  id = ID 
  mixed = Boolean 
  {any attributes with non-schema Namespace}...>
Content: (annotation?,  (restriction | extension))


The ID of this element. The id value must be of type ID and be unique within the document containing this element.



An indicator of whether character data is allowed to appear between the child elements of this complexType element. The default is false.

This mixed attribute can override the mixed attribute value specified on the containing complexType element.


Number of occurrences

One time

Parent elements



Optional. annotation

Required. One and only one of the following elements: restriction (complexContent), or extension (complexContent).

The following example has a complex type, USAddress, that derives from another complex type, address, by extending the inherited type with two additional elements (state and zipcode).

<xs:complexType name="address">
   <xs:element name="name"   type="xs:string"/>
   <xs:element name="street" type="xs:string"/>
   <xs:element name="city"   type="xs:string"/>

 <xs:complexType name="USAddress">
   <xs:extension base="address">
     <xs:element name="state" type="USState"/>
     <xs:element name="zipcode" type="xs:positiveInteger"/>

For more information see the W3C XML Schema Part 1: Structures Recommendation at