2.1 Document Roots
A document root
element is the primary element of a document in OpenDocument format. It
contains the entire document. All types of documents, for example, text
documents, spreadsheets, and drawing documents use the same types of document
root elements.
The OpenDocument format supports the following two ways of
document representation:
�
As a single XML document.
�
As a collection of several subdocuments within a
package (see section 17), each of which stores part of the complete document.
Each subdocument has a different document root and stores a particular aspect
of the XML document. For example, one subdocument contains the style
information and another subdocument contains the content of the document. All
types of documents, for example, text and spreadsheet documents, use the same
document and subdocuments definitions.
There are four types of subdocuments, each with different
root elements. Additionally, the single XML document has its own root element,
for a total of five different supported root elements. The root elements are
summarized in the following table:
|
Root Element
|
Subdocument Content
|
Subdoc. Name in Package
|
|
<office:document>
|
Complete office document in a single XML document.
|
n/a
|
|
<office:document-content>
|
Document content and
automatic styles used in the content.
|
content.xml
|
|
<office:document-styles>
|
Styles used in the document
content and automatic styles used in the styles themselves.
|
styles.xml
|
|
<office:document-meta>
|
Document meta information,
such as the author or the time of the last save action.
|
meta.xml
|
|
<office:document-settings>
|
Application-specific
settings, such as the window size or printer information.
|
settings.xml
|
The definitions of the root elements described in the table
above are analogous to the definition of <office:document>,
except that the child element specification is suitably restricted.
<start>
<choice>
<ref
name="office-document"/>
<ref
name="office-document-content"/>
<ref
name="office-document-styles"/>
<ref
name="office-document-meta"/>
<ref
name="office-document-settings"/>
</choice>
</start>