Copied to clipboard

Flag this post as spam?

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


  • Darryl Godden 145 posts 197 karma points
    Jan 11, 2013 @ 17:23
    Darryl Godden
    0

    Struggling with an XSLT

    I'm trying to return winners within 3 months of todays date, this is my XSLT:

      <xsl:variable name="testDate" select="umbraco.library:DateAdd(umbraco.library:CurrentDate(), 'm', -3)"/>
      
     <p>
       <xsl:for-each select="($currentPage/ancestor-or-self::*[@isDoc and @level=1] /Winners/Winner) and (umbraco.library:DateGreaterThanOrEqual(winDate, $testDate))">

    Which is giving me the dreaded:

    System.Xml.Xsl.XslLoadException: Expression must evaluate to a node-set. 
    -->($currentPage/an...ate, $testDate))<-- 

    Could you help me out?

     

    Thanks.

  • Darryl Godden 145 posts 197 karma points
    Jan 11, 2013 @ 17:33
    Darryl Godden
    100

    Solved it, guess I must be tired this late on a Friday afternoon!

    <xsl:for-each select="$currentPage/ancestor-or-self::*[@isDoc and @level=1] /Winners/Winner [umbraco.library:DateGreaterThanOrEqual(winDate, $testDate)]">
Please Sign in or register to post replies

Write your reply to:

Draft