Subject: RE: computing an attribut value (newbie's question) From: Kay Michael <Michael.Kay@xxxxxxx> Date: Thu, 19 Oct 2000 11:27:03 +0100 |
> > <xsl:if test="./@type='bitmap'"> > <IMG .... src="mybitmaps/test/mmmmm{./@color}.jpg"></IMG> > <xsl:if> > > Why does this work? Because it's correct! The {./@color} is an attribute value template, the thing between the curly braces is an XPath expression which is substituted into the attribute value at the relevant place. But don't try this construct anywhere, there are only certain places it can be used. > > Can I use a variable for accomplishing the job like > > <xsl:if test="./@type='bitmap'"> > <xsl:if test="./@color="xxx"> > <xsl:variable name="MyCol" select="yyy"/> > </xsl:if> Your variable here will be out of scope as soon as you hit the </xsl:if> You can use variables, but you haven't said what you want to achieve with them so it's difficult to advise. Mike Kay > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: computing an attribut value (ne, Ytai Ben-Tsvi | Thread | RE: computing an attribut value (ne, Oliver Becker |
RE: Removing duplicates - grouping , Kay Michael | Date | RE: How To Access a param from sty, Kay Michael |
Month |