xsl-list
[Top] [All Lists]

Re: [xsl] XPath 3.0 is a composable language ... what does that mean?

2012-10-24 06:29:45

On 24/10/2012 12:06, Costello, Roger L. wrote:
Hi Folks,

I read this in the XPath 3.0 specification:

     XPath 3.0 is a composable language

What does that mean?



It means that every operator / language construct allows any expression to appear as its operand, subject only to operator precedence and data typing constraints. For example, you can do

3 + max(for $i in 1 to 10 return (if ($i gt 5) then $i*3 else $i*2)))

Contrast this with XSLT, which is not fully composable: XPath expressions can be used as operands to XSLT instructions, but not the other way around; similarly Java has constructs called statements that cannot be nested inside expressions.

Michael Kay
Saxonica

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