DocumentID: ECMA-376/Part1/11.3.9 Title: ECMA-376, Part1: 11.3.9 Header Part 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
|
Content Type: |
application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml |
|---|---|
|
Root Namespace: |
http://schemas.openxmlformats.org/wordprocessingml/2006/main |
|
Source Relationship: |
http://schemas.openxmlformats.org/officeDocument/2006/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 source relationship (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 this Standard:
A Header part shall not have any implicit or explicit relationships to other parts defined by this Standard.