Copied to clipboard

Flag this post as spam?

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


  • Shaun 248 posts 475 karma points
    Apr 15, 2010 @ 11:55
    Shaun
    0

    Loading a node

    hi

    I have an xslt macro that needs to load details of a node other than $currentPage.

    Currently I have this

    <xsl:variable name="myNode">
        <xsl:value-of select="umbraco.library:GetXmlNodeById($thisID)"/>
      </xsl:variable>
    <xsl:value-of select="$myNode/data [@alias='submissionName']"/>

    However when I save it it returns an error.

    System.Xml.Xsl.XslTransformException: To use a result tree fragment in a path expression, first convert it to a node-set using the msxsl:node-set() function. 

     Can anyone tell me what I'm doing wrong? I know that the id in $thisID is valid, and I know that the @alias of submissionName is valid and contains data.

    Thanks

    Shaun

  • Shaun 248 posts 475 karma points
    Apr 15, 2010 @ 11:57
    Shaun
    0

    Sussed it. 

    I should have used this to generate the node

    <xsl:variable name="myNode" select="umbraco.library:GetXmlNodeById($thisID)" />
Please Sign in or register to post replies

Write your reply to:

Draft