Re: [whatwg/dom] Proposal - Update XPath to (at least) v2.0 (#903)

Maybe a short-term (or medium-term) way forward would be to standardize an API for calling JavaScript functions from XPath. People could then either use the existing regular expression engine in JavaScript directly from XPath, or could implement fn:relace(). I know Tom Hodgins (innovati) has experimented with XPath in CSS selectors, but the escaping you have to do makes it essentially untenable - https://codepen.io/tomhodgins/pen/KxOOzZ

@benjamingr thanks for the kind mention.  The argument about popularity is like the story of a town  separated from another town by separated by a great ravine - people asked the mayor for a bridge and his response was, there's very little demand: hardly anyone swims across the rapids today,  so we should not build a bridge.  The install instructions for fontoxpath assume an experienced JavaScript developer; frameless.io requires registration and has usage restrictions. The others i know of are commercial products, so for sure there is demand. And as you say, out of the browser, XPath is widely used in specific areas - along with XSLT for that matter. Any spec with an X in its name has an uphill struggle in browserland these day, and it's not an easy change that's proposed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/903#issuecomment-720137920

Received on Sunday, 1 November 2020 19:20:09 UTC