Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edward Dudley 80 posts 121 karma points
    Aug 04, 2009 @ 12:03
    Edward Dudley
    0

    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!

  • Edward Dudley 80 posts 121 karma points
    Aug 04, 2009 @ 12:23
    Edward Dudley
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft