<xsd:annotation> Element
Defines an annotation.
<annotation
id = ID
{any attributes with non-schema Namespace}...>
Content: (appinfo | documentation)*
</annotation>
Attributes
id
The ID of this element. The id value must be of type ID and be unique within the document containing this element.Optional.
Element Information
Number of occurrences |
One time in parent element. |
Parent elements |
Any element |
Contents |
Remarks
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).
Example
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:annotation>
<xs:documentation>States in the Pacific Northwest of US
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value='WA'>
<xs:annotation>
<xs:documentation>Washington</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value='OR'/>
<xs:annotation>
<xs:documentation>Oregon</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value='ID'/>
<xs:annotation>
<xs:documentation>Idaho</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
Other Resources
For more information see the W3C XML Schema Part 1: Structures Recommendation at www.w3.org/TR/2001/REC-xmlschema-1-20010502\#element-all.