[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: current-dateTime()

Subject: Re: current-dateTime()
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 18 Apr 2008 14:05:52 +0100
Re:  current-dateTime()
On 18/04/2008, John Snelson <john.snelson@xxxxxxxxxx> wrote:
>  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.

Sure - I understand there's no concept of time in the evaluation of a
transform but there certainly is for me sat in my chair waiting for it
to finish :)

I often do:

<xsl:if test="position() mod 1000 eq 0">
  <xsl:message select="concat('Processed ', position(), '/', $total')"/>

to output:

Processed 1000/1000000
Processed 2000/1000000
...

which is good enough to show something is happening but it would've
been nicer to also show an estimated finish time based on progress so
far.

I wrongly thought that the "implementation dependent" part meant the
processor could return different values for multiple calls to
current-dateTime()... instead of merely the freedom to choose the
instant at which it takes the fixed value.

It should be straightforward to write an extension function instead...

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.