[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Re: PassiveTeX tables
On Mon, Sep 23, 2002 at 04:32:17PM -0400, Dennis Grace wrote: > > Hi Guys, > > This is a combination of PassiveTeX observations and DocBook XSL/PassiveTeX > questions. > > I've been trying to find a workaround for the one remaining > table/informaltable problems I've had with PassiveTeX: the disappearing > left border. I found that I can produce a table that looks correct in the > PDF if I add an empty column to the left-hand side (increment the cols > attribute by one, specify a colspec with a 0pt, and specify the colwidth as > 0pt), I get a correct looking output. The attached tar.gz contains files > table.fo and table.pdf, which demonstrate this. Unfortunately, as > table.html demonstrates, the extra column makes for a rather odd looking > html table border. > > So, I thought I'd use the role attribute and apply the table templates via > my customization layer. I built two versions of the table in my test > document--one with five columns and one with the sixth, empty column. I > assigned role="pdf" to the six-column table and role="html" to the five > column table. In my html customization layer, I added > > <xsl:template match="table"> > <xsl:choose> > <xsl:when test="@role='html'"> > <xsl:apply-templates/> > </xsl:when> > <xsl:when test="@role='pdf'" select="0"/> > <xsl:otherwise> > <xsl:apply-templates/> > </xsl:otherwise> > </xsl:choose> > </xsl:template> > > To my fo customization layer, I added the converse: > > <xsl:template match="table"> > <xsl:choose> > <xsl:when test="@role='pdf'"> > <xsl:apply-templates/> > </xsl:when> > <xsl:when test="@role='html'" select="0"/> > <xsl:otherwise> > <xsl:apply-templates/> > </xsl:otherwise> > </xsl:choose> > </xsl:template> > > For the html, this worked. It processed through the five column table. For > the pdf, it worked (in so far as it attached the left border), but created > a new problem. The table caption and the top line got lopped off (see > table2.fo and table2.pdf in the attached tar.gz). > > Any idea why this didn't work? I think you probably need to use xsl:apply-imports rather than xsl:apply-templates? Your customization is replacing the default match on table, so when you do apply-templates it only applies to its children. Apparently that doesn't affect the HTML table processing much, but it may mess up the block nesting for FO output. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC