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] Setting HTML Colwidths

I don't think there is a template for totalling the column widths.
Most of the utility templates for tables are in common/table.xsl.

But you could specify the table width manually for each table using
a dbhtml processing instruction as described in my book.  Then you
could modify the template with match="tgroup" in html/table.xsl.
Your width value will be in the $table.width variable
that the template computes.
In the place where it outputs a 'width' attribute for the html <table>
element using $table.width, you would add code to output the style spec
using that width.

You could also create a template to add up the column widths, but that
could be pretty hard in general since the units would have to be taken
into account.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Phil Weston" <phil700@xmsg.com>
To: "Bob Stayton" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org>
Sent: Friday, February 06, 2004 9:32 AM
Subject: Re: [docbook-apps] Setting HTML Colwidths

> Cheers Bob
> That certainly seems to work though it seems to work best if you insert
the code just after the "<xsl:if test="$table.borders.with.css != 0">"
> MSWord being MSWord, it doesn't like the space in the html produced by
"<xsl:text>width: </xsl:text>" but that's easily remedied too.
> It seems I also need need to specify the full table width also. As in:
> <table style="width:12cm; border-collapse: collapse;border-top: 0.5pt
solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ;
border-right: 0.5pt solid ; ">
> Word doesn't like using "pt"s either - "cm"s work best but again that's
easily remedied (for me).
> I guess there must be a routine for calculating the total of all the
colspec.colwidths... Is there somewhere where these things are listed so I
can track them down?
> P.

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