Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points 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 1288 posts 3921 karma points c-trib
    Sep 15, 2011 @ 18:12
    Dan
    0

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

Please Sign in or register to post replies

Write your reply to:

Draft