Copied to clipboard

Flag this post as spam?

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


  • anthony hall 217 posts 530 karma points
    Oct 04, 2009 @ 14:55
    anthony hall
    1

    How to filter xslt foreach

    I have the following xslt. It works fine ie gives me exactly the content i need. The only issue is that the Position() count is incorrect. So i need a way to combine all these statements into one. Just a syntax issue. Any thoughts?

     

    <xsl:for-each select="$home/descendant::node [@nodeTypeAlias = 'productStyle']">
    <xsl:if test="contains(concat(',',data[@alias='priceRange'],','),concat(',',$priceRange,','))">
    <xsl:if test="contains(concat(',',data[@alias='productStyleCategories'],','),concat(',',$categoryId,','))">
    
    

     

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 04, 2009 @ 15:18
    Morten Bock
    2

    You should be able to just throw them in your xpath:

    <xsl:for-each select="$home/descendant::node [@nodeTypeAlias = 'productStyle'][contains(.....)][contains(.....)]">

  • anthony hall 217 posts 530 karma points
    Oct 04, 2009 @ 15:41
    anthony hall
    0

    thanks once again. it worked. 

  • 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