<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">

<Contents Find="TickerItem">
	<TickerHeader Text="            " />

	<xsl:for-each select="DATOM">
		<xsl:if test="@TYPE = 'bwtr'">
			<TickerItem>
				<xsl:choose>
					<xsl:when test="weather_observation/@country_code = 'US'">
						<xsl:variable name="weather_state" select="weather_observation/@state_code"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:variable name="weather_state" select="weather_observation/@country_code"/>
					</xsl:otherwise>
				</xsl:choose>

				<xsl:attribute name="Link"><xsl:value-of select="URL"/>&amp;src=tkr</xsl:attribute>
				<Item TextLink="yes" bold="yes">
					<xsl:attribute name="Text"><xsl:value-of select="weather_observation/@city_name"/>,&#32;<xsl:value-of select="$weather_state"/></xsl:attribute>
				</Item>
				<Item Text="  "/>

				<Item>
					<xsl:attribute name="File">Skin.EPBar.TransparentWeatherCondition.<xsl:value-of select="weather_observation/sky_code"/></xsl:attribute>
				</Item>

				<Item Text="  "/>

				<xsl:if test="weather_observation/weather_text != 'No Data'">
					<Item TextLink="yes">
						<xsl:attribute name="Text"><xsl:value-of select="weather_observation/weather_text"/>&#32;</xsl:attribute>
					</Item>
				</xsl:if>

				<Item TextLink="yes">
					<xsl:attribute name="Text"><xsl:value-of select="weather_observation/temperature_F"/>°F,&#32;<xsl:value-of select="weather_observation/temperature_C"/>°C</xsl:attribute>
				</Item>

				<ClickAction Type="bwtr">
					<xsl:attribute name="Name"><xsl:value-of select="weather_observation/@twc_location_id"/></xsl:attribute>
					<xsl:attribute name="TITLE"><xsl:value-of select="weather_observation/@city_name"/>,&#32;<xsl:value-of select="$weather_state"/></xsl:attribute>
				</ClickAction>


<ABSTRACT><xsl:value-of select="weather_observation/@city_name"/>,&#32;<xsl:value-of select="$weather_state"/>&#13;
<xsl:value-of select="weather_observation/update_date"/>&#32;<xsl:value-of select="weather_observation/update_time"/>&#13;
Current Conditions:&#32;&#32;<xsl:value-of select="weather_observation/weather_text"/>
&#13;Temperature:&#32;&#32;<xsl:value-of select="weather_observation/temperature_F"/>°F,&#32;<xsl:value-of select="weather_observation/temperature_C"/>°C
Humidity:&#32;&#32;<xsl:value-of select="weather_observation/relative_humidity"/>%
Wind Speed:&#32;&#32;<xsl:value-of select="weather_observation/wind_dir"/>&#32;<xsl:value-of select="weather_observation/wind_speed"/>&#32;mph
</ABSTRACT>

			</TickerItem>

		<TickerItem Text="           "/>

		</xsl:if>
	</xsl:for-each>
</Contents>

</xsl:template>
</xsl:stylesheet>
