When using docbook-xsl-saxon, a colspec colwidth of value "*" is not recognized as equal to "1*", instead the saxon extension tries to parse "" as float and gets a NFE printing " is not a valid relative unit". This causes a colwidth of 0 in the FOT file and then a really ugly PDF. Also in HTML this doesn't look too nice. The page http://www.docbook.org/tdg/en/html/colspec.html#d0e52927 says "1*" is the same as "*".
I can't reproduce this. Can you provide a test document and explain exactly how you process it?
show-case
argh, this gave me a hard time reproducing.
I really was under the impression this happened to me with html/chunk.xsl as well as with fo/docbook.xsl.
Since I reported this bug I restructured much of my build process and thus thought this is the case that I cannot reproduct it anymore.
But it still happens with fo/docbook.xsl.
I've attacthed you a show-case.
Just unpack the archive and run "ant"
Hm, no, I'm still pretty sure I've seen it with html/chunk.xsl, I'm just not able to reproduce it therewith anymore
Can we please make this as simple as possible? What happens if you run something like this from the command line?
java -cp saxon.jar;docbook-xsl-saxon.jar com.icl.saxon.StyleSheet -o example.html example.xml docbook.xsl use.extensions=1 tablecolumns.extension=1
But this is exactly what my example does and it gives exactly the same output:
.......
unpack-docbook-xsl:
[unzip] Expanding: /tmp/example/lib/docbook/docbook-xsl-resources.zip into /tmp/example/build/docbook-xsl
example:
[delete] Deleting: /tmp/example/example.fot
[xslt] Processing /tmp/example/example.xml to /tmp/example/example.fot
[xslt] Loading stylesheet /tmp/example/build/docbook-xsl/docbook/fo/docbook.xsl
[xslt] Making portrait pages on USletter paper (8.5inx11in)
[xslt] is not a valid relative unit.
[xslt] is not a valid relative unit.
BUILD SUCCESSFUL
Total time: 5 seconds
$ java -cp lib/docbook/saxon.jar:lib/docbook/docbook-xsl-saxon.jar com.icl.saxon.StyleSheet -o example.fot example.xml build/docbook-xsl/docbook/fo/docbook.xsl use.extensions=1 tablecolumns.extension=1
Making portrait pages on USletter paper (8.5inx11in)
is not a valid relative unit.
is not a valid relative unit.
$
The only error in my example is that it deletes example.html instead of example.fot and thus will not recreate it if you've run it once.
Three things:
* Yes, I suppose that your example works. It's just that I got a whole bunch of annoying Ant errors that have nothing to do with this issue.
* There is a bug in fo/table.xsl: the '*' case is not handled properly (the colspec.colwidth variable). I'll fix that.
* However, I'm pretty sure that you don't need the tablecolumns extension for FO output. The FO processor should handle columns widths without it. See also http://www.sagehill.net/docbookxsl/ColumnWidths.html.
to 1. Hm, strange, there shouldn't have been any errors beside the ones from DocBook. There should only be progress messages.
to 2. Hm, strange, I could swear it happened to me with html/chunk.xsl
to 3. Then you should change the default for fo/docbook.xsl maybe. I didn't set tablecolumns.extension to 1 explicitly unless you asked me to. I've just set use.extensions to 1.
1. I have nothing against Ant. But IMHO, it should not be a requirement to use Ant in order to reproduce a DocBook-XSL bug.
2. I can only reproduce the bug with the FO stylesheet. I have fixed that.
3. You are right, setting tablecolums.extension=1 explicitly is not needed (it is enabled by default). When the tablecolumns extension works as intended, it should do no harm for FO output. And if someone still uses something ancient such as FOP 0.20 then it might be necessary.
1. Sure, I agree. And as you see it is not necessary. I just stripped down what I had anyway to deliver you a 100% reproducible case. :-)
2. I'd wish I could tell you how I made it, but I didn't get it managed to reproduce. :-(
3. Then maybe better let it enabled. :-)
Fixed in fo/table.xsl.
Reopen if you can reproduce for HTML output.
A fix for this issue has been added to the current codebase.
Please test the fix with the latest snapshot from:
http://docbook.sourceforge.net/snapshots/