XML Documentation and Content Structure Markup Language (XDoc) 1.0

OpenMechanics.org Working Draft June 2002

Editor:
Ivan Mikushin, OpenMechanics / Ural State Technical University

Abstract

XDoc is a structural markup language for hierarchical organization of content in electronic publications. It can be used for building Web resources, composing electronic brochures and other authoring and content generating activities where a simple and consistent means of hierarchical structuring of information is needed.

Status

This document is being released for review by OpenMechanics.org members and other interested parties to encourage feedback and comments. The current state is that the basic model and syntax is very stable. Though some minor backwards compatible amendments are possible.

This is a public OpenMechanics.org Working Draft and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use OpenMechanics.org Working Drafts as reference material or to cite as other than “work in progress”.

A list of current OpenMechanics.org Specifications and other technical documents can be found at http://www.openmechanics.org/publications/.

Table of Contents

1. Introduction

XDoc is a simple yet powerful language for structuring documentation and other textual content expressed in XML [XML]. XDoc is useful as a structured content storage model for electronic publications. Usually, content manipulation applications will use additional layers on top of XDoc to provide presentation level services such as editing or browsing.

An XDoc publication is a hierarchical composition of parts (structural markup elements) containing subparts and content elements called infoblocks. Structure and content are orthogonal and can be manipulated separately. Infoblocks are XML elements in namespaces other than XDoc (XDoc namespace URI is “http://openmechanics.org/XDoc/1.0/”) or without any namespace.

Capabilities of XDoc elements, like in any other XML language, can be augmented with attributes from other XML namespaces. For example, to provide an XDoc publication with content linking capabilities, attributes described by [XLink] can be used.

XDoc grammar is formally described with XML Schema (see Appendix A. XML Schema for XDoc). Infoblock grammars can be defined by schemas corresponding to their respective XML namespaces.

1.1. Notational Conventions

  1. The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC-2119].

  2. The following namespace prefixes are used throughout this document:

    Prefix Namespace URI Description
    xd http://openmechanics.org/XDoc/1.0/ Namespace for the XDoc language
    xs http://www.w3.org/2001/XMLSchema Namespace for the XML Schema definition language



  3. This specification uses an informal syntax to describe the XML grammar of an XDoc publication:
    A formal definition of XDoc grammar is given in Appendix A. XML Schema for XDoc.

2. XDoc Publication Structure (Data Model)

An XDoc publication is conceptually a tree structure with nodes of two types — parts and infoblocks. The root of the tree is a part node. A part MAY contain infoblocks and other parts. Parts are structure nodes. Infoblocks are content nodes.

Informally XDoc publication structure may be represented as follows:

<xd:part id="xs:ID"? xml:lang="xs:language"? ...>
  <xd:name xml:lang="xs:language"? ...> xs:string </xd:name>*
  <!—infoblock -->*
  <xd:part ... />*
</xd:part>

				

Parts MAY have the following facets defined:

2.1. Information Set Mapping

XDoc grammar may be formulated in terms of XML Information Set [INFOSET].

A part node is created from an Element Information Item with namespace name property set to “http://openmechanics.org/XDoc/1.0/” and local name property set to “part”. Its attributes property MAY contain the following Attribute Information Items:

An Element Information Item representing a part node SHOULD have its children property contain the following Element Information Items in the following order:

An Element Information Item representing an XDoc publication’s root part node MUST NOT have its parent property set to an Element Information Item representing another part node.

A. XML Schema for XDoc (normative)

The XML Schema definition of XDoc is presented here as normative part of the specification.

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://openmechanics.org/XDoc/1.0/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://openmechanics.org/XDoc/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
  <element name="part">
    <complexType>
      <sequence>
        <element name="name" minOccurs="0" maxOccurs="unbounded">
          <complexType>
            <simpleContent>
              <extension base="string">
                <attribute ref="xml:lang" use="optional"/>
                <anyAttribute namespace="##other"/>
              </extension>
            </simpleContent>
          </complexType>
        </element>
        <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
        <element ref="xd:part" minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
      <attribute name="id" type="ID" use="optional"/>
      <attribute ref="xml:lang" use="optional"/>
      <anyAttribute namespace="##other"/>
    </complexType>
    <unique name="nameLang">
      <selector xpath="xd:name"/>
      <field xpath="@xml:lang"/>
    </unique>
  </element>
</schema>

				

B. References

INFOSET
XML Information Set, J. Cowan and R. Tobin, Editors. World Wide Web Consortium. 24 October 2001.
RFC-2119
RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels, S. Bradner, IETF. March 1997.
XLink
XML Linking Language (XLink) Version 1.0, Steve DeRose, Eve Maler, David Orchard, 2001. W3C Recommendation available at: http://www.w3.org/TR/xlink/.
XML
Extensible Markup Language (XML) 1.0, Second Edition, T. Bray, J. Paoli, C.M. Sperberg-McQueen and E. Maler, Editors. World Wide Web Consortium. 6 October 2000.
XML-NS
Namespaces in XML, T. Bray, D. Hollander and A. Layman, Editors. World Wide Web Consortium. 14 January 1999.
XML Schema Part 0: Primer
XML Schema Part 0: Primer - W3C Recommendation, World Wide Web Consortium, 2 May 2001.
XML Schema Part 1: Structures
XML Schema Part 1: Structures - W3C Recommendation, World Wide Web Consortium, 2 May 2001.
XML Schema Part 2: Datatypes
XML Schema Part 2: Datatypes - W3C Recommendation, World Wide Web Consortium, 2 May 2001.

C. Acknowledgements

This document is a result of collaborative effort of XDoc working group (in alphabetical order):


© 2002 - 2013 OpenMechanics.org
SourceForge Logo
OpenMechanics.org home