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

RE: how to set the bgcolor of a table cell to the valu

Subject: RE: how to set the bgcolor of a table cell to the value of an XML attribute
From: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jul 2003 13:29:08 +0100
bgcolor cell
> From: Ali Zain Banatwala [mailto:azb33@xxxxxxxxx]
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  how to set the bgcolor of a table cell to the 
> value of an
> XML attribute

>   each stock has it's own row and each cell represents
> a trading day. i'm trying to set the bgcolor of each
> cell to the color(in hex) for that particular node. my


>  <Equities-List>
>    <Equity name="CP">
>      <EquityNode date="2000-01-03" close="9.6">
>        <Color hex="246f15">
>      </EquityNode>                 
>      <EquityNode date="2000-01-04" close="9.7">
>        <Color hex="227017">
>      </EquityNode>                 
>      <EquityNode date="2000-01-05" close="9.9">
>        <Color hex="1f731a">
>      </EquityNode>                 
>    </Equity>
>  </Equities-List>

>   and here's my XSLT file....
> 
>   <xsl:template match="/">
>    <html>
>     <body>
>      <table>
>       <xsl:for-each select="//Equity">
>        <tr>
>         <td> 

untested,

<td bgcolor="#{EquiteNode/Color/@hex}">

though should do the trick

gl, jim fuller

 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.