Re: [xsl] Question about table column width in XSLT/XSLFO

Subject: Re: [xsl] Question about table column width in XSLT/XSLFO
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 10:34:16 -0400
At 2006-10-17 07:18 -0700, ms wrote:
Thank you for your response Ken. I was able to work
out a solution for XSLT.

I'm assuming that you mean, above, "for HTML" ... I'm not sure what it means to say you have a "solution for XSLT".

I am having an issue with
XSLFO though. Converting CALS to PDF. Specially with
the column span attribute. How do I calculate column
span using namest and namend from cals for XSLFO? It
seems simpler in XSLT, but I am lost with XSLFO.

Perhaps I'm confused ... what do you mean by "in XSLT"? One usually uses XSLT to create an instance of XSL-FO. But the same is true for creating an instance of HTML, so again I'll assume you have already solved your problem for HTML.

And if you already have the answer for HTML using
XSLT, then you are already calculating the number
of columns spanned by dereferencing the named
column for nameend from the named column for
namest.  Something like the following untested snippet:

  colspan="{ count( ancestor::table[1]/colspec[name=current()/@nameend]/
                    preceding-sibling::colspec ) -
             count( ancestor::table[1]/colspec[name=current()/@namest]/
                    preceding-sibling::colspec )
             + 1 }"

Just do the same in XSL-FO for
number-columns-spanned= ... I don't see any
difference between the two for spanning columns
of a table cell.  When I've had to work with
nameend= and namest= I've used something along
the lines of the above with easy success.

I'm not sure why the calculation you are already
doing for HTML isn't working for XSL-FO.

I hope this helps.

. . . . . . . . . . . . . Ken

-- UBL/XSLT/XSL-FO training: Allerxd/Verx Denmark 2006-11-13,17,20/24 UBL International 2006 2006-11-13/17 World-wide corporate, govt. & user group UBL, XSL, & XML training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 Legal business disclaimers:

Current Thread