OpenOffice.org Registry Format
OpenOffice.org Registry Format (OOR)
Abstract
This document describes the registry format used for specifying, storing and updating configuration data for OpenOffice.org (OOo) components and applications. It is intended to demonstrate the concepts and facilities of the OOo Registry Format (OOR)and tries to give a quick understanding of how to write configuration schemas and how to use them for their components and applications.
It is a non-normative description targeted to application developers. The normative description of the format can be found at the appendices of this document containing the XMLSchema specifications of the OOR format.
| Revision | Date | Author | Comments |
|---|---|---|---|
| 0.1 | 28/11/01 | Dirk Grobler | Initial draft containing basic concepts |
| 0.2 | 02/12/01 | Dirk Grobler | New sections for advanced concepts, introducing node context and value nodes as common attribute content holder. |
| 0.3 | 12/12/01 | Dirk Grobler | Set elements added and description for Access Control |
| 0.4 | 19/12/01 | Dirk Grobler | Update format description added. |
| 0.5 | 18/01/02 | Dirk Grobler | Combining Update and Fragment format to one format. |
| 0.6 | 24/01/02 | Dirk Grobler | Proof reading, incorporate feedback |
| 0.7 | 12/03/02 | Dirk Grobler | Definition for set extended. New documentation elements like annotation and labels. |
| 0.8 | 19/03/02 | Dirk Grobler | Dropped the Merged Format to reduce complexity. Reintroduced the default node-type for set elements to ensure backward compatibility with the existing format. |
| 0.9 | 19/04/02 | Dirk Grobler | Proof reading |
| 0.9.1 | 28/04/02 | Dirk Grobler | Any datatype added for backward compatibility with old config format. |
| 0.9.2 | 06/05/02 | Dirk Grobler | Update format uses know only oor:node for referencing nodes in the schema. This handling is less error-prone and simpler to understand. |
| 0.9.3 | 25/07/02 | Dirk Grobler | Enriched the component schema by adding versioning and new info elements like author and a deprecated flag. |
| 0.9.4 | 11/20/02 | Joerg Barfurth | Dropped oor:context from Update format; instead now always using oor:package. Descrption adjusted for packages and the update format root node. |
| 0.9.5 | 02/14/03 | Joerg Barfurth | No xsi:nil in schema. Many editorial changes. Added future directions. Updated all schemas to current OOo state. |
| 0.9.6 | 05/22/03 | Joerg Barfurth | Renamed update format root element to component-data (for namespace-correctness); removed spurious nillable attributes from schemas. |
| 0.9.7 | 10-02-04 | Joerg Barfurth | Formatting and typos corrected. Eliminated preformatted lines of excessive length. |
| 0.9.8 | 10-02-04 | Joerg Barfurth | Misplaced 'oor:' prefixes in examples corrected. |
| 0.9.9 | 10-02-04 | Stephan Bergmann | Introduced oor:op="fuse". |
Introduction
There are plenty of file formats and protocols for storing and handling configuration data. There are industry standards like LDAP, binary registry formats, APIs like the JAVA Preferences API and many more. They are all based on the concept of storing key-value pairs and provide a hierarchy to organize these atomic entries.
It is not the intention of reinventing the wheel and providing yet another configuration format, instead of reusing an existing one. The intention is rather to have a format which is compatible to existing standards or allows, at least, an easy mapping to existing formats and also meets the requirements for the OpenOffice.org applications in their different environments. These requirements include:
- Availability on all supported platforms of OpenOffice.org,
- Capability of efficient storing and retrieval of thousands of configuration key-value pairs,
- Support for multiple backends, e.g. file-based or LDAP,
- Support for multiple layers with merging capabilities of default and user-defined settings,
- Human readable, which is important for product support,
- Easy to define and use for application developers.
The targeted audience for this document are application developers and architects, who need to know how to describe and compile an application configuration schema with OOR. Therefore this document is designed more like a Programmer's manual than a functional specification. After providing some background by describing the design principles in the first section, the following sections describe the concepts used by means of an example illustrating most of the facets of the registry document format. The appendices contain the XMLSchema definitions for the OOR format(s), which can be viewed as a reference specification.
Conceptual Framework
The OpenOffice.org Registry format is an XML based meta format. The format is divided into two sub-formats. One of the sub-formats is the Registry Component Schema Format. It defines reusable node types called Templates, and a default configuration hierarchy. The other one is the Registry Update Format, which is used to specify difference and store updates relative to a tree. The full meaning of such an update document only be discovered relative to a configuration schema. The schema document is specified in a way, that it can be provided by the developer or author of the schema and be used unchanged in any deployment. All things that vary between products, localizations, installations or users are specified in layer documents which employ the update format. There also is a virtual third sub-format, which can be used to describe the results of a merging process applied to a configuration schema and several layers of updates. This format is called the Registry Merged Format. It is virtual in that the XML Schema for this is not documented and there are currently no use cases where this format would be required. But if a means to store or transport merged configuration hierarchies is required, such a format can be constructed from the building blocks the current formats provide. This section provides a high-level description of the registry object model, which is the basic conceptual model for the registry document format, and of the OOR sub-formats themselves, which are derived from that model. The following table lists the XML namespaces used by the OOR format and their prefixes.
| Prefix | Description | Namespace |
|---|---|---|
| oor | For elements and attributes, that are particular to the OOR formats. | http://openoffice.org/2001/registry |
| xs | For elements and attributes, which are reused from the XMLSchema definition. | http://www.w3.org/2001/XMLSchema |
| xsi | For elements and attributes which are reused from the XMLSchema instance
definition. These elements and attributes are used only in the update format. |
http://www.w3.org/2001/XMLSchema-instance |
According to the schema definition for OOR, only root elements MUST have a namespace qualifier. All inner (local) elements don't use a qualifier as they are qualified within their context. Throughout the documentation, elements and attributes specified by OOR are not prefixed with the namespace qualifier. Only elements imported from other namespaces are qualified.
Registry Object Model
The Registry Object Model describes a hierarchical data structure. It offers two kinds of elements. On the one hand there are nodes, which combine related elements into logical groupings. On the other hand there are properties, which hold the actual data values. Nodes are the inner elements of the tree, while properties are the leaves of the tree.
All elements have a well-defined type. The type of a property corresponds directly to the type of data it can hold, while the type of a node depends (recursively) on the types of the child nodes and properties it contains and the way those are combined. A node type may be described in the schema as a separate named entity, called a template, or it may be implicit in the definition of a node. Templates allow reusing a type in multiple places in the schema and dynamic creation of nodes of a given type. The following kinds of elements can be used to build a configuration schema:
Properties
Properties, specified by <prop>tags, hold the actual data values. They must have one of a number of supported data types. The following basic data-types are supported: