Re: variable binding in XPath was: Comments on XPath (30th April)

> Yes. The strongest use case for adding LET is that it would allow you to
> bind to the context node at each level of predicate nesting:
> 
>    chapter[let $c := @id return section [starts-with(@id,$c)]]

'course if you don't provide let then we'll end up telling people to
abuse for instead...


chapter[for $c in @id return section [starts-with(@id,$c)]]

let reads better but is only extra functionality if you want to bind to
a sequence of more than one item. I suspect that extra functionality
will be needed if (as in the current draft) sequence manipulation is 
an XPath rather than XSLT operation.


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Received on Wednesday, 22 May 2002 16:20:30 UTC