Re: [xsl] current-dateTime()

Subject: Re: [xsl] current-dateTime()
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 18 Apr 2008 16:47:53 +0200
Liam Quin wrote:
On Fri, Apr 18, 2008 at 02:05:52PM +0100, Andrew Welch wrote:
It should be straightforward to write an extension function instead...

Actually no. A conformant implementation is allowed to call an extension function only once for any given argument value, and to remember the results, to make it stable. A give implementation might let you write such an extension function as you want, but there's no guarantee.

But you can make that guarantee by using newly added nodes, which cannot be pre-evaluated, and add them as a parameter to your extension function. This method was shown in my pure-XSLT approach earlier this thread, or in another post where I show how to create a semi-conformant GUID (which needs a timestamp and a random number, two things that are hard in XSLT).


Cheers,
-- Abel Braaksma

Current Thread