New issue
Advanced search Search tips

Issue 689271 link

Starred by 7 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Update XPATH from 1.0 to 3.1

Reported by piotrkak...@gmail.com, Feb 7 2017

Issue description

UserAgent: 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)?

 
Components: -Platform>DevTools Blink>XML
Status: Untriaged (was: Unconfirmed)
In DevTools console we just uses Xpath bindings. As soon as Chrome supports new version XPath - DevTools console will support it.
I'm not sure about any related current work on implementation of new xpath spec and about any plans.
Forwarded to Blink>XML component.
Thanks.

That was the question, though. Why Chrome doesn't support XPath 3 yet and only XPath 1.

Comment 3 by kojii@chromium.org, Feb 13 2017

Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Status: Available (was: Untriaged)

Comment 4 by kojii@chromium.org, Feb 13 2017

 Issue 474137  has been merged into this issue.
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 13 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
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.
Status: Available (was: Untriaged)
We support whatever xpath features that libxml2 supports, as far as I can tell.
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