lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lmi] help with orphan-control in xsl-fo


From: Vaclav Slavik
Subject: RE: [lmi] help with orphan-control in xsl-fo
Date: Sun, 17 May 2009 11:41:05 +0200

On Sat, 2009-05-16 at 21:36 +0200, Vaclav Slavik wrote:
> I can't even run this, I get errors with fop-0.95 (and it doesn't make
> to use <0.95 with my patch):
> 
>         javax.xml.transform.TransformerException:
>         org.apache.fop.fo.ValidationException:
>         file:/tmp/sample.000000001.fo.xml:144:68: Error(144/68):
>         fo:page-sequence is missing child elements. 

This error turned out to be because of a bug in reg_d_individual.xsl:
<xsl:param> elements must be present before anything else in
<xsl:template>. Please apply this patch to fix it:

=== modified file 'reg_d_individual.xsl'
--- reg_d_individual.xsl        revid:address@hidden
+++ reg_d_individual.xsl        2009-05-17 08:55:46 +0000
@@ -596,6 +596,8 @@
 
   <xsl:template name="standardheader">
     <xsl:param name="logo_only"/>
+    <xsl:param name="displaycontractlanguage"/>
+    <xsl:param name="displaydisclaimer"/>
     <fo:table table-layout="fixed" padding-after="2.5pt" font-weight="bold" 
font-size="13.0pt" font-family="sans-serif">
       <fo:table-column column-width="50mm"/>
       <fo:table-column column-width="90mm"/>
@@ -616,8 +618,6 @@
         </fo:table-row>
       </fo:table-body>
     </fo:table>
-    <xsl:param name="displaycontractlanguage"/>
-    <xsl:param name="displaydisclaimer"/>
     <fo:block text-align="center" font-size="9pt">
       <xsl:if test="$displaycontractlanguage=1">
         <fo:block padding-top="1em">

This resulted in omission of huge part of the output in the XSLT step,
hence the error about missing content. I think that older libxslt
versions (such as the one used on Windows; I'm using 1.1.24) didn't
catch this error and that's you don't see this particular error
yourself. Apparently, libxslt tries to produce at least some output even
in presence of errors, even though it detects them:

        $ xsltproc reg_d_individual.xsl /tmp/input_doc.xml  >/dev/null
        runtime error: file ../reg_d_individual.xsl line 623 element param
        Unexpected XSLT element 'param'.
        runtime error: file ../reg_d_individual.xsl line 624 element param
        Unexpected XSLT element 'param'.
        runtime error: file ../reg_d_individual.xsl line 626 element if
        Variable 'displaycontractlanguage' has not been declared.
        $

Worryingly, xsltwrapp didn't throw an exception on this error --
clearly, this needs to be fixed urgently. 

There are more XSL errors in reg_d_individual.xsl, I'm looking into them.

Regards,
Vaclav





reply via email to

[Prev in Thread] Current Thread [Next in Thread]