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

RE: Please help in XSL

Subject: RE: Please help in XSL
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 5 Nov 2001 11:07:27 +0200
fo table inline progression dimension
Hip hei!

> The result / the xsl should show a table :
> 1) paint the bgcolor for all the column where at the first 
> row and with the text is bold.
> 2) paint the bgcolor for all first column at every row where 
> the text is bold. 

My XSL's bit rusty, but this should do it 

  <fo:table inline-progression-dimension="auto"
            table-layout="auto" >
    <xsl:for-each select="tr[1]/td">
      <fo:table-column>
        <xsl:if test="para/bold">
          <xsl:attribute name="background-color">red</xsl:attribute>

        </xsl:if>
      </fo:table-column>
    </xsl:for-each>
    <fo:table-body>
      <xsl:for-each select="tr">
        <fo:table-row>
          <xsl:if test="td[1]/para/bold">
            <xsl:attribute name="background-color">red</xsl:attribute>

          </xsl:if>
          <xsl:for-each select="td">
            <fo:table-cell>
              <fo:block>
                <xsl:value-of select="para" />
              </fo:block>
            </fo:table-cell>
          </xsl:for-each>
        </fo:table-row>
      </xsl:for-each>
    </fo:table-body>
  </fo:table>

Make sure the current node it the parent of the tr elements and adjust the
properties to suit your needs. Hope this helps,

Jarno

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.