Copied to clipboard

Flag this post as spam?

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


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Mar 21, 2013 @ 13:59
    Bo Damgaard Mortensen
    0

    Filtering nodes by date

    Hi all,

    I'm trying to filter a set of nodes by a DateTime property.

    The first filter should give me all nodes which are 30 days old from current date. 

    The last filter should give me all nodes which DateTime property is set to the previous month.

    I'm a second away of creating my own extension for this, but I've got a feeling that this is not *that* complex in XSLT ;-)

    I've come this far:

    <ul>
        <xsl:apply-templates select="$currentPage/descendant::Nyhed [@isDoc and .. something  ..]" />
    </ul>
    
    <xsl:template match="Nyhed [@isDoc]">
        <li><xsl:value-of select="@nodeName" /></li>
    </xsl:template>

    Is there any way of doing this without the need of writing an extention? :-)

    Thanks in advance.

    All the best,

    Bo

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Mar 21, 2013 @ 14:59
    Alex Skrypnyk
    0

    Hi,

    I think you should to wright an extention )

    XSLT isn't very flexible thing.

    THanks,

    Alex

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Mar 21, 2013 @ 15:12
    Bo Damgaard Mortensen
    1

    Hi Alex,

    Thanks for your input :-) Appreciated!

    I think, for now, I am going to write my own extension for this. However, I have to disagree to an extend: I think the XSLT is fairly flexible for what it's supposed to do: transforming data, which is also the case here - express and transform :-)

    All the best,

    Bo

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Mar 21, 2013 @ 15:19
    Alex Skrypnyk
    0

    Hi Bo,

    Of course you are right, xslt is really flexible in transforming data, but your task isn't transforming ) it's filtering and retrieving )

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft