Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

xsl 1.0 and current date

  • 10-11-2010 12:40PM
    #1
    Registered Users, Registered Users 2 Posts: 91 ✭✭


    Hi All,

    Trying to complete some xsl 1.0 coding.

    I am aware that version 2.0 will solve the issue, however parameters beyond my control do not allow me to use it(xsl.2.0).

    As a result I probably need to create a function to get this date.

    The reason I need to use it is I need to compare the current date with the date in the feed to see whether or not it is in the past. I would then use the function to display a different background.

    <xsl:choose>
    <xsl:when test="//market[@NAME='Win-Draw-Win'] and //market[@TSSTART > $now] ">
    <xsl:value-of select="$bgRef" />_2_markets_<xsl:value-of select="$WideType"/>

    </xsl:when>
    <xsl:otherwise>BS_2_markets_<xsl:value-of select="$WideType"/>
    </xsl:otherwise>
    </xsl:choose>


    The function in xsl 2.0 is:

    <xsl:variable name="now" select="format-dateTime(current-dateTime(),'[D01]/[M01]/[Y] [H]:[m]:')" />


    so I need something like this in a function level.

    Where do I start?

    Many thanks for your help.


Advertisement