topical media & game development
professional-ajax-08-WeatherWidget-weather.xsl / xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/">
<div id="weatherContainer">
<xsl:apply-templates />
</div>
</xsl:template>
<!-- Weather Feed Begins -->
<xsl:template match="weather">
<xsl:apply-templates select="loc"/>
<xsl:apply-templates select="cc"/>
</xsl:template>
<!-- Location Information -->
<xsl:template match="loc">
<div id="weatherLocation"><xsl:value-of select="dnam"/></div>
<div id="weatherTime">Last Update:
<span><xsl:value-of select="tm"/></span>
</div>
</xsl:template>
<!-- Current Conditions -->
<xsl:template match="cc">
<xsl:variable name="weatherIcon" select="icon" />
<div id="weatherIcon"><img src="img/weather/{
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.