Name

xs:extension

Synopsis

<xs:extension
  base = "QName"
  id = "ID">
  <!-- (xs:annotation?,
       ((xs:group | xs:all | xs:choice | xs:sequence)?,
       ((xs:attribute | xs:attributeGroup)*, xs:anyAttribute?))) -->
</xs:extension>

The xs:extension element is used inside xs:simpleContent and xs:complexContent elements to derive a new complex type that adds attributes and/or child elements not present in the base type. The base type being extended is given by the value of the base attribute. The child elements and attributes added to the base type’s content model are specified by the content of the xs:extension element. An instance of such an extended type must have all the child elements required by the base type followed by all the child elements required in the xs:extension.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.