This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
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