Stylus Studio XML Editor

Table of contents

Appendices

3.13 Annotations

Annotations

Annotations provide for human- and machine-targeted annotations of schema components.

NOTE: 
<xs:simpleType fn:note="special">
  <xs:annotation>
   <xs:documentation>A type for experts only</xs:documentation>
   <xs:appinfo>
    <fn:specialHandling>checkForPrimes</fn:specialHandling>
   </xs:appinfo>
  </xs:annotation>
     

XML representations of three kinds of annotation.

The Annotation Schema Component[top]

The Annotation Schema Component

The annotation schema component has the following properties:

[Annotation Components]

[user_information] is intended for human consumption, [application_information] for automatic processing. In both cases, provision is made for an optional URI reference to supplement the local information, as the value of the source attribute of the respective element information items. valid does not involve dereferencing these URIs, when present. In the case of [user_information], indication should be given as to the identity of the (human) language used in the contents, using the xml:lang attribute.

[attributes] ensures that when schema authors take advantage of the provision for adding attributes from namespaces other than the XML Schema namespace to schema documents, they are available within the components corresponding to the element items where such attributes appear.

Annotations do not participate in valid as such. Provided an annotation itself satisfies all relevant Schema Component Constraint it cannot affect the valid of element information items.

XML Representation of Annotation Schema Components[top]

XML Representation of Annotation Schema Components

Annotation of schemas and schema components, with material for human or computer consumption, is provided for by allowing application information and human information at the beginning of most major schema elements, and anywhere at the top level of schemas. The XML representation for an annotation schema component is an [annotation] element information item. The correspondences between the properties of that information item and properties of the component it corresponds to are as follows:

[The Annotation Schema Component]

The annotation component corresponding to the [annotation] element in the example above will have one element item in each of its [user_information] and [application_information] and one attribute item in its [attributes].

Constraints on XML Representations of Annotations[top]

Constraints on XML Representations of Annotations Annotation Definition Representation OK

In addition to the conditions imposed on [annotation] element information items by the schema for schemas, the corresponding annotation must satisfy the conditions set out in [Constraints on Annotation Schema Components].

Annotation Validation Rules[top]

Annotation Validation Rules

None as such.

Annotation Information Set Contributions[top]

Annotation Information Set Contributions

None as such: the addition of annotations to the post-schema-validation infoset is covered by the post-schema-validation infoset contributions of the enclosing components.

Constraints on Annotation Schema Components[top]

Constraints on Annotation Schema Components

All annotations (see [Annotations]) must satisfy the following constraint.

Annotation Correct

The values of the properties of an annotation must be as described in the property tableau in [The Annotation Schema Component], modulo the impact of [Missing Sub-components].