I want to compare current date against a start date and end date.
XML is:
Assuming your dates are in yyyy-mm-dd format (as I understand they are from your other question), this should work with most XSLT 1.0 processors:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
...
<xsl:for-each select="forms/form">
<xsl:variable name="today" select="translate(substring-before(date:date-time(), 'T'), '-', '')"/>
<xsl:variable name="start" select="translate(start, '-', '')"/>
<xsl:variable name="end" select="translate(end, '-', '')"/>
<xsl:if test="$start <= $today and $today <= $end">
<!-- in progress -->
</xsl:if>