- From: TAN Kuan Hui <kuanhui@mobileworkspace.com>
- Date: Tue, 5 Feb 2002 12:14:00 +0800
- To: <www-xml-query-comments@w3.org>, <svincent@exalt.com>
Hi Shawn, > From: Shawn Vincent <svincent@exalt.com> > To: XQuery Comments <www-xml-query-comments@w3.org>, Shawn Vincent > <svincent@exalt.com> > Subject: ISSUE: Misalignment between types and paths > > > for $x in $organization//.[. instance of element of type Person] return > process-person ($x) IMHO, a better and more generic solution is to allow variable declaration, vis-a-vis, Variable ::= Datatype? "$" QName then your example becomes, for element of type Person $x in $organization//Person return process-person ($x) Yes, its still verbose but I think more readable. More importantly, the query engine can perform a "type filter" on the returning sequence as the expected return type is known. Indeed, with this approach, optimization is more generic and is applicable throughout the whole grammar on any returning sequences. Thanks. Kuan Hui
Received on Monday, 4 February 2002 23:14:14 UTC