XML Schema Guidelines

All Zelestra XML schemas follow the following guidelines:

Namespace

Namespace designations consist of the URL prefix "http://www.zelestra.org/schemas/2001/", plus the name of the schema. This URL is to point to a web page that describes the schema.

Example
http://www.zelestra.org/schemas/2001/UserDefinition.

Schema Location

The schema location consists of the namespace designation as a URL prefix, plus the name of the schema file.

Example
http://www.zelestra.org/schemas/2001/UserDefinition/UserDefinition.xsd.

URI and Modified Attributes

All XML documents that use a URI as an internet-wide unique identifier have an uri attribute of the root element that contains the URI of the document. In addition the root element has a modified attribute, which is the time that the document was last modified in Coordinated Universal Time (UTC). This value MUST be the same as the actual last modified time (UTC) of the document pointed to by the uri attribute. This allows clients and servers to periodically check for updates of the document.

Tag Naming

Element tags use UpperCamelCase. This is a capitalization pattern where initial letters of all words are capitalized and no separators are used. Attribute tags used lowerCamelCase. This is a capitalization pattern where the initial letter of the first word is lowercase and the initial letters of all other words are uppercase and no separators are used. Abbreviations are to be avoided. When abbreviations are used, they are in all uppercase, unless they are the first word of an attribute.

Elements vs. Attributes

Use elements to represent a piece of information that can be considered an independent object and when the information is related via a parent/child relationship to another piece of information. Use elements when data incorporates strict typing or relationship rules. Use elements when the data may need multiple instances or have attributes of their own in the future. Use attributes primarily for metadata (data about data) and any information "left over" after defining the objects that have relationships to other objects. An element may have an xml:lang attribute when its content is localized. An element may have an xml:id attribute for unique identification within the XML document.

Constrain First, Loosen Later

Initial schema implementations are strictly constrained. Loosening of schema constraints should come later as requirements dictate. This practice ensures that schemas are clearly understood and interpreted across all implementations.