This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PassiveTeX tables


Woohoo! Way to go, Bob. That worked.

Dennis Grace

Information Developer
IBM Linux Technology Center
(512) 838-3937  T/L 678-3937  cell: (512)-296-7830
dgrace@us.ibm.com

There are only 10 kinds of people in the world: those who understand binary
and those who don't.


                                                                                                                                       
                      Bob Stayton                                                                                                      
                      <bobs@caldera.com        To:       Dennis Grace/Austin/IBM@IBMUS, Sebastian Rahtz                                
                      >                         <sebastian.rahtz@computing-services.oxford.ac.uk>, Docbook-apps                        
                      Sent by:                  <docbook-apps@lists.oasis-open.org>                                                    
                      bobs@caldera.com         cc:                                                                                     
                                               Subject:  Re: PassiveTeX tables                                                         
                                                                                                                                       
                      09/23/2002 03:48                                                                                                 
                      PM                                                                                                               
                                                                                                                                       
                                                                                                                                       



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






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]