[xsl] Converting from datetime in milliseconds to a specific format in XSL
Subject: [xsl] Converting from datetime in milliseconds to a specific format in XSL
From: "Vishwajit Pantvaidya" <pantvaidya@xxxxxxxxxxx>
Date: Thu, 25 Aug 2005 20:42:31 -0700
|
Using Xalan-Java and XSLT, I am trying to convert date from an input xml
that has it expressed as a single number (in milliseconds) e.g. the input
xml has 1088499889000 that corresponds to the date 2004-06-29
09:04:49.000GMT.
Doing this conversion within java is simple. To try and do this within XSLT,
I looked up extensions like XSLT-SL and EXSLT - but they do not seem to have
functions for this. Are there any extensions available that I could use for
this conversion?
Alternatively I saw that Xalan-J allows calls to java functions from XSL. So
an option is to convert the numeric date by calls to Java api. But
restrictions on parameter-types in such calls introduce difficulty here.
Is there any other/better/easier way to do this?
If making Java calls from XSL is to be used, how bad would be the
performance impact of that?
- Vish.