I'm trying to write a gallery function to output some images from a Google Picasa RSS feed onto a web page. I'm using the Composite.Feeds.RSSReader function as a guide, but keep getting the same error.
The feed is at:
https://picasaweb.google.com/data/feed/base/user/103008899561957549282
I have one input parameter string of 'PicasaURL'
My function calls are:
I have tried using:
The feed is at:
https://picasaweb.google.com/data/feed/base/user/103008899561957549282
I have one input parameter string of 'PicasaURL'
My function calls are:
<functions>
<f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Xslt.Extensions.MarkupParser" localname="MarkupParser" />
<f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Xml.LoadUrl" localname="LoadUrl">
<f:param name="Url">
<f:function name="Composite.Utils.GetInputParameter">
<f:param name="InputParameterName" value="PicasaURL" />
</f:function>
</f:param>
</f:function>
</functions>
My template is:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:in="http://www.composite.net/ns/transformation/input/1.0" xmlns:lang="http://www.composite.net/ns/localization/1.0" xmlns:f="http://www.composite.net/ns/function/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xsl in lang f">
<xsl:param name="rss" select="/in:inputs/in:result[@name='LoadUrl']" />
<xsl:template match="/">
<xsl:apply-templates select="$rss" />
</xsl:template>
<xsl:template match="feed">
<html>
<head />
<body>
<div class="gallery">
<xsl:apply-templates select="title" />
<!-- <xsl:apply-templates select="item[position() < $listLength + 1]" /> -->
</div>
</body>
</html>
</xsl:template>
<xsl:template match="title">
<xsl:value-of select="text()" />
</xsl:template>
</xsl:stylesheet>
When I preview, I get the error:InvalidOperationException: Token Text in state Start would result in an invalid XML document. Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment.I believe that this might be because the Picasa feed is served as XHTML, and the XML parser is looking for a root of /html within the XML document, which it doesn't include.
I have tried using:
<xsl:template match="/">
<top><xsl:apply-templates select="$rss" /></top>
</xsl:template>
... but this gives me an error of:ArgumentException: Supplied XDocument must have a root named html belonging to the namespace 'http://www.w3.org/1999/xhtml'Can anyone help with a solution to make the XML nodes readable and navigable?