Share via

<xsd:annotation> Element

Defines an annotation.

  id = ID 
  {any attributes with non-schema Namespace}...>
Content: (appinfo | documentation)*


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


Element Information

Number of occurrences

One time in parent element.

Parent elements

Any element


appinfo, documentation


An annotation can contain appinfo elements (information to be used by applications) and documentation elements (comments or text to be read or used by users).


The following example uses annotation and documentation elements to document a simple type and the enumerations that make up its definition.

<xs:simpleType name="northwestStates">
        <xs:documentation>States in the Pacific Northwest of US
  <xs:restriction base="xs:string">
    <xs:enumeration value='WA'>
    <xs:enumeration value='OR'/>
    <xs:enumeration value='ID'/>

Other Resources

For more information see the W3C XML Schema Part 1: Structures Recommendation at\#element-all.

See Also


XML Schemas (XSD) Reference
XML Schema Elements