You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Naftali van der Loon <nv...@worldonline.nl> on 2000/07/26 12:19:54 UTC
how to align fo:inline-graphic in static content?
dear developers,
I'm trying to make a document with several headers, The header of the first
page
has several tables and there's a fo:inline-graphic in a block in a cell. I
defined a second header (with fo:static-content) and this works fine. BUT..
if I
try to copy the contents of the first header in the second one de parser
hangs.
if I remove the fo:inline-graphic out of the second header it works fine!.
here's my xsl
-------------------------------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.1">
<xsl:template match="offerte">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master page-master-name="first"
page-height="29.7cm" page-width="21cm"
margin-top="1cm"
margin-bottom="0.5cm"
margin-left="1.5cm"
margin-right="1.0cm">
<fo:region-before extent="5cm"/>
<fo:region-body margin-top="5cm"/>
<fo:region-after extent="1cm"/>
</fo:simple-page-master>
<fo:simple-page-master page-master-name="rest"
page-height="29.7cm" page-width="21cm"
margin-top="1cm"
margin-bottom="0.5cm"
margin-left="1.0cm"
margin-right="1.0cm">
<fo:region-before extent="5cm"/>
<fo:region-body margin-top="5cm"/>
<fo:region-after extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence>
<fo:sequence-specification>
<fo:sequence-specifier-single page-master-name="first"/>
</fo:sequence-specification>
<fo:static-content flow-name="xsl-before">
<fo:block font-size="9pt" font-family="Courier" line-height="12pt">
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="7.5cm"/>
<fo:table-column column-width="1.8cm"/>
<fo:table-column column-width="7cm"/>
<fo:table-column column-width="1cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="10pt">
<fo:table-cell>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="start"><xsl:value-of
select="dl/naam"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="start">Uw assurantieadviseur:</fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/naam"/></fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="6.2cm"/>
<fo:table-column column-width="3.1cm"/>
<fo:table-column column-width="3.0cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="3.5cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="11pt">
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block> 
<fo:inline-graphic href="file:c:/deltalogo.gif"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Adviseur:</fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/nummer"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/straat"/></fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/postcode"/></fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/plaats"/></fo:block>
<fo:block text-align="start">Tel. <xsl:value-of
select="tp/adres/telefoon"/></fo:block>
<fo:block text-align="start">Fax. <xsl:value-of
select="tp/adres/fax"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="6.2cm"/>
<fo:table-column column-width="2.8cm"/>
<fo:table-column column-width="4.8cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="1.0cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="11pt">
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Offertenummer</fo:block>
<fo:block text-align="start"><xsl:value-of
select="offertenummer"/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Datum</fo:block>
<fo:block text-align="start"><xsl:value-of select="datum"/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Blad</fo:block>
<fo:block text-align="start"><fo:page-number/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-body">
<fo:block font-size="9pt"
font-family="Courier"
space-after.optimum="2pt"
line-height="15pt">
<fo:block line-height="65pt"> </fo:block>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="16.5cm"/>
<fo:table-body font-size="10pt">
<fo:table-row line-height="12pt">
<fo:table-cell> 
</fo:table-cell>
<fo:table-cell>
<fo:block>Geachte
<xsl:choose><xsl:when test="eersteverzekerde/geslacht = 'man'"> heer
</xsl:when>
<xsl:otherwise> mevrouw </xsl:otherwise></xsl:choose>
<xsl:value-of select="eersteverzekerde/achternaam"/>,
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:apply-templates select="brief"/>
</fo:block>
</fo:flow>
<fo:static-content flow-name="xsl-after">
<fo:block font-size="7pt" font-family="Courier" line-height="8pt">
<fo:block text-align="start">
printnr. <xsl:value-of select="printnr"/>
</fo:block>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence initial-page-number="1">
<fo:sequence-specification>
<fo:sequence-specifier-repeating page-master-first="rest"
page-master-repeating="rest"/>
</fo:sequence-specification>
<fo:static-content flow-name="xsl-before">
<fo:block font-size="9pt" font-family="Courier" line-height="12pt">
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="7.5cm"/>
<fo:table-column column-width="1.8cm"/>
<fo:table-column column-width="7cm"/>
<fo:table-column column-width="1cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="10pt">
<fo:table-cell>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="start"><xsl:value-of
select="dl/naam"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="start">Uw assurantieadviseur:</fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/naam"/></fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="6.2cm"/>
<fo:table-column column-width="3.1cm"/>
<fo:table-column column-width="3.0cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="3.5cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="11pt">
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Adviseur:</fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/nummer"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/straat"/></fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/postcode"/></fo:block>
<fo:block text-align="start"><xsl:value-of
select="tp/adres/plaats"/></fo:block>
<fo:block text-align="start">Tel. <xsl:value-of
select="tp/adres/telefoon"/></fo:block>
<fo:block text-align="start">Fax. <xsl:value-of
select="tp/adres/fax"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="6.2cm"/>
<fo:table-column column-width="2.8cm"/>
<fo:table-column column-width="4.8cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="1.0cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="11pt">
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Offertenummer</fo:block>
<fo:block text-align="start"><xsl:value-of
select="offertenummer"/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Datum</fo:block>
<fo:block text-align="start"><xsl:value-of select="datum"/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
<fo:block text-align="end">|</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block> </fo:block>
<fo:block text-align="start">Blad</fo:block>
<fo:block text-align="start"><fo:page-number/></fo:block>
<fo:block text-align="start"></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-body">
<fo:block font-family="Courier"
line-height="15pt"
space-after.optimum="2pt"
break-before="page">
nieuwe pagina
</fo:block>
</fo:flow>
<fo:static-content flow-name="xsl-after">
<fo:block font-size="7pt" font-family="Courier" line-height="8pt">
<fo:block text-align="start">
printnr. <xsl:value-of select="printnr"/>
</fo:block>
</fo:block>
</fo:static-content>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="t">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="b">
<fo:inline-sequence font-weight="bold">
<xsl:apply-templates/>
</fo:inline-sequence>
</xsl:template>
<xsl:template match="i">
<fo:inline-sequence font-style="italic">
<xsl:apply-templates/>
</fo:inline-sequence>
</xsl:template>
<xsl:template match="u">
<fo:inline-sequence text-decoration="underline">
<xsl:apply-templates/>
</fo:inline-sequence>
</xsl:template>
<xsl:template match="paragraaf">
<fo:block line-height="25pt">  </fo:block>
<fo:block>
<fo:table>
<fo:table-column column-width="1.2cm"/>
<fo:table-column column-width="16.5cm"/>
<fo:table-body font-size="9pt">
<fo:table-row line-height="12pt">
<fo:table-cell> 
</fo:table-cell>
<fo:table-cell>
<xsl:apply-templates/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
<xsl:attribute-set name="opmaak">
<xsl:attribute name="text-decoration">underlined</xsl:attribute>
<xsl:attribute name="font-size">30pt</xsl:attribute>
<xsl:attribute name="font-family">serif</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>