[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Lotus XSL extensions

Subject: RE: Lotus XSL extensions
From: "Kevin Jones" <kevinj@xxxxxxxxxxx>
Date: Thu, 18 Nov 1999 17:25:47 -0000
dcl lotus
Thanks Tangi,
 
my problem seems to be getting the whole thing to work together - I'll take a lookk at your code and see if I've missed something,
 
Kevin
-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Tangi Vass
Sent: 18 November 1999 15:17
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Lotus XSL extensions

Hi,
 
I use _javascript_ extensions to do date calculations and it works great!
 
Here is the component:
 
<lxslt:component prefix="datecalc">
<lxslt:script lang="_javascript_">  
function DateToString(p_date)
{
 var YYYY = p_date.getYear()+1900;
 var MM = p_date.getMonth()+1;
 if (MM &lt; 10) MM = "0" + MM;
 var DD = p_date.getDate();
 if (DD &lt; 10) DD = "0" + DD;
 var YYYYMMDD = "" + YYYY + "-" + MM + "-" + DD;
 return YYYYMMDD;
}
 
function StringToDate(p_string)
{
 return new Date(p_string.substring(0,4)-1900, p_string.substring(5,7)-1, p_string.substring(8));
}
 
function AddDays(p_date, p_num_days)
{
 var MINUTE = 60 * 1000;
 var HOUR = MINUTE * 60;
 var DAY = HOUR * 24;
 return new Date(p_date.getTime() + p_num_days * DAY);
}
 
function RelativeDate(p_date, p_offset)
{
 return DateToString(AddDays(StringToDate(p_date), p_offset));
}
</lxslt:script>
</lxslt:component>
 
Have fun,
 
Tangi Vass
 
 
----- Original Message -----
From: Kevin Jones <kevinj@xxxxxxxxxxx>
Sent: Thursday, 18 November, 1999 15:12
Subject: Lotus XSL extensions

>
> I'm using the Lotus XSL parser (0_18_5) and have been trying to get
> _javascript_ extensions to work. Does anybody here have any experience with
> this - and/or any examples they could share?
>
> Thanks,
>
> Kevin Jones
>
>
>  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.