XSLT error "Cannot find a script or an extension object associated with namespace 'http://ift.tt/KrM76s'"



I'm getting an error in my SP2013 app that it's not finding a schema that is explicitly defined. Am I defining this incorrectly? Can someone shed some light on how it should be defined? I'm adapting Sharepoint's OOTB XSLT for an RSS view webpart. Here is the XSLT:



<xsl:stylesheet xmlns:x="http://ift.tt/tphNwY"
version="1.0" exclude-result-prefixes="xsl ddwrt msxsl rssaggwrt"
xmlns:ddwrt="http://ift.tt/KrM76s"
xmlns:rssaggwrt="http://ift.tt/XuLqmQ"
xmlns:xsl="http://ift.tt/tCZ8VR" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:rssFeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart"
xmlns:rdf="http://ift.tt/oZyhLL"
xmlns:dc="http://ift.tt/mToXri"
xmlns:rss1="http://ift.tt/RFqq7V" xmlns:atom="http://ift.tt/r5ut6F"
xmlns:itunes="http://ift.tt/IR9se2"
xmlns:atom2="http://ift.tt/1o4jEDs">

<xsl:param name="rss_FeedLimit">5</xsl:param>
<xsl:param name="rss_ExpandFeed">false</xsl:param>
<xsl:param name="rss_LCID">1033</xsl:param>
<xsl:param name="rss_WebPartID">RSS_Viewer_WebPart</xsl:param>
<xsl:param name="rss_alignValue">left</xsl:param>
<xsl:param name="rss_IsDesignMode">True</xsl:param>

<xsl:template match="rss">
<xsl:call-template name="RSSMainTemplate"/>
</xsl:template>

<xsl:template name="RSSMainTemplate" xmlns:ddwrt="http://ift.tt/KrM76s" xmlns:xsl="http://ift.tt/tCZ8VR" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:variable name="Rows" select="channel/item"/>
<xsl:variable name="RowCount" select="count($Rows)"/>
<div class="slm-layout-main" >
<xsl:call-template name="RSSMainTemplate.body">
<xsl:with-param name="Rows" select="$Rows"/>
<xsl:with-param name="RowCount" select="count($Rows)"/>
</xsl:call-template>
</div>
</xsl:template>

<xsl:template name="RSSMainTemplate.body" xmlns:ddwrt="http://ift.tt/KrM76s" xmlns:xsl="http://ift.tt/tCZ8VR" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:param name="Rows"/>
<xsl:param name="RowCount"/>
<xsl:for-each select="$Rows">
<xsl:variable name="CurPosition" select="position()" />
<xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
<xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
<xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
<div class="item link-item" >
<a class="title rss-title" href="{(string(link))}" >
<xsl:value-of select="title"/>
</a>

<xsl:if test="$rss_ExpandFeed = true()">
<xsl:call-template name="RSSMainTemplate.description">
<xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
<xsl:with-param name="CurrentElement" select="$CurrentElement"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="$rss_ExpandFeed = false()">
<xsl:call-template name="RSSMainTemplate.description">
<xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
<xsl:with-param name="CurrentElement" select="$CurrentElement"/>
</xsl:call-template>
</xsl:if>
</div>
</xsl:if>
</xsl:for-each>
</xsl:template>

<xsl:template name="RSSMainTemplate.description" xmlns:ddwrt="http://ift.tt/KrM76s" xmlns:xsl="http://ift.tt/tCZ8VR" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:param name="DescriptionStyle"/>
<xsl:param name="CurrentElement"/>
<div id="{$CurrentElement}" class="description" align="{$rss_alignValue}" style="{$DescriptionStyle} text-align:{$rss_alignValue};">
<div class="rss-date date">
<xsl:choose>
<xsl:when test="string-length(pubDate) > 0">
<xsl:variable name="pubDateLength" select="string-length(pubDate) - 3" />
<xsl:value-of select="ddwrt:FormatDate(pubDate,number($rss_LCID),3)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="ddwrt:FormatDate(pubDate,number($rss_LCID),3)"/>
</xsl:otherwise>
</xsl:choose>
</div>
<xsl:if test="string-length(description) > 0">
<xsl:variable name="SafeHtml">
<xsl:call-template name="GetSafeHtml">
<xsl:with-param name="Html" select="description"/>
</xsl:call-template>
</xsl:variable>
- <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
</xsl:if>
<div class="description">
<a href="{ddwrt:EnsureAllowedProtocol(string(link))}">More...</a>
</div>
</div>
</xsl:template>

<xsl:template name="GetSafeHtml">
<xsl:param name="Html"/>
<xsl:choose>
<xsl:when test="$rss_IsDesignMode = 'True'">
<xsl:value-of select="$Html"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="rssaggwrt:MakeSafe($Html)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>


Against this input:



<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Associates Update</title>
<link>
https://square.com/
</link>
<description> </description>
<language>en-us</language>
<pubDate>Mon, 22 December 2014 15:00:00 +0900</pubDate>
<lastBuildDate>Mon, 22 December 2014 15:00:00 +0900</lastBuildDate>
<docs>http://ift.tt/1xgOa66;
<item>
<title>Challenge to F1: New episodes of Understanding F1 has been released.</title>
<link>
http://ift.tt/1xgOcep
</link>
<description></description>
<category>Challenge to F1</category>
<pubDate>Mon, 22 December 2014 15:00:00 +0900</pubDate>
</item>
</channel>
</rss>


When I debug in Visual Studio I get XMLTransformException was unhandled by user code.


No comments:

Post a Comment