Copied to clipboard

Flag this post as spam?

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


  • horsted 70 posts 121 karma points
    Aug 17, 2009 @ 03:27
    horsted
    0

    Problem with using Copy-of nodes

    Hi, I'm having a hard time geting this to work, so hope you can help me out... (i'm a n00b to xslt so please be gentle :-)

    <xsl:variable name="unfilteredSource" select="$currentPage/node/node [string(data [@alias='umbracoNaviHide']) != '1']" />  
    <xsl:variable name="filteredSource">
    <xsl:for-each select="$unfilteredSource">
      <xsl:sort select="."/>
       <xsl:copy-of select="."/> 
         </xsl:for-each>
    </xsl:variable>

    When writing out <xsl:value-of select="count($unfilteredSource)"/> in a template it compiles and give me the desired result...
    But when using <xsl:value-of select="count($filteredSource)"/> instead it won't compile. 'filteredSource' are the same as 'unfilteredSource' when i write them out, so i have no idea why it isn't working...

    I need to filter the nodes as part of adding paging to my grouping using the Muenchian method

    Thanks in advance!

    Cheers, horsted
     

  • Petr Snobelt 923 posts 1534 karma points
    Aug 17, 2009 @ 08:20
    Petr Snobelt
    101

    It looks like you must use node-set function to filtered source.

    http://www.xml.com/pub/a/2003/07/16/nodeset.html

  • horsted 70 posts 121 karma points
    Aug 17, 2009 @ 11:55
    horsted
    0

    Got it working (after way too much time) with your suggestion... Thanks, Petr :-) 

  • 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