by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)


Annotating Schemas

Table of Contents

13.1. Common Principles for Annotating RELAX NG Schemas
13.1.1. Annotation Using the XML Syntax
13.1.2. Annotations Using the Compact Syntax
13.1.3. Annotating Groups of Definitions
13.1.4. Alternatives and Workarounds
13.2. Documentation
13.2.1. Comments
13.2.2. RELAX NG DTD Compatibility Comments
13.2.3. XHTML Annotations
13.2.4. DocBook Annotations
13.2.5. Dublin Core Annotations
13.2.6. SVG Annotations
13.2.7. RDDL Annotations
13.3. Annotation for Applications
13.3.1. Annotations for Preprocessing
13.3.2. Annotations for Conversion
13.3.3. Annotations for Extension

RELAX NG annotations are elements and attributes from other namespaces that are incorporated into RELAX NG schemas. In Chapter 12, you learned how to use extensibility with schemas and instance documents. Up to now, we've been relying on elements and attributes whose syntax and meaning are precisely defined within the RELAX NG specification. Annotations provide a very different form of extensibility; you're creating extensions to the RELAX NG vocabulary itself.

The scope of applications based on annotations can be as wide as your imagination. To give your imagination a place to build, be aware that there are some common structures in the existing usage of schema annotation. There are annotations for documentation purposes, and there are annotations for applications. Within the category of annotations for applications, three more categories can be distinguished:

Armed with this glimpse of the possible, we need to explore the syntax for embedding annotations within RELAX NG schemas.


This text is released under the Free Software Foundation GFDL.