Name

xs:extension(complex content) — Extension of a complex content model.

Synopsis

<xs:extension
           base          = xs:QName
           id            = xs:ID
           {any attributes with non-schema namespace}
           >
           Content: ((xs:annotation?), (, (xs:group | xs:all | xs:choice |
                      xs:sequence)?, ((xs:attribute | xs:attributeGroup)*,
                      xs:anyAttribute?)))
</xs:extension>

May be included in: xs:complexContent

Description

Extension of a complex (or mixed) content complex type. This derivation method can be applied to another complex content complex base type, and allows the addition of elements and attributes to this base type. The additional elements are added after the compositor used in the base type.

When new elements are added during a derivation by extension, the resulting content model is equivalent to creating a sequence that contains the compositor used to define the base type and the one included in the xs:extension element.

Restrictions

Complex types that use a xs:all compositor cannot be used as base types for derivations by extension, except when those extensions add only attributes.

New elements added to base types using a xs:choice compositor are added in sequence after the xs:choice, rather than as new choices.

Example

<xs:element name="character">
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="basePerson">
        <xs:sequence>
          <xs:element ref="qualification"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>

Attributes

base

Qualified name of the base type.

id

W3C XML Schema’s element ID.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.16.184