I have a macro that calls a webservice and adds some other data to the response. What I want to do is to cache the webservice and the easiest way I can think of doing it is to have the webservice call in a separate, cached macro. I can't just cache the one macro as the URL from each user has some user specific data in it.
I'm using the RenderMacroContent to render the other macro and this is returning the XML but I think it's escaped.
When I use the node-set function to turn the result into a nodeset I cannot parse it - no errors, I just don't get anything out of it.
<xsl:variable name="myXml" select="string(umbraco.library:RenderMacroContent('[escaped stuff to call macro];', $currentPage/@id))"/>
XSLT node-set
Hi,
I have a macro that calls a webservice and adds some other data to the response. What I want to do is to cache the webservice and the easiest way I can think of doing it is to have the webservice call in a separate, cached macro. I can't just cache the one macro as the URL from each user has some user specific data in it.
I'm using the RenderMacroContent to render the other macro and this is returning the XML but I think it's escaped.
When I use the node-set function to turn the result into a nodeset I cannot parse it - no errors, I just don't get anything out of it.
<xsl:variable name="myXml" select="string(umbraco.library:RenderMacroContent('[escaped stuff to call macro];', $currentPage/@id))"/>
Message: <xsl:value-of select="msxml:node-set($myXml)//message[1]"/>
Any ideas? I'm pretty sure its something to do with myXml being escaped but I can't work out how to unescape it!
Thanks!
Solved the problem!
I think I was over-complicating the matter.
It turns out Umbraco has an overload of getXmlDocumentByURL that includes a cache period in seconds.
is working on a reply...