xsl-list
[Top] [All Lists]

RE: [xsl] HOF in XPath/XSLT 2.1?

2009-10-13 18:36:14
The XSL WG has discussed this and is I think very likely to include 
higher-order functions in XSLT 2.1 and XPath 2.1, but the exact 
details are not yet decided (and indeed, the formal decision to go 
ahead is not yet made).

Very interesting, and somewhat unexpected (I thought it would 
be considered an overly powerful and complicated feature for 
XPath, to be honest). I definitely hope it gets in, because 
this would have one curious side effect specifically for 
XPath: it will finally become possible to bind a variable to 
a sequence from within XPath expression, same as what "let" 
can do in XQuery. 

This workaround won't be needed, because "let" is being added to XPath 2.1
anyway.

There's a real tension here: for a lot of XPath applications, XPath 2.0 is
already too big, and there's a strong desire to keep it small. But when
we're trying to decide whether some functionality should be provided through
XSLT syntax or XPath syntax, we tend to think in terms of what's most
effective for XSLT programmers, and that can mean making XPath bigger: other
constituencies with an interest in free-standing XPath are not well
represented.

Because we don't have full composability between XPath and XSLT, there's
also a tendency to duplicate functionality across the two languages - an
obvious example is conditional expressions, and we could easily end up
having syntax in both languages for creating anonymous local functions. I
don't particularly want to do that.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 


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

<Prev in Thread] Current Thread [Next in Thread>