Parse qualified names with non-alpha characters in xpath (#39409)

The existing parsing rules are too strict and only allow alpha and
alphanumeric characters. Instead, we should follow the production
defined in https://www.w3.org/TR/REC-xml-names/#NT-NCName.

Testing: New tests start to pass
Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-09-21 05:45:04 +02:00 committed by GitHub
parent 4d43844ece
commit 2c8533f38e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 24 deletions

View file

@ -2,20 +2,8 @@
[Select html element based on attribute mixed case]
expected: FAIL
[Select HTML element with non-ascii attribute 1]
expected: FAIL
[Select HTML element with non-ascii attribute 2]
expected: FAIL
[Select HTML element with non-ascii attribute 3]
expected: FAIL
[Select both HTML and SVG elements based on mixed case attribute]
expected: FAIL
[Select SVG element with non-ascii attribute 1]
expected: FAIL
[Select SVG element with non-ascii attribute 2]
expected: FAIL

View file

@ -2,9 +2,6 @@
[HTML elements mixed case]
expected: FAIL
[Non-ascii HTML element]
expected: FAIL
[Non-ascii HTML element3]
expected: FAIL