xsl-list
[Top] [All Lists]

Re: [xsl] how with xPath 1

2012-04-15 13:51:54
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
known).

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

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>