Show CURRENT DATE when transforming XML using XSLT
I have searched the internet for a very long time and I know you cannot get the current date in XSLT 1.0 but you can in XSLT 2.0. I found forums posting the function below:
<xsl:value-of select="current_date()"/>
But I get errors. Can someone tell me how to use the functions in XSLT 2.0? Am I missing something some declarations at the top of the XSL stylesheet? If you can post some sample code it will be very helpful since I cannot find any. What I want to do is get the current date and save it into a variable so that I can use it later in the transformation by comparing with dates in the XML. Someone suggested using javascript to retrieve the current date but how do I it.
Many thanks in advance.
|