idref attribute

Type:The id of an element in the document body
Inherited:no
Used By:pagenumber
Default:The current element

The idref attribute can optionally be used with the pagenumber element to specify that the pagenumber to be displayed is tha page containing that element. This is useful for a "table-of-contents" type of effect.

This creates a simple table-of-contents

<table>
  <tr><td>Chapter 1</td><td><pagenumber idref="chapter1"/></td></tr>
  <tr><td>Chapter 2</td><td><pagenumber idref="chapter2"/></td></tr>
</table>

<h1 id="chapter1">
<p>Contents of chapter one here</p>
<h1 id="chapter2">
<p>Contents of chapter two here</p>