Subsections


4. DTD Structure

This section discusses how the DTD itself is organized. This is mostly of interest to the maintainers of XBEL and any descendent document types that may be defined in the future.


4.1 Use of Parameter Entities

Limited use of parameter entities is made in the XBEL DTD. The suffix-notation is adopted from the ``XMLspec'' DTD report [Mal98]. Specifically, the ".mix" suffix is used for entities which define repeatable-or groups of elements, and ".att" is used for entities which define attributes.


4.1.1 The %nodes.mix; Entity

The %nodes.mix; entity lists the element types which may be used to form the nodes of the hierarchical data structure described by an XBEL instance. This entity species a mixture of <bookmark>, <folder>, <separator> and <alias> elements.


4.1.2 The %node.att; Entity

This entity is used to define attributes for element types which hold the real content of the bookmark data. It is used on the <bookmark> and <folder> elements. It defines the optional added and id attributes.


4.1.3 The %url.att; Entity

This entity defines the attributes which are available on elements which refer to specific resources. In XBEL 1.0, this is only used on the <bookmark> element. It defines a required href attribute and the optional attributes modified and visited.


4.2 Extending the DTD

Extensibility of XBEL relies on three foundations: XML namespaces and the acceptability of well-formed instances, localized parameters entities, and the simplicity of the DTD itself.

The primary expectation for DTD extensions is that new elements and attributes will be introduced and defined using XML namespaces. Though still in the stage of a working draft within the W3C, namespaces offer the most flexible extension mechanism available for XML-based markup languages used in wide-spread deployment. Until validation requirements in the context of namespaces are more clearly defined, XBEL instances using namespaces can apply well-formedness rules as a vehicle for partial validation.

More traditional document type extension uses parameter entities reserved for localization. The XBEL public text provides three such entities as ``hooks'' to allow local customization. For each of the parameter entities described in Section 4.1, ``Use of Parameter Entities,'' a %local.name; variant is declared and used in the definition of each of the entities described above. This is less flexible than the namespace approach, but allows a new document type to be created which can be used for validation with current tools without having to create a new public text from scratch.

The third foundation for extensibility, the simplicity of the DTD, can be effectively used only by taking a ``steal this code'' approach to reuse. XBEL is sufficiently simple that it can easily be understood in its entirety, and a variant document type created by crafting a new public text.


4.3 General Entities

The XBEL DTD defines no general entities.

Rationale

Since XBEL is intended as an interchange format for software and not as an authoring format, there is no need to support typical entities used to enter special characters. Entities which do not correspond to Unicode characters are too application-specific to predict meaningfully [UC96,UC98].