- From: Michael Kay <mhk@mhk.me.uk>
- Date: Sun, 18 Apr 2004 22:21:45 +0100
- To: "'Jason Hunter'" <jhunter@acm.org>, "'Howard Katz'" <howardk@fatdog.com>
- Cc: <www-ql@w3.org>
> Howard Katz wrote: > > Any reason you couldn't set the context node to be *any* > node within a > > particular document (altho it would likely be a very odd > thing to do)? > > Why not allow it to be a *sequence* of nodes, is the better question. > > It's much nicer if //foo would match all foo's within the > default set of > documents. > Replacing the concept of "context item" by one of "context sequence" (or "default set of documents") would create mayhem: what would context position and context size then be, for example? Would "." also return a sequence? Would id() search multiple documents, perhaps finding multiple elements with the same ID? What would the query name(/*) do? If //x were able to return nodes from multiple documents when used at the top level of a query, then presumably you would also want it to be able to do the same when used at other levels (for composability). What new XQuery construct would you want to introduce for setting the context sequence? I agree that it's a pity (from the XQuery point of view) that input() has gone. It never made much sense in XPath or XSLT, but I don't see any reason why there shouldn't be XQuery-only functions just as there are XSLT-only functions. Michael Kay
Received on Sunday, 18 April 2004 17:21:57 UTC