xsl-list
[Top] [All Lists]

RE: [xsl] current-dateTime()

2008-04-19 00:28:19
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.

It wouldn't be as useful as you think. Let's say you use an extension
function that does this, as has been suggested:

<xsl:variable name="startTime" select="xx:current-dateTime()"/>
... do some processing ...
<xsl:variable name="endTime" select="xx:current-dateTime()"/>
<xsl:message select="$endTime - $startTime"/>

The final result will be a negative duration, because Saxon will evaluate
$endTime before it evaluates $startTime.

Michael Kay
http://www.saxonica.com/


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