[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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. " http://aspn.activestate.com/ASPN/Mail/Message/xsl-list/967679 Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|