I am basically using the ExampleXML2PDF code to test my xsl file. I get an
error message saying only "table-row" are allowed inside table-body. The xsl
is generating table-row tags which I verified by dumping the output to a
file. Also, if I saved the generated xsl-fo file into a temporary file, and
then run the fop by reading the temporary file, it generates the correct
output. So I am assuiming that the act of piping the xsl-fo output through
the SAXResult is somehow affecting the interpretation of the generated code
(the ContentHandler is getting confused becuase of the CDATA code that the
xsl generates). I would appreciate it if somebody can suggest a solution.
Basically , what I am trying to do here is take the following xml and layout
the data into 3 column tabular layout. Alternate methods of doing this will
be appreciated as well.
<customers>
<customer>
<firstname>xxx</firstname>
<lastname>yyy</lastname>
</customer>
... <customer> repeats ....
</customers>
Snippet from ExampleXML2PDF.java
===========================
//Resulting SAX events (the generated FO) must be piped through to FOP
Result res = new SAXResult(driver.getContentHandler());
//Start XSLT transformation and FOP processing
transformer.transform(src, res);
Here is a snippet of the code from the XSL
===============================
<fo:table-body>
<xsl:text
disable-output-escaping="yes"><![CDATA[<fo:table-row>]]></xsl:text>
<xsl:for-each select="customerPF">
<xsl:if test="position()!=1">
<xsl:if test="(position()-1) mod 3 = 0">
<xsl:text
disable-output-escaping="yes"><![CDATA[</fo:table-row>]]></xsl:text>
<xsl:text
disable-output-escaping="yes"><![CDATA[<fo:table-row>]]></xsl:text>
</xsl:if>
</xsl:if>
<fo:table-cell><fo:block><xsl:value-of
select="position()"/></fo:block></fo:table-cell>
</xsl:for-each>
<xsl:text
disable-output-escaping="yes"><![CDATA[</fo:table-row>]]></xsl:text>
</fo:table-body>
Thanks for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]