This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XPath 2.0: Collection-Valued Expressions (Was: Re: XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: XPath 2.0: Collection-Valued Expressions (Was: Re: [xsl] XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)
- From: elenz at xyzfind dot com
- Date: Fri, 07 Sep 2001 9:08:29 PST
- Cc: jim dot melton at acm dot org
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Jeni,
> Work out the total payable on a purchase order:
>
> xf:sum(Order/Item, xf:expression('@Price * @Quantity'))
I recognize that dynamic XPath evaluation is a requested feature, but I
don't think the examples you provide necessitate such a construct, since
in each example, the expression is statically available. The
functionality could be provided by another construct that lets you
generate a sequence of simple values and to pass that to any of the
sequence-oriented functions.
For example, XQuery provides such a construct:
xf:sum(for $x in //Order/Item return $x/@Price * $x/@Quantity)
No dynamic expressions are used here.
This is not to say that this syntax will or will not be a part of XPath.
I'm just pointing out that dynamic expression parsing isn't necessary for
the use cases you cite.
Evan Lenz
XYZFind Corp.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list