Hi, David.
"Karr, David" <[EMAIL PROTECTED]> wrote on 2005-11-04 01:13:14 PM:
> I'm trying to understand what exslt functions are supported natively in
> Xalan-J (2.5.2). In the docs, when I click on the "EXSLT date-and-time
> functions" link, it sends me to the javadoc for the implementation
> class. I can only make assumptions about what methods and arguments are
> available.
I agree that the documentation that we've provided for the EXSLT
functions leaves something to be desired. I would encourage you to open a
bug report requesting that the documentation be improved.
> From this, I'm guessing I could call "date:date()" and
> "date:date-time()", and these work. However, I tried calling
> "date:date('YY-MM-DD')" and it returns nothing. It doesn't fail, it
> just returns an empty string.
I believe that the argument to date:date, et al. is an actual date,
time or date-time value which is to be formatted as CCYY-MM-DD - the
argument is not supposed to be a format string such as 'YY-MM-DD'. If no
argument is specified, the current date and time are used. If the
argument can't be interpreted as a date or time value, the function
returns an empty string, which explains the behaviour you observed; EXSLT
requires that. Most of the other date/time functions follow the same
form: the functions format the input date or time value using a fixed
format; if no argument is specified, the current date/time is used; if the
input string is invalid, the function returns an empty string.
I believe you need to use the date:format-date function to specify
your own format. For example, "date:format-date('2005-11-07',
'yy-mm-dd')".
I hope that helps.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]