DocumentID: ECMA-376/Part3/2.11.3
Title: ECMA-376, Part3: 2.11.3 Headers and Footers
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

Navigation:

2.11.3 Headers and Footers

As described above, header and footer information is stored in one or more header or footer parts within the package.

The hdr element defines a single header for the document, while the ftr element defines a single footer for the document. Headers and footers are just another document story in WordprocessingML. Within the root element of the header or footer, the content of the element is similar to the content of the body element, and contains what is referred to as block-level markup --markup that can exist as a sibling element to paragraphs in a WordprocessingML document.

Within each section of a document there can be up to three different types of headers and footers:

First page headers and footers specify a unique header or footer that shall appear on the first page of a section. Odd page headers and footers specify a unique header and footer that shall appear on all odd numbered pages for a given section. Even page headers and footers specify a unique header and footer that shall appear on all even numbered pages in a given section.

Different headers or footers can be useful for bounded documents like books, as shown in the figure below.

image12

Consider the following simple one-page document with one header:

image13

This document defines one header with the text Header. The header's content is stored in a unique Header part. The resulting header is represented by the following WordprocessingML:

<w:hdr>
  <w:p>
    <w:r>
      <w:t>Header</w:t>
    </w:r>
  </w:p>
</w:hdr>

Since headers are containers of block level contents, all block level contents can be used within them. In this particular example, the content is a single paragraph.

Consider a more complex three-page document with different first, odd, and even page headers defined:

image14

This document defines three headers stored in three different header parts. The resulting headers are represented by the following WordprocessingML:

First page header part:

<w:hdr>
  <w:p>
    <w:r>
      <w:t>First</w:t>
    </w:r>
  </w:p>
</w:hdr>

Even page header part:

<w:hdr>
  <w:p>
    <w:r>
      <w:t>Even</w:t>
    </w:r>
  </w:p>
</w:hdr>

Odd page header part:

<w:hdr>
  <w:p>
    <w:r>
      <w:t>Odd</w:t>
    </w:r>
  </w:p>
</w:hdr>


Converted to HTML format by ooxmlspec2html 0.1, a Perl script provided by OpenISO.org.