11.2 Package Structure
A WordprocessingML package shall contain a package-relationship item and a content-type item. The package- relationship item shall have implicit relationships with targets of the following type:
- One Main Document part (11.3.10)
The package-relationship item
is permitted to
have
implicit relationships with targets of the following type:
- Digital Signature Origin (15.2.7)
- File Property parts (15.2.12) (Application-Defined File Properties,
- Properties), as appropriate.
- Thumbnail (15.2.16).
Core File Properties, and Custom
The required and optional relationships between parts are defined in 16.1 and its subordinate clauses.
File
[Example: The following package represents the minimal conformant WordprocessingML package as defined by ISO/IEC 29500:
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="http://schemas.openxmlformats.org/package/2006/content-types">
<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://purl.oclc.org/ooxml/officeDocument/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 ISO/IEC 29500. 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]