The following code returns a number. The number is the name of a picture (ie 32.gif, 33.gif, etc)
My question is, how can I insert the number in the IMG tag (see red code in the main XSL document)? So it would read like so...
Thanks!
Code:
<xsl:value-of select="//yweather:condition/@code"/>
My question is, how can I insert the number in the IMG tag (see red code in the main XSL document)? So it would read like so...
Code:
<img src="[URL unfurl="true"]http://us.i1.yimg.com/us.yimg.com/i/us/we/52/[/URL][b]INSERT NUMBER HERE FROM XML[/b].gif" />
Thanks!
Code:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] version="1.0" xmlns:yweather="[URL unfurl="true"]http://xml.weather.yahoo.com/ns/rss/1.0">[/URL]
<xsl:output method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="*">
<tr><td colspan="2" align="center" class="evt"><b><xsl:value-of select="//yweather:location/@city"/></b></td></tr>
<tr>
<td align="center" class="evt">
[COLOR=red][b]<img src="[URL unfurl="true"]http://us.i1.yimg.com/us.yimg.com/i/us/we/52/32.gif"[/URL] />[/b][/color red]<br/>
<xsl:value-of select="//yweather:condition/@text"/><br/>
<xsl:value-of select="//yweather:condition/@temp"/><xsl:text disable-output-escaping="yes">&deg;</xsl:text><br/>
</td>
<td align="right" valign="bottom" class="evt">
<table align="center" cellpadding="0" cellspacing="0">
<xsl:for-each select="//yweather:forecast">
<tr>
<td><xsl:value-of select="@day"/></td>
<td width="5"></td>
<td><xsl:value-of select="@high"/></td>
<td width="10" align="center">/</td>
<td><xsl:value-of select="@low"/></td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
<tr><td colspan="2" height="5" class="evt"></td></tr>
<tr><td colspan="2" align="center" class="evt"><font size="-3" color="#999999">Sunset is at <xsl:value-of select="//yweather:astronomy/@sunset"/></font></td></tr>
</xsl:template>
</xsl:stylesheet>