xsl-list
[Top] [All Lists]

Re: [xsl] The output of evaluating an XSLT transform is the same regardless of the order in which output elements are evaluated. Right?

2010-04-13 07:27:02

On 13 Apr 2010, at 13:15, Costello, Roger L. wrote:

Ken Holman wrote:

I'm curious:  why is the "how" important?  I work with these 
technologies every day and I don't care *how* the processor fulfills 
the spec, as long as the spec is fulfilled.  A stylesheet writer's 
responsibility is to understand how the specification works.

Here are a couple answers:

1. I have a "gut feeling" that if I understand _why_ an XSLT document can be 
executed in parallel then it will help me write better XSLT documents.

The intention of XSLT is that it doesn't generate any side effects. The result 
of any section of the document should depend only on its inputs, and the only 
output should be the obvious one. Read up on 
http://en.wikipedia.org/wiki/Functional_programming for some insight.

Of course, it *is* possible to write extension functions that do have 
side-effects. But this should really only be done mindfully, and in full 
knowledge of the consequences. And then only if you don't mind the output of 
your transformation being non-deterministic...


2. I am trying to shift from an imperative mindset to a declarative mindset. 
I have always written XSLT in terms of sequential, step-by-step processing. 
The declarative mindset invites me to break out of that way of thinking, into 
a more parallel mode of thinking. I want to stop doing FORTRAN in XSLT. 
Understanding how things can be done in parallel will help me ... I think. 

Think like this: for a given (portion of) the input, what do you want the 
output to be?

The XSLT processor will then deal with making that happen. How it does it is up 
to it.


/Roger

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


-- 
Bill Michell
billmichell(_at_)gmail(_dot_)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>