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:

  • One Main Document part (§11.3.10)

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

  • Digital Signature Origin (§15.2.6)

  • File Property parts (§15.2.11) (Application-Defined File Properties, Core File Properties, and Custom File Properties), as appropriate.

  • Thumbnail (§15.2.14).

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

example:

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>
example:
/[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>