DocumentID: ECMA-376/Part1/11.2
Title: ECMA-376, Part1: 11.2 Package Structure
Extracted-From: ECMA-376 Office Open XML File Formats, 1st Edition / December 2006
Warning: Coverted to HTML format by a script known to have bugs

Navigation:

11.2 Package Structure

A WordprocessingML package shall contain a package-relationship item and a content-type item. The package-relationship item shall contain implicit relationships with targets of the following type:

The package-relationship item is permitted to contain implicit relationships with targets of the following type:

The required and optional relationships between parts are defined in §11.3 and its subordinate clauses.

[Example: The following package represents the minimal conformant WordprocessingML package as defined by this Standard:

First, the content type for relationship parts and the Main Document part (the only required part) must be defined (physically located at /[Content_Types].xml in the package):

<Types xmlns="...">
  <Default Extension="rels"
    ContentType="application/vnd.openxmlformats-
      package.relationships+xml"/>

  <Override PartName="/document.xml" 
    ContentType="application/vnd.openxmlformats-
      officedocument.wordprocessingml.document.main+xml"/>

</Types>

Next, the single required relationship (the package-level relationship to the Main Document part) must be defined (physically located at /_rels/.rels in the package):

<Relationships xmlns="...">
  <Relationship Id="rId1"
    Type="http://schemas.openxmlformats.org/officeDocument/2006/
      relationships/officeDocument"
    Target="document.xml"/>

</Relationships>

Finally, the minimum content for the Main Document part must be defined (physically located at /document.xml in the package):

<w:document xmlns:w="...">
  <w:body>
    <w:p/>
  </w:body>
</w:document>

end example]

[Example: Consider a WordprocessingML document that is an early draft of this Standard. Here's an example of the hierarchical folder structure that might be used for the ZIP items in the package for that document. As shown, one part, Main Document (stored in the ZIP item /word/document.xml), has its own relationship item:

/[Content_Types].xml Content-type item
/_rels/.rels Package-relationship item
/docProps/app.xml Application-Defined File Properties part
/docProps/core.xml Core File Properties part
/word/document.xml  Main Document part
/word/_rels/document.xml.rels Part-relationship item

/word/comments.xml Comment part
/word/endnotes.xml Endnotes part
/word/fontTable.xml Font Table part

/word/footer1.xml Footer parts
/word/footer2.xml
/word/footer3.xml
/word/footer4.xml

/word/footnotes.xml Footnotes part

/word/header1.xml Header parts
/word/header2.xml
/word/header3.xml
/word/header4.xml
/word/header5.xml
/word/header6.xml

/word/numbering.xml Numbering Definitions part
/word/settings.xml Document Settings part
/word/styles.xml Style Definitions part
/word/theme/theme1.xml Theme part

The package-relationship item contains the following:

<Relationships xmlns="...">
  <Relationship Id="rId3" 
    Type="http://.../extended-properties" Target="docProps/app.xml"/>

  <Relationship Id="rId2" 
    Type="http://.../core-properties" Target="docProps/core.xml"/>

  <Relationship Id="rId1" 
    Type="http://.../officeDocument" Target="word/document.xml"/>
</Relationships>

end example]


Converted to HTML format by ooxmlspec2html 0.1, a Perl script provided by OpenISO.org.