Update XPATH from 1.0 to 3.1
Reported by
piotrkak...@gmail.com,
Feb 7 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 Steps to reproduce the problem: 1. visit e.g. this site: https://afterthoughtsoftware.com/posts/Playing-with-XPath-in-Google-Chrome 2. press F12 3. go to Console tab 4. paste this XPath expression: $x("//p[contains(lower-case(.), 'xpath')]") What is the expected behavior? It should find all elements containing "xpath" (case-insensitive). What went wrong? It returns: Uncaught DOMException: Failed to execute '$x' on 'CommandLineAPI': The string '//p[contains(lower-case(.), 'xpath')]' is not a valid XPath expression. at <anonymous>:1:1 It fails and it's because of lower-case function which is used. XPath doesn't have lower-case funcion - it appeared in XPath 2.0. Did this work before? No Chrome version: <Copy from: 'about:version'> Channel: stable OS Version: 10 Flash Version: Shockwave Flash 24.0 r0 For now Google Chrome supports only XPath 1.0 which appeared in 1999. XPath appeared in 2007 and from 2014 we have XPath 3.0. I don't understand why neither Chrome nor Firefox updated XPath to the newer version. Could you explain why and when it will be updated (if ever)?
,
Feb 11 2017
Thanks. That was the question, though. Why Chrome doesn't support XPath 3 yet and only XPath 1.
,
Feb 13 2017
,
Feb 13 2017
Issue 474137 has been merged into this issue.
,
Feb 13 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 16 2018
FYI, I don't know how to change this issue to "Available" again, nor how to remove "Hotlist-Recharge-Cold". Perhaps I don't have permissions to do that.
,
Apr 12 2018
,
Apr 12 2018
We support whatever xpath features that libxml2 supports, as far as I can tell.
,
Jun 23 2018
Seems right, thanks for informing. But I guess this doesn't just fix the problem. It means it would be the right move to put some resources into implementing XPath 3.1 in libxml2. |
||||
►
Sign in to add a comment |
||||
Comment 1 by kozyatinskiy@chromium.org
, Feb 7 2017Status: Untriaged (was: Unconfirmed)