Never mind, I was using XSLTC. I keep forgetting that it doesn't do JavaScript.
-----Original Message----- From: Adam Greene [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 10:47 AM To: [EMAIL PROTECTED] Subject: Help with CLASSPATH I have read everything about classpath, I have run the EnvironmentCheck and it reports Xalan 2.5.2 and all the files are in the lib/endorsed directory, but when I use stylesheets with javascript it complains: 'The first argument to the non-static Java function 'getdate' is not a valid object reference.' Which makes me think it is using the wrong Xalan. Here is the stylesheet I use (got it from the extensions examples): <?xml version="1.0"?> <!--Namespaces are global if you set them in the stylesheet element--> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xalan" xmlns:my-ext="ext1" extension-element-prefixes="my-ext"> <!--The component and its script are in the xalan namespace and define the implementation of the extension.--> <xalan:component prefix="my-ext" elements="timelapse" functions="getdate"> <xalan:script lang="javascript"> var multiplier=1; // The methods or functions that implement extension elements always take 2 // arguments. The first argument is the XSL Processor context; the second // argument is the element node. function timelapse(xslProcessorContext, elem) { multiplier=parseInt(elem.getAttribute("multiplier")); // The element return value is placed in the result tree. // If you do not want a return value, return null. return null; } function getdate(numdays) { var d = new Date(); var totalDays = parseInt(numdays) * multiplier; d.setDate(d.getDate() + totalDays); return d.toLocaleString(); } </xalan:script> </xalan:component> <xsl:template match="deadline"> <p><my-ext:timelapse multiplier="2"/>We have logged your enquiry and will respond by <xsl:value-of select="my-ext:getdate(string(@numdays))"/>.</p> </xsl:template> </xsl:stylesheet> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 10:43 AM To: [EMAIL PROTECTED] Subject: WELCOME to [EMAIL PROTECTED] Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. Acknowledgment: I have added the address [EMAIL PROTECTED] to the xalan-j-users mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the xalan-j-users list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: <[EMAIL PROTECTED]> To remove your address from the list, send a message to: <[EMAIL PROTECTED]> Send mail to the following for info and FAQ for this list: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> To get message 12 from the archive, send a message to: <[EMAIL PROTECTED]> The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example "[EMAIL PROTECTED]", just add a hyphen and your address (with '=' instead of '@') after the command word: <[EMAIL PROTECTED]> To stop subscription for this address, mail: <[EMAIL PROTECTED]> In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: <[EMAIL PROTECTED]> Received: (qmail 70180 invoked from network); 18 Dec 2003 14:43:06 -0000 Received: from unknown (HELO mail.mergitech.com) (198.167.161.43) by daedalus.apache.org with SMTP; 18 Dec 2003 14:43:06 -0000 Received: from adam ([]) by mail.mergitech.com (Merak 5.1.2) with SMTP id EZL73735 for <[EMAIL PROTECTED] ache.org>; Thu, 18 Dec 2003 10:42:47 -0400 From: "Adam Greene" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED] ache.org> Subject: RE: confirm subscribe to [EMAIL PROTECTED] Date: Thu, 18 Dec 2003 10:43:12 -0400 Message-ID: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <[EMAIL PROTECTED]> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 10:41 AM To: [EMAIL PROTECTED] Subject: confirm subscribe to [EMAIL PROTECTED] Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. To confirm that you would like [EMAIL PROTECTED] added to the xalan-j-users mailing list, please send an empty reply to this address: [EMAIL PROTECTED] che.org Usually, this happens when you just hit the "reply" button. If this does not work, simply copy the address and paste it into the "To:" field of a new message. This confirmation serves two purposes. First, it verifies that I am able to get mail through to you. Second, it protects you in case someone forges a subscription request in your name. --- Administrative commands for the xalan-j-users list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: <[EMAIL PROTECTED]> To remove your address from the list, send a message to: <[EMAIL PROTECTED]> Send mail to the following for info and FAQ for this list: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> To get message 12 from the archive, send a message to: <[EMAIL PROTECTED]> The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example "[EMAIL PROTECTED]", just add a hyphen and your address (with '=' instead of '@') after the command word: <[EMAIL PROTECTED]> To stop subscription for this address, mail: <[EMAIL PROTECTED]> In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: <[EMAIL PROTECTED]> Received: (qmail 65136 invoked from network); 18 Dec 2003 14:40:35 -0000 Received: from unknown (HELO romulin.com) (156.34.200.45) by daedalus.apache.org with SMTP; 18 Dec 2003 14:40:35 -0000 Received: from adam by romulin.com with SMTP (MDaemon.v2.8.5.0.R) for <[EMAIL PROTECTED]>; Thu, 18 Dec 2003 10:44:29 -0400 Message-ID: <[EMAIL PROTECTED]> From: "Adam Greene" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Date: Thu, 18 Dec 2003 10:39:58 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C3C553.48B2F130" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-MDaemon-Deliver-To: [EMAIL PROTECTED] X-Return-Path: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C3C553.48B2F130 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ------=_NextPart_000_0005_01C3C553.48B2F130 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0005_01C3C553.48B2F130--