OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] I need to selectively hide rows in a table...


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jon,
What you want it profiling, which does exactly what you want and much
more. It's explained in Bob Stayton's excellent book:

http://www.sagehill.net/docbookxsl/Profiling.html

Btw., what you were doing would work if you did apply-imports instead.
When you do apply-templates you override the templates that normally
handle rows and so produce invalid xsl-fo. But what you really want is
profiling.

David

On 10/27/2011 04:30 PM, Jon Rosen wrote:
> 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 J.
> 
> 
> 
> [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."/
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOqekwAAoJEMHeSXG7afUhOYoH+gPQLNqZUehesYCmkNh0r7i8
Kf6b8ErZ/W9cxeXKriQr193DH3N/qVBMacyBagGnnHRWsBBrdEoEhOUl+6GUQn1O
oNCJy3vaJZ6n2VQexkXvMr71turiynysp8rIMnfmC9GAr6L9ZtmJ04JWgBgsWtAB
f+T6reLSDNmjYk7svvsTTU14yCS1GBw57FYsmJIxijqi6xXm/vBMKhf4caztFup8
PTBDP4XMWUjs7DEdG3KWGPbr1bPBfElM2q2X4xhTcFU0zMF8+tErSvG8ceRjEWvl
zu6hNRFbHnVxuT7I3SFcZfZxtHRna+o65XQ15eRGHz1kRLLIbuHuJAkp20qeO68=
=9Ver
-----END PGP SIGNATURE-----


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]