To add an annotation to an XML schema, you add an xs:annotation element with an xs:appInfo as its child element, and any application specific elements under it.
This is an example of a Context annotation that is used to explain the various elements that occur as part of the annotations:
<xs:annotation> <xs:appinfo> <context xmlFeatureVersion="1.0" xmlns="http://www.teradata.com/xml"> <defaultDatabase>XMLTYPE_TEST</defaultDatabase> <defaultEncoding>ISO-8859-1</defaultEncoding> <rootElement ref="_customer_item_"/> <transaction> <operation type="insert"> <table name="CUSTDTL"> <column name="ID" ref="_customerID_item_" path="Customer/@ID"> <sqltype name="char"> <constraint name="length">9</constraint> </sqltype> </column> ... ... </xs:annotation>
The Context annotation is the most important annotation in the schema for defining how a document should be shredded. You add it as the first annotation under the xs:schema element in the root schema document that describes the XML documents to be shredded. The following sections describe some of the key components of the context annotation.