Re: [xsl] current-dateTime()

Subject: Re: [xsl] current-dateTime()
From: Liam Quin <liam@xxxxxx>
Date: Fri, 18 Apr 2008 10:33:28 -0400
On Fri, Apr 18, 2008 at 05:55:07AM -0700, Dimitre Novatchev wrote:
[...]
>   <xsl:variable name="$vY" select="f:someFun($vX)" as="someType"/>
> Then it is true that:
>    creationTime($vY) > creationTime($vX)

Actually this is far from certain, odd as it may seem.

It depends what the compiler knows about f:fomeFun().  For
example, if the function does not use its argument, then the
variables can be created in either order, and quite possibly
statically, before any other processing.

[...]

> XSLT supports a more specific run-time serialization. Let's have the
> following tree:
> 
> <a>
>  <b>
>    <c>
>      <d/>
> 
[...]

> strtRunTime(tmpl-matchA) < strtRunTime(tmpl-matchB) <
> strtRunTime(tmpl-matchC) < strtRunTime(tmpl-matchD)

No.  There is no guarantee of that at all.  An XSLT processor
could start at the template for <d /> and work upwards.  Again,
I don't know if there any that do (I'd be be interested to learn),
but you cannot make this sort of assumption.

However, in an implementation that does not memoize the results of
external functions, you can indeed in practice use some of the
techniques you describe.

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/

Current Thread