I might have found something, but perhaps I can get some confirmation and a 
lead.

 

To recap, I moved table.xsl  to my customization layer folder and added the 
XHTML namespace declaration to eliminate the delimiter problems I was 
encountering with the webhelpindexer. Now the calculations for my colwidths are 
failing.

 

The input is 

 

<colspec colname="col1" colwidth="1*"/>

<colspec colname="col2" colwidth="2*"/>

<colspec colname="col3" colwidth="2*"/>

 

When I'm producing plain old HTML, the result is 

 

<col xmlns="" width="20%"><col xmlns="" width="40%"><col xmlns="" width="40%">

 

However, when I add the XHTML namespace, I get this result:

 

<col width="1*"></col><col width="2*"></col><col width="2*"></col>

 

I see that the adjustColumnWidth function is part of the extension defined in 
docbook.py and xslt.py, and it's referenced in table.xsl. I've updated our copy 
of this file in the extensions folder, and I've also duplicated the code that 
appears to process column widths in the xhtml/table.xsl file. Still the * 
values are passed through unconverted. I have confirmed that use.extensions and 
tablecolumns.extension are both being set to 1. The only difference that I can 
detect is that the xsl:stylesheet element in my table.xsl contains 
xmlns="http://www.w3.org/1999/xhtml";, and the default table.xsl does not.

 

When I transform the same XML using the 1.76 webhelp transform, the column 
widths are calculated correctly. When I remove the namespace declaration, the 
column widths are correct.

 

If anyone has a clue as to why the extension stops responding after this 
change, please let me know. 

 

Thanks,

 

Bill Burns

Verbum Communications, Inc.

+1.208.336.6081

 <mailto:[email protected]> [email protected]

 <http://www.verbumcomm.com> http://www.verbumcomm.com

 

From: Bill Burns [mailto:[email protected]] 
Sent: Wednesday, July 27, 2011 5:08 PM
To: [email protected]
Subject: Odd column resizing issue

 

Hello,

 

I'm more of a danger than a developer, but that doesn't stop me from 
experimenting. I have been working on retrofitting the webhelpindexer to work 
with an older set of stylesheets (the HTML XSLT from v1.36). I've been 
eliminating little XHTML errors here and there, but this last one has me 
stumped.

 

I moved table.xsl  to my customization layer folder and added the XHTML 
namespace declaration to eliminate the delimiter problems I was encountering. 
However, an odd thing happened with the calculations for my col widths.

 

The input is 

 

<colspec colname="col1" colwidth="1*"/>

<colspec colname="col2" colwidth="2*"/>

<colspec colname="col3" colwidth="2*"/>

 

What is supposed to happen is that the code calculates percentages based on the 
proportional value, so cols 2 and 3 are both twice the width of col 1. (I have 
no idea if this code comes from legacy DocBook or if some other developer from 
my employer wrote it. Smarter people than I wrote it.) When I'm producing plain 
old HTML, the result is 

 

<col xmlns="" width="20%"><col xmlns="" width="40%"><col xmlns="" width="40%">

 

However, when I add the XHTML namespace, I get this result:

 

<col width="1*"></col><col width="2*"></col><col width="2*"></col>

 

Any clues as to why the calculation would fail with only the addition of the 
namespace declaration?

 

Thanks in advance. 

 

Bill Burns

Verbum Communications, Inc.

+1.208.336.6081

[email protected]

http://www.verbumcomm.com

 

Reply via email to