I've created an xslt file called GetPhotosInFlickrSet.xslt in my Umbraco 3 website that calls through to a .net assembly to retrieve a list of photos from my flickr account. The macro is in use on this page:
http://paulyarrow.com/photos.aspx. This page has been working perfectly for months but recently my server died and was completely rebuilt by the hosting company. I've set umbraco and the website up again on the new server but now I get the following error message when I add the query parameter umbDebugShowTrace=true:
Error parsing XSLT GetPhotosInFlickrSet.xslt
An error occurred during a call to extension function 'GetPhotosInSetAsXMLIterator'. See InnerException for a complete description of the error.
at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, TextWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.loadMacroXSLT(macro macro, Hashtable attributes, page umbPage)
I'm guessing that the problem is not with the assembly or the xslt as these were both previously working, but I'm completely stumped as to why it is not working. I've tried adding tracing into my custom assembly but this appears never to get output which implies that the assembly is never called either. I'd really appreciate some help on this issue because I've run out of ideas! Is there a way to get any additional logging for example?
Here is the xslt:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:tugboat.flickr="urn:tugboat.flickr"
exclude-result-prefixes="msxml umbraco.library tugboat.flickr">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- macroparameter with the url of the flickr set id -->
<xsl:variable name="ApiKey" select="/macro/apiKey" />
<xsl:variable name="FlickrSetID" select="/macro/flickrSetID" />
<xsl:variable name="itemsToDisplay">
<xsl:choose>
<xsl:when test="/macro/itemsToDisplay=''">
<xsl:value-of select="5" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/macro/itemsToDisplay" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="/">
<xsl:if test="$ApiKey != '' and $FlickrSetID != ''">
<xsl:value-of select='tugboat.flickr:GetPhotosInSetAsXMLIterator($ApiKey, $FlickrSetID)' />
<p style="clear:both;"></p>
</xsl:if>
</xsl:template>
<xsl:template match="Photo">
<li>
<a href="{MediumURL}" title="{Title}" rel="imagebox-{$FlickrSetID}"><img src="{SquareThumbnailURL}" alt="{Title}" /></a>
</li>
</xsl:template>
</xsl:stylesheet>