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@xxxxxxxxxxx Date: Fri, 07 Sep 2001 9:08:29 PST |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] same child elements, Manos Batsis | Thread | [xsl] Node's content modification, Auguste Oumar |
XPath 2.0: Conditional Expression (, Jeni Tennison | Date | Re: XPath 2.0: Collection-Valued Ex, Jim Melton |
Month |