Annotations (XSM)

Annotations allow you to add information about an XSD model. Annotations can be added at the schema level or on any element or other object within an XML model targeted with XSD.

Creating an Annotation

To create an annotation:
  • On the schema element - Open the Items or External Schemas tab in the property sheet of the model, and click the Add Annotation tool or right-click the model or package in the Browser, and select New > Annotation. You can add documentation and application information as necessary on the Items tab.
  • On any other object - Open the Annotations tab and click one of the following tools:

    Tool

    Description

    Add Documentation – to contain an URI reference or any well-formed XML content that gives extra information about XML objects or documents.
    Add Application Information - to contain an URI reference or any well-formed XML content that is used by applications for processing instructions.

Annotation Properties

The General tab contains the following properties:

Property

Description

ID [annotation] Specifies the ID of the object, which must be unique within the model.
Source [documentation and application information] Specifies the source of the content as a URI.

Language

[documentation] Specifies the language used in the documentation. For example: en, en-GB, en-US, de, fr.

The Content tab allows you to enter any well-formed XML content and the Preview tab (of the annotation or parent object) allows you to review the content within the appropriate tags. The following schema annotation contains a documentation element with well-formed XML content (an extract of a DTD file), and an appinfo element with a source URI: