using xt-extensions for getting a string of date
Hi, I am trying to use the extent the date.xsl example from the xt-distro. I want it to print the string for a given date, not the actual date like that demo does. I tried something like this <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://www.jclark.com/xt/java/java.util.Date"> <xsl:template match="/"> <html> <xsl:if test="function-available('date:to-string') and function-available('date:new')"> <xsl:variable name="year">2000</xsl:variable> <xsl:variable name="month">1</xsl:variable> <xsl:variable name="day">2</xsl:variable> <p><xsl:value-of select="date:to-string(date:new(2000,1,2))"/></p> <p><xsl:value-of select="date:to-string(date:new($year,$month,$day))"/></p> </xsl:if> </html> </xsl:template> </xsl:stylesheet> It should give out the strings for the 02.01.2000. But xt just tells me: new:illegal arguments So I think it is trying to give the arguments as strings instead of integers as the constructor of Date is expecting. How can I get this to work? I am especially interested in the second case, where I call date:new with variables. Thanks in advance. Felix Schumacher ps: I hope this is not to far off-topic. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format