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


I'm working on a method of importing HTML into a Word document and have come across a problem with importing a table.

Given a Docbook table of the form:

     <colspec colnum="1" colname="col1" colwidth="30pt"/>
     <colspec colnum="2" colname="col2" colwidth="150pt"/>
         <entry colname="col1"><para>MyFirstCol</para></entry>
         <entry colname="col2"><para>My2ndCol</para></entry>

Using the XHTML Stylesheets with my own customisation layers (with no table customisations yet) gives:

    <col width="30pt" align="left">
    <col width="150pt" align="left">
    <tr valign="top">
      <td valign="top"><p>MyFirstCol</p></td>
      <td valign="top"><p>My2ndCol</p></td>

Viewing with a Browser works fine as you'd expect and even opening in Word gives the impression that it's fine too. However the problem is that Word doesn't fix the Column widths - adding more text to "col1" for example, stretches the column width to suite the new text.

It seems I can force Word to harden the column widths by setting a style attribute on every <td> and <th> (eg: <td valign="top" style="width:30.0pt;">).

Can anyone help with the XSLT required to do this? I'm having difficulty understanding how I can track which <entry> I'm processing and therefore which colspec.colwidth I need...



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