calculations in XSL ? is it possible

webmasterbeta

New Member
I have the XML document:<factor> 1.25 </factor><image><hight> 10 </hight><src> test.gif </src></image>The result I want is<img hight=125 src=http://forums.devx.com/archive/index.php/test.gif>So how would the XSL document look like ?<xsl:template match="/"><xsl:variable name="x1"> <xsl:value-of select="factor" /> </xsl:variable><xsl:variable name="x2"> <xsl:value-of select="image/hight" /> </xsl:variable><img hight=<xsl:eval> $x1 * $x2 </eval> src=<xsl:value-ofselect="src" /> >This doesn't work but am I on the right track ?-Lars <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Gemini Ernst & Young
 
Back
Top