Re: DM expressing until-like queries in XPath 2.0

Kay, Michael wrote:

>Maarten,
>
>Thankyou for sending this comment:
>
>http://lists.w3.org/Archives/Public/public-qt-comments/2003Nov/0302.html
>
>The joint XSL and XQuery working groups looked at this comment and the
>subsequent correspondence at our January meeting.
>
>There is always going to be a class of queries that can only be
>expressed using recursive functions (or higher-order functions, if we
>had them). Whether or not your particular example falls into this class
>or not isn't directly relevant to this.
>
FWIW, the query in question can be expressed in XPath 2.0 without higher 
order functions. This is because you have the set difference operator in 
XPath 2.0, viz., the except operator. There is a nice (unpublished) 
result that says that all queries expressible in FO3 (that's first order 
logic with only 3 variables) over a signature with the 
ancestor-descendant relationship and a document-order relationship can 
be expressed in XPath if you have all axes, node tests, filter 
expressions and the set difference. So you don't even need a  
for-expression for this query.

-- Jan Hidders

-- 
   .-----------.-----------------------------------------------------.
  / Jan Hidders \  Home Page: http://www.win.ua.ac.be/~hidders/       \
 .---------------.-----------------------------------------------------.
 | Post-doctoral researcher               e-mail: jan.hidders@ua.ac.be |
 | Dept. Math. & Computer Science         tel: (+32) 3 265 38 73       |
 | University of Antwerp                  fax: (+32) 3 265 37 77       |
 | Middelheimlaan 1, BE-2020 Antwerpen, BELGIUM     room: G 3.21       |
 `---------------------------------------------------------------------'
 

Received on Wednesday, 4 February 2004 09:36:49 UTC