Re: XPath and find/findAll methods

On Tue, Nov 22, 2011 at 12:28 AM, Martin Kadlec <bs-harou@myopera.com> wrote:
> Only reason why XPath is "dead" on the web is because there is not (yet) easy way to use it.

It's worth noting that XPath in browsers is XPath 1.0 which doesn't
have a smooth evolutionary path to XPath 2.x, so browser XPath is an
evolutionary dead end unless forked on a different evolutionary path
than W3C XPath.

Even though XPath might be very important to its user base, in the big
picture it isn't the kind of Web platform feature that would generate
a lot of Web developer mindshare if a browser vendor invested in it.
Chances are that investments in CSS always have a higher return on
investment (in terms of Web developer mindshare) than investments in
XPath. In this situation, I expect there to be no enthusiasm for
polishing what's an evolutionary dead end (XPath 1.0) or for launching
something incompatible that'd require a lot of up-front work (XPath
2.x) while still having to support the existing evolutionary dead end.

Furthermore, XPath 2.x would be a slippery slope towards dependencies
on XML Schema. Even though it's an optional feature, it's prudent to
leave a wide safety margin around optional features. Otherwise,
there's a risk of getting sucked into implementing bad optional
features anyway.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 22 November 2011 08:18:19 UTC