11.6 Master Documents and Subdocuments

11.6 Master Documents and Subdocuments

Source Relationship:

http://purl.oclc.org/ooxml/officeDocument/relationships/subDocument

A master document shall be represented by an instance of a WordprocessingML document whose Main Document (11.3.10) part targets each of that master document’s subdocuments.

[Rationale: Sometimes, it is convenient to deal with a document as a collection of pieces, especially when those pieces might be edited by different authors in a collaborative group. Perhaps it simply makes sense to think about a book as a collection of chapters rather than as one big document. The breaking-up of a document into such pieces can be achieved by having a master document with one or more subdocuments. end rationale]

[Example: Consider a master document, whose three subdocuments are called Start, Middle, and End, respectively. Master’s Main Document part has a corresponding relationships part that contains the following, in which Start.docx, Middle.docx, and End.docx are packages containing the corresponding subdocuments:

<Relationships xmlns="…">
  <Relationship Id="rId5"
    Type="http://…/subDocument"
    Target="Start.docx" TargetMode="External"/>
  <Relationship Id="rId6"
    Type="http://…/SubDocument"
    Target="Middle.docx" TargetMode="External"/>
  <Relationship Id="rId7"
    Type="http://…/SubDocument"
    Target="End.docx" TargetMode="External"/>
</Relationships>

The master document’s Main Document part contains subDoc elements that reference its subdocuments:

<w:document xmlns:r="…" xmlns:w="…" >
  <w:body>
    <w:p >
      <w:pPr>
      </w:pPr>
    </w:p>
    <w:subDoc r:id="rId5"/>
    <w:subDoc r:id="rId6"/>
    <w:subDoc r:id="rId7"/>
  </w:body>
</w:document>

end example]

A subdocument shall be represented by an instance of a WordprocessingML package.

A subdocument shall be located external to the package containing the relationships part (expressed syntactically, the TargetMode attribute of the Relationship element shall be External).

Last updated on