[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using xt-extensions for getting a string of date
On Tue, Mar 07, 2000 at 03:12:23PM -0500, Jonathan Borden wrote: > Have you tried: > > <p><xsl:value-of > select="date:to-string(date:new(Integer.parseInt("{$year}"),Integer.parseInt > ("{$month}",Integer.parseInt("{$day}"))"/></p> Well, I just tried it, but I think it should have been: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xt="http://www.jclark.com/xt" xmlns:date="http://www.jclark.com/xt/java/java.util.Date" xmlns:int="http://www.jclark.com/xt/java/java.lang.Integer"> <xsl:value-of select="date:to-string(date:new(int:parse-int("{$year}"),int:parse-int ("{$month}",int:parse-int("{$day}"))"/> But both versions fail with file:/home/felix/film1/filmneu.xsl:25: character not allowed which comes from the ". When I remove them I get for the first one: file:/home/felix/film1/filmneu.xsl:25: no such function: Integer.parseInt and for the second one: file:/home/felix/film1/filmneu.xsl:25: illegal character When I remove the braces too, I get: new: illegal arguments So, I don't know how to use the constructor :( To get this thread a little bit more on-topic. What I really want to do is to increment a given date. I have one day and I want to have the date for that day and the following six ones. I thought it would be easiest to get that functionality off the java extensions. But perhaps some xsl-gods can do it in xslt :) Thanks in advance Felix Schumacher 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
|