Copied to clipboard

Flag this post as spam?

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


  • Philip 13 posts 33 karma points
    Nov 04, 2010 @ 12:32
    Philip
    0

    How to check if a variable contains the nodeName of the current node in a loop?

    Hi,
    I want to check if a variable contains the nodeName of the current node in a loop, but I can't find the syntax anywhere to do this:


    <xsl:variable name="hearts" select="./addWeLoveHeart"/>
    <xsl:if test="$hearts.contains( $currentNode/@nodeName)">
    </xslt:if>
    I know '.contains' doesnt work, but whats the correct syntax to do this?
    Thanks for any help,
    Philip

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 04, 2010 @ 12:43
    Tom Fulton
    1

    I believe it's

    <xsl:if test="contains($hearts, $currentNode/@nodeName)">....</xsl:if>

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies