This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XPath 2.0: Collection-Valued Expressions (Was: Re: XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]