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 16, 2011 @ 16:46
    Shaun
    0

    umbraco.library:GetXmlNodeById not returning data

    Hi All

    Got an odd problem with a bit of xslt

    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)"/>

    returns 2 attributes of that node, all well and good

    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)/@nodeName" />
      
    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)/@nodeType" />

    returns the nodename and nodetype ID of the node, again, all good.

    but the following return nothing. I've checked and rechecked the alias's and they're all fine.

    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)/data [@alias = 'myfirstalias']" />!!
    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)/data [@alias = 'mysecondalias']" />!!
    <xsl:value-of select="umbraco.library:GetXmlNodeById(1054)/@nodeTypeAlias" />

    Any ideas?

    Thanks

    Shaun

  • Eran Meir 401 posts 543 karma points
    Apr 16, 2011 @ 16:54
    Eran Meir
    1

    the examples are written with the old scheme of xslt

    read here for more info http://our.umbraco.org/wiki/reference/xslt/45-xml-schema

  • Shaun 248 posts 475 karma points
    Apr 16, 2011 @ 17:03
    Shaun
    0

    Thanks Eran. Stupid me. I was reusing some older scripts and forgot about the change.

Please Sign in or register to post replies

Write your reply to:

Draft