Copied to clipboard

Flag this post as spam?

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


  • Dan 1250 posts 3747 karma points admin c-trib
    Sep 15, 2011 @ 18:04
    Dan
    0

    Conditional in apply-template select

    Hi,

    As part of a more complex macro I'm trying to return all data from a node where the the property name begins with either 'imageThumb' or 'imageLarge'.

    It works to do this:

    <xsl:for-each select="$currentPage/*[starts-with(name(), 'imageThumb')]">

    But not this:

    <xsl:for-each select="$currentPage/*[starts-with(name(), 'imageThumb') | starts-with(name(), 'imageLarge')]">

    Can anyone suggest an alternative approach?

    Thanks

  • Richard 146 posts 168 karma points
    Sep 15, 2011 @ 18:10
    Richard
    0

    Dan,

    The XSLT OR condition is or (the word) rather than the pipe character.

  • Dan 1250 posts 3747 karma points admin c-trib
    Sep 15, 2011 @ 18:12
    Dan
    0

    Thanks Richard.  Can't believe I just did that!  H5IS!!

  • 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