next up previous
Next: <containers> Up: The Arboreal Docspecs System Previous: Introduction

Gross Structure of a Docspecs File

The root element of the docspecs file is <docspecs>. Any number of <doctype> elements may appear as children of <docspecs>. Each defines a single document type. The <doctype> element must have either a name attribute or both a name and an ns attribute. The values of these attributes allow Arboreal to select the appropriate doctype for a particular document when it is loaded. The name attribute is used to match the document's XML doctype, and the ns attribute is used to match a namespace URI. If the ns attribute is not given, then the namespace is not tested. If name is set to the null string, then any document whose default namespace is the same as the value of the ns attribute is matched. If name is set to the null string and ns is not defined, then any document is matched. If a document matches a doctype with a non-null name, then Arboreal uses that doctype. Null-named doctypes serve as defaults. The default docspecs file for Arboreal defines the default doctype as the Archimedes doctype.

Example 1: <doctype name="foo"> matches any document with the doctype foo.

Example 2: <doctype name="" ns="http://foo.bar.edu/1"> will match any document in the specified namespace.

Example 3: <doctype name=""> matches any document not matched by a more specific doctype.

If the doctype is not specified at the start of an XML document, then Arboreal tests the name of the root element against <name> instead.

The <doctype> element contains the following children:

All these elements are required, and they must appear in order given above. Each element is dealt with in a subsequent section of this document.


next up previous
Next: <containers> Up: The Arboreal Docspecs System Previous: Introduction
Malcolm D. Hyman 2003-10-09