3

I am currently using xsl to feed weather from rss.weather.com.au. Everything working fine but as soon as i add reference exslt it will not work and show error "Failed to apply XSLT to the content". I am using exslt to display the current local time and date

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:date="http://exslt.org/dates-and-times"
                extension-element-prefixes="date msxsl"
                xmlns:w="http://rss.weather.com.au/w.dtd">

<xsl:import href="date.xsl" />

<xsl:output method="xml" version="1.0" indent="yes"/>
 <xsl:template match="/">

<div id="top" >


        <div class="weather rendered">

            <xsl:attribute name="onclick">OpenPopUpPage('<xsl:value-of select="/rss/channel/link"/>')</xsl:attribute>
            <xsl:attribute name="title">Current temperature: <xsl:value-of select="/rss/channel/item/w:current/@temperature"/>° &#xD;forecast for <xsl:value-of select="/rss/channel/item/w:forecast[1]/@day"/>:&#xD;<xsl:value-of select="/rss/channel/item/w:forecast[1]/@min"/>&#176;-<xsl:value-of select="/rss/channel/item/w:forecast[1]/@max"/>&#176;, <xsl:value-of select="/rss/channel/item/w:forecast[1]/@description"/></xsl:attribute>

            <div class="max"><xsl:value-of select="format-number(/rss/channel/item/w:current/@temperature, '0')"/><span class="deg">&#176;</span></div>


            <div class="date"><xsl:value-of select="date:date-time()" />"</div>


        </div>



</div>
</xsl:template>

</xsl:stylesheet>


>

I have already look this example below but it still not resolve my issue https://msdn.microsoft.com/en-us/library/ms950776.aspx

  • I think this post might be helpful Link – rjv91 Mar 31 '17 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.