RE: [xsl] date and time

Subject: RE: [xsl] date and time
From: "Khan, Amir" <amkhan@xxxxxxxxxx>
Date: Wed, 11 Jul 2001 17:23:09 +0100
why dont you pass it into the XSL as a param from the calling transform
engine?, its obviously imlpementation specific but with Xalan-J I'd do
something like (this is a quick example, you'd be advised to tailor it a

	 TransformerFactory tFactory = TransformerFactory.newInstance();
            // open the XSL file and create a reducing transformer on it.
            Transformer theTransformer  = 
                tFactory.newTransformer(new StreamSource(someXSLFile));

	theTransformer.setParameter("dateTime", new Date().toString());

then in XSL land you can...

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="";
<xsl:output method="xml" indent="yes"/>  

<xsl:param name="dateTime"/>

<xsl:value-of select="$dateTime"/>

> -----Original Message-----
> From:	Michael Schäfer [SMTP:MSchaefer@xxxxxxxxxxxx]
> Sent:	Wednesday, July 11, 2001 2:12 PM
> To:	XSL-Liste (E-Mail)
> Subject:	[xsl] date and time
> Hello,
> is there a way to obtain recent system time and system date to put it in
> the result tree?
> Mit freundlichen Grüßen
> Michael Schäfer
> ---------------------------------------------------------------
> Dipl.-Ing. Michael Schäfer
> e-business
> Pfeil GmbH
> Obertorstr. 4-6
> 66111 Saarbrücken 
> Tel.: 06 81/3 79 85-30
> Fax: 06 81/3 79 85-13
> e-Mail: mschaefer@xxxxxxxxxxxx
> Internet:
>  XSL-List info and archive:

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.

 XSL-List info and archive:

Current Thread