Copied to clipboard

Flag this post as spam?

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


  • John C Scott 473 posts 1183 karma points
    Jan 04, 2011 @ 12:58
    John C Scott
    0

    old schema get node by data value

    Using the old schema in 4.0.2 I want to select a node by the value of a specific data

    this would be much easier in the new schema

    the following doesn't work

    <xsl:variable name="reportData" select="umbraco.library:GetXmlNodeById($reportHome)/node [data=$dealerId and data/@alias='dealerID']"/>

    if another data node has the same value then this will return the node

    using the old schema how would I say select the node with the value specified only when the data is of the specified name?

     

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Jan 04, 2011 @ 13:02
    Chriztian Steinmeier
    1

    Hi John,

    This should do it:

    <xsl:variable name="reportData" select="umbraco.library:GetXmlNodeById($reportHome)/node[data[@alias = 'dealerID'] = $dealerId]" />

    /Chriztian

     

  • John C Scott 473 posts 1183 karma points
    Jan 04, 2011 @ 13:17
    John C Scott
    0

    thank you Chriztian that's absolutely brilliant :D

    been struggling with my predicate syntax

    i knew i could nest it somehow - but this is perfect - thank you again

Please Sign in or register to post replies

Write your reply to:

Draft