lmi
[Top][All Lists]
Advanced

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

[lmi] Apache fop "bug"?


From: Greg Chicares
Subject: [lmi] Apache fop "bug"?
Date: Wed, 06 May 2009 13:41:43 +0000
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

As we're upgrading to apache fop-0.95, I'd like to remove a workaround
that was supposed to have been required for fop-0.20.5 (patch below).
But I see no difference in xsl-fo or pdf output with this patch, versus
without it--whether I use the new fop-0.95 or the old fop-0.20.5 . Am I
missing something?

With or without the patch, the xsl-fo output contains:

  <fo:block text-align="right">[COMPANY NAME]<fo:block>[TRACKING 
NUMBER]</fo:block></fo:block>

so I'm wondering whether this workaround was superfluous. Examining
the revision that mentions fop-0.20.5:

http://cvs.savannah.gnu.org/viewvc/lmi/lmi/illustration_reg.xsl?r1=1.33&r2=1.34&diff_format=u

leads me to wonder whether perhaps it was required for fop-0.20.3
but not for fop-0.20.5 (dot three versus dot five). At that time,
there was no "$compliance_tracking_number", so "$scalars/InsCoName"
really was "a single child"; but even if I make it a lone child
again by removing this portion

        <xsl:if test="$compliance_tracking_number">
          <fo:block>
            <xsl:value-of select="$compliance_tracking_number"/>
          </fo:block>
        </xsl:if>

which was added in revision 1.67, output is still the same with or
without "/text()".

Index: illustration_reg.xsl
===================================================================
RCS file: /sources/lmi/lmi/illustration_reg.xsl,v
retrieving revision 1.72
diff -U 3 -r1.72 illustration_reg.xsl
--- illustration_reg.xsl        27 Dec 2008 02:56:44 -0000      1.72
+++ illustration_reg.xsl        6 May 2009 13:00:37 -0000
@@ -1638,14 +1638,7 @@
         </xsl:choose>
       </xsl:with-param>
       <xsl:with-param name="right-block">
-        <!--
-        APACHE !! The '/text()' suffix in the XPath expression is a workaround
-        for Apache-FOP 0.20.5 bug that somehow treats <xsl:value-of/> as
-        <xsl:copy-of/> if it is encountered inside a <xsl:with-param/> as
-        a single child. Therefore we explicitly convert the expression into
-        a string.
-        -->
-        <xsl:value-of select="$scalars/InsCoName/text()"/>
+        <xsl:value-of select="$scalars/InsCoName"/>
         <xsl:if test="$compliance_tracking_number">
           <fo:block>
             <xsl:value-of select="$compliance_tracking_number"/>




reply via email to

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