11.3.9 Header Part
Content Type:
Root Namespace:
Source Relationship:
application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
http://purl.oclc.org/ooxml/wordprocessingml/main
http://purl.oclc.org/ooxml/officeDocument/relationships/header
An instance of this part type contains the information about a header displayed for one or more sections.
A package shall contain zero or one Header part for each kind of header (first page, odd page, or even page) in each section of the document. Each Header part shall be the target of an explicit relationship from the Main Document (11.3.10) part or the Glossary Document (11.3.8) part.
[Example: The Main Document part-relationship item contains two relationships: one for the even header part (which is stored as the ZIP item header2.xml) and one for the odd header part (which is stored as the ZIP item header3.xml):
<Relationships xmlns="…">
<Relationship Id="rId89" Type="http://…/header" Target="header2.xml"/>
<Relationship Id="rId90" Type="http://…/header" Target="header3.xml"/>
</Relationships>
end example]
The root element for a Header part shall be hdr.
[Example:
<w:hdr xmlns:w="…" …>
…
</w:hdr>
end example]
The XML markup for a header in a section of a Main Document part involves the headerReference element in that section’s sectPr element.
[Example: Consider the case in which a section in the Main Document part contains odd and even headers, and an odd footer:
<w:body>
…
<w:sectPr w:rsidR="00363F31" w:rsidSect="008D4B40">
<w:headerReference w:val="rId89" w:type="default"/>
<w:headerReference w:val="rId90" w:type="even"/>
<w:headerReference w:val="rId91" w:type="first"/>
<w:type w:val="oddPage"/>
<w:pgSz w:w="11909" w:h="16834" w:code="9"/>
<w:pgMar w:top="1440" w:right="1152" w:bottom="1440"
w:left="1152" w:header="720" w:footer="720" w:gutter="0"/>
<w:lnNumType w:countBy="1"/>
<w:pgNumType w:fmt="lowerRoman"/>
<w:cols w:space="720"/>
</w:sectPr>
</w:body>
end example]
Each header has a corresponding hdr element in a Header part, which contains the text of the header.
[Example: Here is the even header corresponding to the examples above:
<w:hdr xmlns:w="…">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>My Test Document</w:t>
</w:r>
</w:p>
</w:hdr>
Here is the odd header corresponding to the examples above:
<w:hdr xmlns:w="…">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:tab/>
<w:t>Table of Contents</w:t>
</w:r>
</w:p>
</w:hdr>
end example]
A Header part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of the Relationship element shall be Internal).
A Header part is permitted to have explicit relationships to the following parts defined by ISO/IEC 29500:
- Alternative Format Import (11.3.1)
- Chart (14.2.1)
- Content Part (15.2.4)
- Diagrams: Diagram Colors(14.2.3), Diagram Data(14.2.4), Diagram Layout Definition(14.2.5) and
- Diagram Styles (14.2.6)
- Embedded Control Persistence (15.2.9)
- Embedded Object (15.2.10)
- Embedded Package (15.2.11)
- Hyperlinks (15.3).
- Images (15.2.14)
- Video (15.2.17)
A Header part shall not have any implicit or explicit relationships to other parts defined by ISO/IEC 29500.