Re: [xsl] question about identity transform

Subject: Re: [xsl] question about identity transform
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 2 Nov 2006 16:28:32 GMT
> I haven't implemented an XSLT processor, but when is this distinction 
> even useful, in practice?

In practice the processing order is externally visible as soon as you
put xsl:message in any template (or call an extension function with side
effects) The messages can (and sometimes do) come out in surprising orders,
especially with respect to variable evaluation.

More generally I often find it useful when replying on this list to
stress that processing order is undefined, as it's one way of explaining
why variables can not be re-bound. People coming from imperative
programming languages often see this as an arbitrary, even bizarre,
restriction imposed on the language, but once you understand the
underlying processing model of a declarative language you'll see that
this behaviour of variables is a natural and necessary feature of the
language. Also that some declarative languages that do offer imperative
features such as variable assignment can only do so by breaking (or at
least straining) the underlying model, which usually leads to a rather
more fragile programming environment. Of course this line of reasoning
helps with some people and not with others, some people (perfectly
reasonably) just want to know what the rules are, without being swamped
in abstract programming language theory.

David

Current Thread