[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] how with xPath 1

Subject: Re: [xsl] how with xPath 1
From: Liam R E Quin <liam@xxxxxx>
Date: Sun, 15 Apr 2012 14:48:00 -0400

On Sun, 2012-04-15 at 17:34 +0100, Michael Kay wrote:
> XPath 1.0 is not "relationally complete", that is, there are queries 
> expressible in first-order predicate calculus that are not expressible 
> in XPath 1.0. This might well be one of them. In such cases you need 
> some assistance from the host language (e.g. XSLT or Java).

Or, if it _is_ possible, the resulting expression might be so obscure
and difficult to maintain that you're better off doing something else -
e.g. combining two XPath result sets in the host language.

When I was an undergraduate, a friend wrote a program to convert decimal
to Gray code using a one-line recursive function. It worked perfectly
for all his test cases. The next day he tried to understand how it
worked, and couldn't (and he was one of the smartest people I've ever

I think in the end he submitted a different version, since the lecturer
graded by reading the printed programs, and was unlikely to give high
marks to unintelligible solutions :-)


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

Current Thread