XML/XSLT stylesheet/current date
Get current date with function current-date()
<source lang="xml">
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body>
Date and Time
The current date is: <xsl:value-of select="current-date()" />
</body> </html> </xsl:template>
</xsl:stylesheet> Output: <html>
<body>
Date and Time
The current date is: 2008-12-10-08:00
</body>
</html>
</source>