Thanks to the input from the honorable fop-user's and the posting
http://www.biglist.com/lists/xsl-list/archives/200212/msg00917.html I
managed to put something together.
To make the thread complete here is the Perl script to generate the XML
(again, you might has to change the first line of table.pl
(#!/usr/local/bin/perl)) and a XSL stylesheet generating multiple page
sequences. The pages are numbered, I was suprised that the numbering works
without tampering the initial-page-number...
Regards,
Anders Malmborg
----------------------- table.pl -------------------------------------
#!/usr/local/bin/perl
use strict;
if ($#ARGV != 0) {
die "Usage $0 positions \n";
}
open POS, ">table.xml" or die $!;
print POS '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
print POS "<table>\n";
for (my $i = 0;$i < $ARGV[0];$i++) {
print POS "<pos><nr>$i</nr><desc>Position$i</desc></pos>\n";
}
print POS "</table>\n";
close POS;
---------------------------------------------------------------------
----------------------- table.xsl -------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:variable name="pos_in_set" select="'20'"/>
<xsl:template match="table">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4-Portrait"
page-width="210mm" page-height="297mm"
margin-top="1.2cm" margin-bottom="1cm"
margin-left="1cm" margin-right="1cm">
<fo:region-body margin-top="2cm" margin-bottom="2cm"/>
<fo:region-after extent="2cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="repA4">
<fo:repeatable-page-master-reference master-reference="A4-Portrait"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<xsl:for-each select="pos[position() mod $pos_in_set = 1]">
<fo:page-sequence master-reference="repA4" font-family="Helvetica"
font-size="8pt">
<fo:static-content flow-name="xsl-region-after"
font-family="Helvetica" font-size="8pt" font-weight="normal"
text-align="right">
<fo:block font-size="8pt">
Seite <fo:page-number />
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" text-align="right" >
<fo:table-column column-width="50mm"/>
<fo:table-column column-width="50mm"/>
<fo:table-body>
<xsl:for-each select=".|following::pos[position() <
$pos_in_set]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
</fo:root>
</xsl:template>
<xsl:template match="pos">
<fo:table-row >
<fo:table-cell>
<fo:block>
<xsl:value-of select="./nr"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:value-of select="./desc"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]