This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Variables in HTML tags
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: noam at miner dot com
- Cc: XSL-List at lists dot mulberrytech dot com
- Date: Sat, 16 Feb 2002 08:00:17 +0000
- Subject: Re: [xsl] Variables in HTML tags
- Organization: Jeni Tennison Consulting Ltd
- References: <0F68ECF06C32D411B3C70050DA78722045E50A@MAIL>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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