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] Troubles with table customization


The processing of HTML-markup tables for HTML output in DocBook XSL is very simple.  As described here:
 
http://www.sagehill.net/docbookxsl/DocbookHtmlTables.html
 
most of the HTML table elements are simply copied from the input to the output, along with any attributes.  So one avenue of customization is to add any attributes to the HTML markup in the source.
 
If doing it in source is not appropriate, then the XSL templates for such tables are very simple, and could easily be customized.  Here are some examples:
 
<xsl:template match="thead|tbody|tgroup|tr" mode="htmlTable">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates mode="htmlTable"/>
  </xsl:copy>
</xsl:template>
 
<xsl:template match="th|td" mode="htmlTable">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
  </xsl:copy>
</xsl:template>
You could stick in a xsl:call-template with name="tr.attributes" after the xsl:copy to add new attributes.
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Thursday, October 04, 2007 4:03 PM
Subject: [docbook-apps] Troubles with table customization

Trying to customize the styling of my tables for HTML output I’ve read in “DocBook XSL Guide” that:

 

The HTML stylesheet provides an empty template named [tr.attributes] that can be customized …”

 

That named template do the trick for CALS tables but does nothing for “HTML-like” tables.

 

1)       Is this behaviour the expected one or is a bug?

2)       In case it is the expected behaviour. Is there any similar template for customizing “HTML-like” tables?

 

Regards,

 

Pedro

 


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.0/1049 - Release Date: 04/10/2007 8:59



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