[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: Re: 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
differt videos of the world
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
document

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


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

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.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.