This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Higher-Order Functions in XPath 2.0
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 16 Jan 2002 16:42:27 +0000
- Subject: Re: [xsl] Higher-Order Functions in XPath 2.0
- Organization: Jeni Tennison Consulting Ltd
- References: <20020116100641.28741.qmail@web14510.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Dimitre,
> Bellow is a draft proposal for implementing higher-order functions
> in XPath 2.0.
Looks good to me. Another example that you might want to add under the
regular expression section is multiple replacements of characters by
strings within the same string, which was an issue recently raised on
XML-Dev:
http://lists.xml.org/archives/xml-dev/200201/msg00817.html
refers to:
http://www.kuro5hin.org/story/2002/1/15/1562/95011
which points out how easy the problem is to solve with higher-order
functions in Haskell :)
The replace() function in XPath isn't going to be able to handle this
problem particularly elegantly either, I think - well, you could do
lots and lots of nested calls to replace() but that isn't particularly
easy to manage!
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list