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

Re: XSLT repetition constructs

Subject: Re: XSLT repetition constructs
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Mar 2019 16:15:20 -0000
Re:  XSLT repetition constructs
On Wed, Mar 6, 2019 at 5:01 AM John Lumley john@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:


> > All of these are *mapping" operations, like the map function in
> > Haskell. These have nothing to do with repetition.
>
> Note that the XSLT3.0 specification does actually describe these under a
> chapter heading "Repetition".....
>

Then this is a mistake in the specification -- time for errata.
Repetition implies time passing during the transformation and there is
no notion of "passed time" or time-ordering of execution in XSLT. This
was by design. In fact special care was taken so that functions like
current-time() always return the same value during transformation.

To put it in other words, if we apply templates to a set of items and
output (using <xsl:message/>) the value of current-time() within the
selected template for each item, we get the same value -- so all these
operations were executed at the same time...  This definitely is not
"repetition"

> And one can consider a mapping over a finite set of domain points as
> 'repeat this function over each of these points' ....

"Repeat" means do something first and then do it again. If we do not
specify what is to be done "first" then we cannot speak about
repetition.

It would be correct to say instead: "**Apply** this function on each of these"

Cheers,
Dimitre

>
> On 05/03/2019 22:17, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote:
> > It isn't correct to use "repetition" for a set of operations that are
> > independent from each other and can be executed in any order or in
> > parallel.
> >
> > In this group fall such operations as <xsl:for-each>. the XPath for
> > expression, the ! (bang) operator and applying a function in the last
> > location step of an XPath step-expression (sorry if I don't remember
> > the exact terminology).
> >
> > All of these are *mapping" operations, like the map function in
> > Haskell. These have nothing to do with repetition.
>
> Note that the XSLT3.0 specification does actually describe these under a
> chapter heading "Repetition".....
>
> And one can consider a mapping over a finite set of domain points as
> 'repeat this function over each of these points' ....
>
> --
> *John Lumley* MA PhD CEng FIEE
> john@xxxxxxxxxxxx <mailto:john@xxxxxxxxxxxx>
> on behalf of Saxonica Ltd
> 



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

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.