xsl-list
[Top] [All Lists]

Re: [xsl] selecting from sequences

2008-12-18 12:28:23
On Thu, Dec 18, 2008 at 04:36:17PM -0000, Michael Kay wrote:

Although it's clear from these responses that there are solutions to these
requirements, I have always felt the need for  higher order operators to
achieve this effect:

$seq[>>EXP]    everything in $seq after the first item that satisfies EXP
$seq[>>=EXP]   everything in $seq after and including -"-
$seq[<<EXP]    everything in $seq before the first item that satisfies EXP
$seq[<<=EXP]   everything in $seq before and including -"-

couldn't one get there with, say,
sequence-before(sequence, item+)
and the corresponding sequence-after,
by analogy to substring?

One could then write,
    sequence-before($sequence, $sequence[some-expr])

LISP people are thinking about car and cdr here... (head and tail in
Scheme) but LISP snad Scheme of course have the higher-order
capabilities to make those useful.

Liam


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

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