Hi,
I want to build a PDF file with a XSL transformation. I use FOP 0.93 on
Tomcat 4.3 (Windows) . Fop is embeded in a JSP.
If I run FOP as a standalone application. The XSL transform is ran
successfully. But In my embeded class, an exception is thrown :
ATTENTION: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs.
table (http://www.w3.org/1999/XSL/Format)
12 janv. 2007 09:34:09 org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement
ATTENTION: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs.
flow (http://www.w3.org/1999/XSL/Format)
12 janv. 2007 09:34:09 org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement
ATTENTION: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs.
page-sequence (http://www.w3.org/1999/XSL/Format)
12 janv. 2007 09:34:09 org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement
ATTENTION: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs.
root (http://www.w3.org/1999/XSL/Format)
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error(Unknown location):
fo:table-body is missing child elements.
Required Content Model: marker* (table-row+|table-cell+)
The child element in the "table-body" tag is a "apply-template" element
and not a "table-cell" element.
<fo:table-body>
<xsl:apply-templates select="detail/ligne"/>
</fo:table-body>
How to avoid this error message ?
Here is the XSLT file
<?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:template match="/decompte">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="decomptes"
page-height="29.7cm"
page-width="21cm"
margin-top="2cm"
margin-bottom="1cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="1cm" margin-bottom="2cm"/>
<fo:region-before region-name="header" extent="3cm"/>
<fo:region-after region-name="footer" extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="decomptes">
<fo:static-content flow-name="footer">
<fo:block text-align="right">
Page
<fo:page-number />/<fo:page-number-citation ref-id="theEnd" />
</fo:block>
</fo:static-content>
<fo:static-content flow-name="header">
<fo:block-container height="7cm" width="100%" top="7cm" left="0cm"
position="absolute">
<fo:block background-color="transparent">
<fo:external-graphic src="copie-conforme.svg" content-height="6.7cm"
vertical-align="middle" />
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block space-after.optimum="5.5cm" />
<fo:table width="100%" table-layout="fixed" background-color="transparent">
<fo:table-column column-width="20%" />
<fo:table-column column-width="20%" />
<fo:table-column column-width="10%" />
<fo:table-column column-width="10%" />
<fo:table-column column-width="10%" />
<fo:table-column column-width="10%" />
<fo:table-column column-width="10%" />
<fo:table-column column-width="10%" />
<fo:table-header color="rgb(0,0,0)" font-weight="bold">
<fo:table-row>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt"
text-align="center">Bénéficiaire</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Nature des soins</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Date</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Dépense</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Base de Rembt</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Rembt CPAM</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Rembt Mutuelle</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="center">Rembt Roederer</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:apply-templates select="detail/ligne"/>
</fo:table-body>
</fo:table>
<fo:block id="theEnd" />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="detail/ligne">
<fo:table-row>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt"><xsl:value-of select="ipnom"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt"><xsl:value-of select="iacte"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt"><xsl:value-of select="idsoin"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="right"><xsl:value-of
select="idepen"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="right"><xsl:value-of
select="itconv"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="right"><xsl:value-of
select="ircpam"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="right"><xsl:value-of
select="irmutu"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="0.5pt solid black">
<fo:block font-size="8pt" text-align="right"><xsl:value-of
select="irroed"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
</xsl:stylesheet>
Regards,
Xavier
--
Pour préservez l’environnement n’imprimez cet e-mail qu’en cas de nécessité.
Xavier Ottolini
Développeur multimédia
Adelis
37 rue d'Engwiller
67350 La Walck
France
Téléphone : +33 (0) 3 69 20 29 02
Télécopie : +33 (0) 3 88 72 29 19
http://www.adelis.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]