XML Schema annotation element

Definition and usage

The annotation element is a top-level element that specifies the annotations of the schema.

Note:Can include appinfo elements (information used by the application) and documentation elements (comments or text read or used by the user).

Element information

Item Description
Occurrence

Once in the parent element.

Parent element

Any element

Content appinfo, documentation

Syntax

<annotation
id=ID
any attributes
>
(appinfo|documentation)*
</annotation>

(* The symbol indicates that the element can appear zero or more times within the annotation element.)

Attribute Description
id Optional. The unique identifier of the element.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
  <xs:appInfo>CodeW3C.com Note</xs:appInfo>
  <xs:documentation xml:lang="en">
  This Schema defines a CodeW3C.com note!
  </xs:documentation>
</xs:annotation>
.
.
.
</xs:schema>