I have a huge xml file. And it's being transformed to html table with xsl. In browser it's a single page with vertical scrollbar.
But when I want to print the document I can see about 10 pages. I want to add table headers to every printed page.
Sample xml:
<page>
<document>
<id>100</id>
<name>SomeName</name>
<date>02.02.2009</date>
</document>
...
</page>
And xsl for it:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/page">
<table border="1">
<tr>
<th>Id</th><th>Name</th><th>Date</th> <!-- I want to see this on every page -->
</tr>
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="document">
<tr>
<td>
<xsl:value-of select="id"/>
</td>
<td>
<xsl:value-of select="name"/>
</td>
<td>
<xsl:value-of select="date"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
I'm thinking about XSL-FO as an instrument to print headers on every page but as I understand it's not supported by browsers and we need some special software to process XSL-FO documents.
So, what is the correct way to add headers to the print version of a web-page?