xsl-list
[Top] [All Lists]

Re: [xsl] Apache FOP 0.94 and current-date() current-time()

2008-08-07 15:46:45
You have a couple of options:

* "FOP" (actually Xalan) supports java calls. The syntax is horrible, but it will give you access to the Date class, which is what you need [1]. Not recommended unless you know what you are doing.
* You could pass the date in as a parameter to the XSLT.
* Do as Micheal suggests and use Saxon.
* Try using the date extension [2]. Don't know if Fop 0.94 supports this.

You haven't said if you are embedding FOP or calling in the command line. I would recommend starting by giving the date extension a go.

[1] http://www.cafeconleche.org/books/xmljava/chapters/ch17s03.html
[2] http://www.exslt.org/date/functions/date/index.html
Hello,

We are using Apache FOP 0.94, and would like to display the current
system date and time at the bottom of each page.
We tried <xsl:value-of select="current-date()"/> and <xsl:value-of
select="current-time()"/>.
Unfortunately, the Apache FOP error message is: could not find function:
current-date.
Whereas Saxon9 can easily carry out this transformation (but not the
formatting).

What would be the best strategy? to continue using Apache FOP, but to
display the current-date() and current-time().

Thank you,

Linas


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
Kamal Bhatt


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--