Hi,
I have an application where I need to hide some of the rows in a table for one
printing of a document and not for another.
What I have been trying to do (unsuccessfully) is to apply a role="hidden"
attribute to the <row> tags that I want to have disappear from the altered
version of the document. This is strictly for pdf. I am using xslt and fop.
In my naivete, I tried the following template in my pdf.xsl customization file:
<xsl:template match="d:row">
<xsl:choose>
<xsl:when test="@role = 'hidden'"><fo:block/></xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I assumed (hoped) that this would find row tags with the "hidden" role and
remove them (providing instead an empty block), otherwise just reapply the
templates. Given the following exception in fop, I assume I did something
wrong :).
[java] SEVERE: Exception
[java] javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
Error(131/850): column-number or number of cells in the row overflows
the number of fo:table-column specified for the table.
I am sure this is just dumbness of not understanding what the templates are
expecting. Help would be appreciated.
Thanks,
Jon
Jon Rosen
"Sometimes you're the pinball wizard, and sometimes you're just the pinball."