r0k3t
05-13-2009, 11:47 AM
Hi there,
As I have mentioned before I am new to XSLT... It's super cool but takes a little learning. At any rate I am having a problem using a variable I created.
inside a foreach loop I have this.
<xsl:variable name="width" select="w:tcPr/w:tcW/@w:w" />
if I do this
<xsl:value-of select="$width"/>
I can see it prints just fine, I am clearly getting the value... but I am wanting to do this.
<td style="border: solid 1px silver; width: {$width}px;">
That doesn't work - even if I try to print it all I see is the literal text {$width} printed in the HTML that the XSLT creates.
I have researched this all over the place and read many times that all you need to do is place the variable name in curly brackets... What am I missing.
Thanks!
As I have mentioned before I am new to XSLT... It's super cool but takes a little learning. At any rate I am having a problem using a variable I created.
inside a foreach loop I have this.
<xsl:variable name="width" select="w:tcPr/w:tcW/@w:w" />
if I do this
<xsl:value-of select="$width"/>
I can see it prints just fine, I am clearly getting the value... but I am wanting to do this.
<td style="border: solid 1px silver; width: {$width}px;">
That doesn't work - even if I try to print it all I see is the literal text {$width} printed in the HTML that the XSLT creates.
I have researched this all over the place and read many times that all you need to do is place the variable name in curly brackets... What am I missing.
Thanks!