This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variables in HTML tags


Hi Noam,

> The problem is in the last line. The CellColor variable is not
> replaced by the value of the variable. Rather, I just get the string
> "$GetColor".

You've just forgotten the {}s to make it an attribute value template:

  <td bgcolor="{$CellColor}" colspan="2">

Most attribute values are interpreted literally. It's only if you
include {}s that the XSLT processor knows that it's supposed to
evaluate whatever you put in the attribute value rather than simply
give the expression as the attribute value.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]