J.Pietschmann wrote
Torsten Straube wrote:
I have a document with a first page that is different ( other header) from the other pages.
Everything is fine until I put a block on the first page
that contains a table that is to big to fit onto that first page.
FOP places the header of the first page on the following pages until it reaches a page that ist not generated from this block ( the one containing the table).
This should not happen. Can you post a small sample code demonstrating this behaviour?
Well the sample code is not really small :-(, but it followes here:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"><xsl:output encoding="ISO-8859-1"/>
<xsl:param name="locale" />
<!-- Druckdatum des Lieferscheins -->
<xsl:param name="print_date" /> <!-- note_type fuer Lieferschein oder Verwendungsnachweis -->
<xsl:param name="note_type">delivery-note</xsl:param> <!-- Parameter f�r die Seitengroesse der ersten Seite -->
<xsl:param name="first-page-height" >297mm</xsl:param>
<xsl:param name="first-page-width" >210mm</xsl:param>
<xsl:param name="first-page-margin-left" >20mm</xsl:param>
<xsl:param name="first-page-margin-right" >20mm</xsl:param>
<xsl:param name="first-page-margin-top" >12mm</xsl:param>
<xsl:param name="first-page-margin-bottom">6mm</xsl:param>
<xsl:param name="first-page-header-extend">32mm</xsl:param>
<xsl:param name="first-page-footer-extend">10mm</xsl:param> <xsl:param name="ruler-one">98mm</xsl:param>
<xsl:param name="ruler-two">57mm</xsl:param>
<!-- Parameter f�r die Seitengroesse der anderen Seiten --> <xsl:param name="page-height" >297mm</xsl:param> <xsl:param name="page-width" >210mm</xsl:param> <xsl:param name="margin-left" >30mm</xsl:param> <xsl:param name="margin-right" >25mm</xsl:param> <xsl:param name="margin-top" >15mm</xsl:param> <xsl:param name="margin-bottom">6mm</xsl:param> <xsl:param name="header-extend">15mm</xsl:param> <xsl:param name="footer-extend">10mm</xsl:param>
<!-- Parameter f�r den statischen Text -->
<xsl:param name="static-font-family">Helvetica</xsl:param>
<xsl:param name="static-font-size">10pt</xsl:param>
<xsl:param name="static-line-height">12pt</xsl:param>
<xsl:param name="static-space-before.optimum">6pt</xsl:param>
<xsl:param name="static-space-after.optimum">6pt</xsl:param> <!-- Parameter f�r Text -->
<xsl:param name="text-font-family">Helvetica</xsl:param>
<xsl:param name="text-font-size">10pt</xsl:param>
<xsl:param name="text-line-height">12pt</xsl:param>
<xsl:param name="text-space-before.optimum">0pt</xsl:param>
<xsl:param name="text-space-after.optimum">5pt</xsl:param> <!-- Parameter f�r Tabelle -->
<xsl:param name="table-indent">60px</xsl:param>
<xsl:param name="table-row-space-before.optimum">0pt</xsl:param>
<xsl:param name="table-row-space-after.optimum">6pt</xsl:param> <xsl:param name="table-header-font-family">Helvetica</xsl:param>
<xsl:param name="table-header-font-size">12pt</xsl:param>
<xsl:param name="table-header-line-height">14pt</xsl:param> <xsl:param name="table-cell-font-family">Helvetica</xsl:param>
<xsl:param name="table-cell-font-size">10pt</xsl:param>
<xsl:param name="table-cell-line-height">12pt</xsl:param>
<xsl:param name="usage-list-cell-line-height">60pt</xsl:param>
<xsl:param name="table-column-width-position">10mm</xsl:param>
<xsl:param name="table-column-width-article_id">20mm</xsl:param>
<xsl:param name="table-column-width-info">125mm</xsl:param><xsl:strip-space elements="customerorderitem name title"/>
<xsl:decimal-format
name="price-format"
decimal-separator=","
grouping-separator="."/>
<xsl:template match="customerorder"> <xsl:param name="note-type-string">text here</xsl:param> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="first" page-height="{$first-page-height}" page-width="{$first-page-width}" margin-top="{$first-page-margin-top}" margin-bottom="{$first-page-margin-bottom}" margin-left="{$first-page-margin-left}" margin-right="{$first-page-margin-right}" padding-after="0mm" end-indent="0mm">
<fo:region-before
region-name="xsl-region-before-first"
extent="{$first-page-header-extend}"/> <!-- fo:region-start
region-name="xsl-region-start-first"/ --> <fo:region-body
region-name="xsl-region-body-first"
margin-top = "{$first-page-header-extend}"
margin-bottom = "{$first-page-footer-extend}"
/> <fo:region-after
region-name="xsl-region-after"
extent="{$first-page-footer-extend}"
padding-after="0pt"
space-after="0pt"
display-align="after"
/>
</fo:simple-page-master>
<fo:simple-page-master master-name="list"
page-height="{$page-height}"
page-width="{$page-width}"
margin-top="{$margin-top}"
margin-bottom="{$margin-top}"
margin-left="{$margin-left}"
margin-right="{$margin-right}"> <fo:region-body
region-name="xsl-region-body-list"
margin-top = "{$header-extend}"
margin-bottom = "{$footer-extend}"/> <fo:region-before
region-name="xsl-region-before-list"
extent="{$header-extend}"/> <fo:region-after
region-name="xsl-region-after"
extent="{$footer-extend}"
padding-after="0pt"
space-after="0pt"
display-align="after"
/></fo:simple-page-master>
<fo:page-sequence-master master-name="note">
<fo:single-page-master-reference
master-reference="first"/> <fo:repeatable-page-master-reference
master-reference="list"/> </fo:page-sequence-master>
</fo:layout-master-set><fo:page-sequence master-reference="first">
<fo:static-content
flow-name="xsl-region-before-first"> <fo:block
font-family="{$static-font-family}"
space-after.optimum="18pt"
> <fo:table
table-layout="fixed"
start-indent="0pt"
end-indent="10pt"
>
<!-- Linker Block -->
<fo:table-column column-width="{$ruler-one}"/>
<!-- Rechter Block -->
<fo:table-column column-width="{$ruler-two}"/> <fo:table-body>
<fo:table-row
space-after.optimum="4pt"
> <fo:table-cell>
<!-- mit dem Classloader -->
<fo:block
font-family="{$static-font-family}"
font-size="9"
text-align="left"
><fo:external-graphic
height="18mm"
width="auto"src='url(resource://sweet.home.net/logo300dpi.gif)'/>
</fo:block> </fo:table-cell>
<fo:table-cell>
</fo:table-cell> </fo:table-row>
</fo:table-body>
</fo:table>
</fo:block></fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<xsl:call-template name="footer-block"/>
</fo:static-content><fo:flow flow-name="xsl-region-body-first">
<fo:block
font-family="{$static-font-family}"
>
<xsl:call-template name="address-block"/>
</fo:block>
<xsl:call-template name="content">
<xsl:with-param name="note-type-string"><xsl:value-of select="$note-type-string"/></xsl:with-param>
</xsl:call-template>
<fo:block
font-family="{$static-font-family}">
<!-- table with list -->
<xsl:apply-templates select="items">
<xsl:with-param name="project_id"><xsl:value-of select="project_id/text()"/></xsl:with-param>
<xsl:with-param name="project_name"><xsl:value-of select="project_name/text()"/></xsl:with-param>
</xsl:apply-templates>
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="list">
<fo:static-content
flow-name="xsl-region-before-list"> <fo:block
font-family="{$static-font-family}"
border-after-style="solid"
border-after-color="black"><fo:list-block
font-family="{$static-font-family}"
border-after-style="solid"
border-after-color="black"
>
<fo:list-item
font-family="{$static-font-family}"
border-after-style="solid"
border-after-color="black"
>
<fo:list-item-label>
<fo:block
id="A"
font-family="{$static-font-family}"
font-size="9"
text-align="left"
>Bestellung <xsl:value-of select="id/text()"/></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block
id="B"
font-family="{$static-font-family}"
font-size="9"
text-align="center"
><xsl:value-of select="$note-type-string"/></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
id="C"
font-family="{$static-font-family}"
font-size="9"
text-align="right"
><fo:page-number/></fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<xsl:call-template name="footer-block"/>
</fo:static-content><fo:flow flow-name="xsl-region-body-list">
<fo:block
font-family="{$static-font-family}"
>
<!-- xsl:apply-templates select="items">
<xsl:with-param name="project_id"><xsl:value-of select="project_id/text()"/></xsl:with-param>
<xsl:with-param name="project_name"><xsl:value-of select="project_name/text()"/></xsl:with-param>
</xsl:apply-templates -->
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root >
</xsl:template>
<xsl:template name="address-block">
<fo:table
table-layout="fixed"
start-indent="0pt"
end-indent="0pt">
<!-- Anschrift Empfaenger -->
<fo:table-column column-width="{$ruler-one}"/>
<!-- Anschrift Lieferant -->
<fo:table-column column-width="{$ruler-two}"/> <fo:table-header>
<fo:table-row
space-after.optimum="4pt"> <fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="6pt"
line-height="10pt"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
text-align="left"
>Adresse hier</fo:block>
</fo:table-cell> <fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="6pt"
line-height="10pt"
font-style="normal"
font-weight="bold"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
text-align="left"
>URI hier</fo:block>
</fo:table-cell> </fo:table-row>
</fo:table-header> <fo:table-body>
<fo:table-row
space-before.optimum="5pt"> <fo:table-cell keep-with-next="always">
<!-- Die Rechnungsadresse --><fo:block
font-family="{$static-font-family}"
font-size="10pt"
line-height="14pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
><!-- xsl:value-of select="invoice_address/business_partner"/ --></fo:block>
<xsl:if test="invoice_address/department">
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
line-height="14pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
><xsl:value-of
select="invoice_address/department"/></fo:block>
</xsl:if><fo:block
font-family="{$static-font-family}"
font-size="10pt"
line-height="14pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
><xsl:value-of select="invoice_address/salutation_name/text()"/><xsl:text> </xsl:text>
<xsl:value-of select="person/first_name/text()"/><xsl:text> </xsl:text>
<xsl:value-of select="person/name/text()"/></fo:block>
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
line-height="14pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="10pt"
><xsl:value-of select="invoice_address/street/text()"/><xsl:text> </xsl:text><xsl:value-of select="invoice_address/address_extension/text()"/></fo:block>
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
line-height="14pt"
text-align="left"
><xsl:value-of select="invoice_address/zip_code"/><xsl:text> </xsl:text><xsl:value-of select="invoice_address/city"/></fo:block>
</fo:table-cell>
<fo:table-cell keep-with-next="always">
<!-- Die Rechnungsadresse --> <fo:block
font-family="{$static-font-family}"
font-size="8pt"
line-height="10pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
>Strasse und Hausnummer</fo:block> <fo:block
font-family="{$static-font-family}"
font-size="8pt"
line-height="10pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
>Telefon </fo:block> <fo:block
font-family="{$static-font-family}"
font-size="8pt"
line-height="10pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
>Telefax </fo:block> <fo:block
font-family="{$static-font-family}"
font-size="8pt"
line-height="10pt"
text-align="left"
space-before.optimum="{$static-space-before.optimum}"
space-after.optimum="{$static-space-after.optimum}"
>E-Mail </fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell/>
<fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="14pt"
text-align="left"
space-after.optimum="20mm"
></fo:block>
</fo:table-cell>
</fo:table-row> <fo:table-row
space-before.minimum="30mm"
space-after.optimum="15mm"><fo:table-cell/>
<fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
text-align="left"
>Ort, den <xsl:value-of
select="$print_date"/></fo:block>
</fo:table-cell>
</fo:table-row><fo:table-row >
<fo:table-cell/>
<fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="14pt"
text-align="left"
space-after.optimum="14mm"
></fo:block>
</fo:table-cell>
</fo:table-row><fo:table-row>
<fo:table-cell>
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
text-align="left"
space-before.minimum="20mm"
space-after.optimum="4mm"
></fo:block>
</fo:table-cell><fo:table-cell/>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template name="content"> <xsl:param name="note-type-string"/>
<fo:block
font-family="{$static-font-family}"
font-size="10pt"
text-align="left"
space-after.optimum="10mm"
>
some text here
</fo:block>
</xsl:template> <xsl:template match="items">
<xsl:param name="project_id"/>
<xsl:param name="project_name"/> <fo:table
table-layout="fixed"
>
<!-- Position -->
<fo:table-column column-width="{$table-column-width-position}"/>
<!-- interne Objekt Id -->
<fo:table-column column-width="{$table-column-width-article_id}"/>
<!-- Titel / Rechte / Memo / Projekt -->
<fo:table-column column-width="{$table-column-width-info}"/> <fo:table-header
>
<fo:table-row
space-before="4pt"
space-after="4pt"
> <fo:table-cell>
<fo:block
font-family="{$table-header-font-family}"
font-size="{$table-header-font-size}"
line-height="{$table-header-line-height}"
text-align="left"
space-before.optimum="{$table-row-space-before.optimum}"
space-after.optimum="{$table-row-space-after.optimum}"
>Pos</fo:block>
</fo:table-cell> <fo:table-cell>
<fo:block
font-family="{$table-header-font-family}"
font-size="{$table-header-font-size}"
line-height="{$table-header-line-height}"
text-align="left"
space-before.optimum="{$table-row-space-before.optimum}"
space-after.optimum="{$table-row-space-after.optimum}"
>Bild-Nr.</fo:block>
</fo:table-cell> <fo:table-cell>
<fo:block
font-family="{$table-header-font-family}"
font-size="{$table-header-font-size}"
line-height="{$table-header-line-height}"
text-align="center"
space-before.optimum="{$table-row-space-before.optimum}"
space-after.optimum="{$table-row-space-after.optimum}"
>Titel / Rechte </fo:block>
</fo:table-cell> </fo:table-row>
</fo:table-header> <fo:table-body>
<xsl:for-each select="customerorderitem[business_object_id]" >
<xsl:sort
select="position_no"
order="ascending"/><fo:table-row >
<fo:table-cell keep-with-next="always">
<fo:block
font-family="{$table-cell-font-family}"
font-size="{$table-cell-font-size}"
line-height="{$table-cell-line-height}"
text-align="left"
><xsl:number
value="position_no/text()"/></fo:block></fo:table-cell><fo:table-cell keep-with-next="always">
<fo:block
font-family="{$table-header-font-family}"
font-size="{$table-header-font-size}"
line-height="{$table-header-line-height}"
text-align="left"
space-before.optimum="{$table-row-space-before.optimum}"
space-after.optimum="{$table-row-space-after.optimum}"
><!-- xsl:value-of select="businessobject/id/text()"/ -->
<xsl:call-template name="thumbnail">
<xsl:with-param name="url">url(adam://fop.image/file/42)</xsl:with-param>
</xsl:call-template>
</fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>
<fo:table-row
space-after.minimum="12pt"
>
<fo:table-cell
number-columns-spanned="3"
>
<fo:block
font-family="{$table-cell-font-family}"
font-size="12pt"
text-align="left"
space-after="12pt"
> </fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each> </fo:table-body> </fo:table> </xsl:template>
<!-- Footer der ersten Seite -->
<xsl:template name="footer-block">
</xsl:template> <xsl:template match="transmission">
</xsl:template> <!-- Erzeugt ein external Graphic Object fuer die Thumbnails -->
<xsl:template name="thumbnail">
<xsl:param name="url"/> <fo:external-graphic
height="18mm"
width="auto"
src="{$url}"/>
</xsl:template></xsl:stylesheet>
--
_________________________________________________________ Torsten Straube * picturesafe media/data/bank GmbH L�erstr. 3 * D-30175 Hannover * phone: 0511/85620-53 fax: 0511/85620-10 * mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
