Defines an annotation.
<annotation id = ID {any attributes with non-schema Namespace}…> Content: (appinfo | documentation)* </annotation>
Optional.
Number of occurrences | One time in parent element. |
Parent elements | Any element |
Contents | 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: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>
XML Schema Reference (XSD) | XML Schema Elements
For more information, see the W3C XML Schema Part 1: Structures Recommendation at http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-annotation.