Bug #3596
closedcurrent-date and current-dateTime does not give the instant date/time stamp
100%
Description
The current-date and current-dateTime does not give the instant date/time stamp when called during an 'interactive' XSLT event. This is noticeable if the browser is not refreshed overnight.
As a workaround I guess I could force a call to the transform function or call out to JavaScript.
It would be desirable to have implemented in Saxon-JS the extension function saxon:timestamp.
Updated by Michael Kay almost 7 years ago
I think it would probably make sense for current-dateTime() to be updated whenever an ixsl:schedule-action occurs or when an event-driven template rule is activated. If we went this way we would have to make sure that the optimizer is aware that current-dateTime() and friends are no longer pure functions, and mustn't be promoted to global variables. If that proves problematic, then using saxon:timestamp() for the purpose might be an alternative way forward.
Note also that implicit-timezone() can also potentially change while a stylesheet is waiting for the next user event.
Updated by Debbie Lockett almost 7 years ago
Function saxon:timestamp() implemented (1.0 and trunk branches).
Updated by Debbie Lockett over 6 years ago
JS unit test saxonExt/timestamp01 added (note saxon:timestamp() available from 9.8).
To do: add information to documentation.
Updated by Debbie Lockett over 6 years ago
- Status changed from New to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
Documentation updated: added subsection about available Saxon extensions in Conformance section (conformance/saxon-extensions).
Updated by Debbie Lockett over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.1.0
Bug fix applied in the Saxon-JS 1.1.0 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page