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

Re: Re: Re: A question about the expressive power and

Subject: Re: Re: Re: A question about the expressive power and limitations of XPath 2.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 13 Jan 2002 15:30:46 GMT
Re:  Re: Re: A question about the expressive power and
> A general statement about what "for" cannot do: Any problem of sequence processing,
> which requires that the result of processing an item be used as input for processing
> the next item(s).
> Is this true?

yes I think so (ie you can't implement fold given map, more or less:-)

Of course you can generate a sequence of running totals using something
for $i in 1 to  count($x)
sum($x[position() &lt;= $i])

but that's not really a "running total" as the first bits are repeatedly
re-avaluated, whereas what you'd like to do is pass a two argument
function over the list where at each stage the first argumant is the
previous result and teh second argument is the new item.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.