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

RE: mapping (Was: Re: Re: . in for)

Subject: RE: mapping (Was: Re: Re: . in for)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 8 Jan 2002 02:51:39 -0800 (PST)
 RE: mapping (Was: Re: Re: . in for)
DPawson at rnib dot org dot uk wrote:

> Jeni wrote
> > > This example could be handled with a mapping operator:
> > >
> > >   <xsl:variable name="emps"
> > >     select="//employee[@dept = ($departments -> lower-case(.))]" />
> +1 on mapping, but I dislike the above syntax Jeni.
> Scheme gives (map fn sequence).
> How about 
> select='map lower-case(.) $departments'/>
> or
> select='map (lower-case(.) $departments)'/>
> or does this go against the idea of extending keywords?

In both cases lower-case(.) is a value and not a function. The map function requires
a function as an argument as in:

select='map (lower-case(), $departments)'/>

This would be possible if the XPath 2.0 WG decides for higher-order function support
in XPath 2.0.

Many people already support this idea. A language with higher-order functions can be
simple and powerful, as this is described in:

"Higher-order function support as means to reduce the "standard"
operators/functions. "


Dimitre Novatchev.

Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!

 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.