Re: [xsl] how i can use 'table' in fo in differt way ?

Subject: Re: [xsl] how i can use 'table' in fo in differt way ?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2004 17:48:35 +0200
At 2004-04-16 16:46 +0100, Roberta Granata wrote:
The problem is that when a use a 'table' in the xsl
file , it forces me to indicate how many columns i
need to use and the width.

Yes, this is true for tables.

In my script i have two columns.
I want that :
when the text of the second column is empty ,
the text of the first column takes all the line of the

Unfortunately I did not get your example cleanly, but you should be able to add something along the lines of:

    <xsl:if test="not(string(second-column))"
      <xsl:attribute name="number-columns-spanned">2</xsl:attribute>
      ...column contents...
  <xsl:if test="string(second-column)">
        ...column contents...

With the above technique you are conditionally adding the number-columns-spanned="2" attribute to the first table cell if the second table cell is empty. Be sure, though, to test for the creation of the second table cell or you will end up specifying three columns.

I hope this helps.

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

Public courses: Spring 2004 world tour of hands-on XSL instruction
Each week:   Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness

Current Thread