xsl-list
[Top] [All Lists]

Re: [xsl] current-dateTime()

2008-04-18 05:14:17
Hi Andrew,

XPath 2.0 and XSLT 2.0 are declarative languages that have no conventional notion of instruction order, and therefore have no internal notion of time passing. An optimizer is free to do any number of things with your stylesheet, including parallelize it across multiple machines, and reorder it any number of different ways. When these things are going on, the idea of outputting the time between two events happening has very little meaning.

John


Andrew Welch wrote:
What is the reasoning behind defining as current-dateTime() and
current-time() as being "current at some time during the evaluation of
a query or transformation"?

Saxon seems to follow the above and return the same value for each
call to the function, even during transformations that can last
several minutes (or hours or days).

It would be really useful if it returned the actual dateTime at the
time of the call so you could implement a progress reporting feature
in the transform - you could say how many records were processed in a
given time and based on that suggest when the transform might finish.

The spec does say it's implementation dependent, so I wonder why it's
fixed when people can do that themselves with a variable... if it
returns the time when it's called then it opens up quite a few
possibilities (especially where standalone transforms orchestrate the
entire processing)

thanks


--
John Snelson, Oracle Corporation            http://snelson.org.uk/john
Berkeley DB XML:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>