[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...
David, Thanks so much! This worked perfectly. I don't know how I missed this when reading Bob's book. Or maybe I didn't but its been so long since I've been through it in detail I just forgot about it. Anyway, it is working well and I thank you for the reminder. Best, Jon Rosen -----Original Message----- From: David Cramer [mailto:david@thingbag.net] Sent: Thursday, October 27, 2011 4:29 PM To: docbook-apps@lists.oasis-open.org 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----- --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]