[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

Subject: Re: using xt-extensions for getting a string of date
From: felix@xxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 8 Mar 2000 10:30:50 +0100
xsl parseint
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.