Error parsing XSLT file Options
v0tive
Posted: Thursday, November 27, 2008 2:18:31 PM
Rank: Newbie

Joined: 11/27/2008
Posts: 3
Location: Dorset, UK
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 "&#x00A0;"> ]>
<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>

drobar
Posted: Thursday, November 27, 2008 3:23:09 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,831
Location: MA, USA
Two things to try...

1. Double-check the file permissions. This can cause all kinds of bizzare issues and isnt' uncommon after a server rebuild.

2. You might see more information in the umbraco log table. Install the LogViewer package from the package repository to see them from within the umbraco UI.

Let us know what you find out.

cheers,
doug.

MVP 2007-2009 - Percipient Studios
v0tive
Posted: Thursday, November 27, 2008 5:26:44 PM
Rank: Newbie

Joined: 11/27/2008
Posts: 3
Location: Dorset, UK
drobar wrote:
Two things to try...

1. Double-check the file permissions. This can cause all kinds of bizzare issues and isnt' uncommon after a server rebuild.

2. You might see more information in the umbraco log table. Install the LogViewer package from the package repository to see them from within the umbraco UI.

Let us know what you find out.

cheers,
doug.


Thanks for the suggestions Doug. I've checked the permissions for the assemblies and Network Service and the IUSR account have read/write permissions. Thanks for the suggestion about installing the LogViewer package, I wasn't aware of its existence! I've looked through all the categories and I can't find any messages related to the xslt error I'm experiencing. It's so frustrating!
v0tive
Posted: Friday, November 28, 2008 2:02:41 PM
Rank: Newbie

Joined: 11/27/2008
Posts: 3
Location: Dorset, UK
Fixed it! Perhaps there is an easier way to see the InnerException property but I added a trace statement to the Umbraco 3.0.6 source code in the exception handler to output the InnerException, then viewed the web page in the browser with umbDebugShowTrace=true. This immediately told me that I needed to set permissions on a working folder for a 3rd party DLL I was using.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.