Xavier Ottolini wrote:
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 :
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>
No, the child of the element in the XSLT file is <xsl:apply-templates>.
This is an XSLT instruction and it generates a result tree. If the
context node has a child "detail" that has a child "ligne", these
ligne-nodes will be processed by the matching template. If these nodes
are not there, or there is no matching template, the fo:table-body will
remain empty, which is illegal.
You can change the XSLT such that it does not include fo:table-body at
all, or, better yet, not the whole table at all, depending on some
condition.
Since this appears to be an XSLT question, you may be better off
narrowing it down a bit and asking a specific question on the XSLT
mailing list, instead of the FOP user list.
Cheers,
-- Abel Braaksma
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]