W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2002

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

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 22 May 2002 21:20:11 +0100
Message-Id: <200205222020.VAA18005@penguin.nag.co.uk>
To: Michael.Kay@softwareag.com
CC: evan@evanlenz.net, public-qt-comments@w3.org

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


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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:09 UTC