Bug 29459 - Error in processing xml-file with xsl-stylesheet
Summary: Error in processing xml-file with xsl-stylesheet
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.5
Hardware: PC All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-09 09:09 UTC by Hardy Braunsdorf
Modified: 2012-04-01 13:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hardy Braunsdorf 2004-06-09 09:09:36 UTC
If I run fop with:
fop.bat -xml daten.xml -xsl daten.xsl daten.pdf I got the error:
[ERROR] org.apache.fop.apps.FOPException: A table cell must be child of 
fo:table-row, not fo:table-body
I chekc th fo-output with xalan.bat and all looks fine.
If I run fop with:
fop.bat xalanout.fo daten.pdf
it works.
I assume the probleme is located in the following codesnip:

    <xsl:if test="position() mod 2">
      <xsl:text disable-output-escaping="yes">&lt;fo:table-row 
height=&quot;14cm&quot; &gt;
      </xsl:text>
    </xsl:if>
    <xsl:call-template name="RezeptCell"/>
    <xsl:if test="not(position() mod 2)">
      <xsl:text disable-output-escaping="yes">&lt;/fo:table-row&gt;
      </xsl:text>
    </xsl:if>
    <xsl:if test="position()=last() and position() mod 2">
      <xsl:text disable-output-escaping="yes">&lt;/fo:table-row&gt;
      </xsl:text>
    </xsl:if>
Comment 1 Chris Bowditch 2004-06-09 13:16:22 UTC
This is *not* a bug. 

It is not valid to generate the start tag in one template and the end tag in 
another template. If this becomes necessary to achieve what you want then you 
need to re-think your XSL stylesheet design.

Using <xsl:text> with disable-output-escaping="yes" is a trick that only works 
when the result of the XSL tranform is serialized to disk. When you supply xsl 
and xml files as input to the command line, the transform result is not 
serialized but rather passed as SAX events to FOP. Hence your trick fails.

If you are having difficulties then you should ask on the fop-user mailing 
list before raising a bug.
Comment 2 Glenn Adams 2012-04-01 13:51:52 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs