Subject: Re: [xsl] XSLT Java Extensions From: Johannes Döbler <jd@xxxxxxxxxxxxxx> Date: Mon, 15 Apr 2002 09:49:40 +0200 |
regards, Johannes
Hello ladies/gents, I am trying to use extensions in XSLT to get the current date/time for textual output, but I don't know how to retrieve specific data from the object returned.
Below is a sample of the xsl file that makes the extension call:
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:java="http://xml.apache.org/xslt/java">
.. .. <!-- I am making this call inside the template: --> <xsl:variable name="tmp" select="java:java.util.Calendar.new()"/> <xsl:value-of select="$tmp" /> .. </xsl:stylesheet>
The problem with this is that, when I instantiate the Calendar object it returns a GregorianCalendar object with a great deal of information that I don't want. So when I write it to output, the entire object is returned.
All I need on the text output is YYYYMMDDHHMMSS. These details are stored in the attributes of the Class.
YEAR MONTH DAY_OF_MONTH HOUR_OF_DAY MINUTE SECOND
I tried using
"<xsl:value-of select="java:java.util.Calendar.get(YEAR)" />" etc., but I got error messages when the processor tried to process these lines.
Can someone give me some pointers on this?
Thanks Garvin
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT Java Extensions, Garvin Franco | Thread | RE: [xsl] XSLT Java Extensions, Michael Kay |
Re: [xsl] XSLT Processing Model Que, David Carlisle | Date | RE: [xsl] XSLT Java Extensions, Michael Kay |
Month |