servo/components/script/xpath
Ville Lindholm 475a3dfa38
script: Fix two issues in the XPath parser to pass all xml_xpath_tests.xml tests (#37279)
1. Better handling of namespaces for element and attribute names in XML
mode (read: non-HTML mode)
2. While parsing, pass along context on whether we are in an absolute
(`/`) or descendant (`//`) part of the query, and use it to correctly
enumerate descendants according to where we are in the evaluation of the
AST.

Testing: All 1024 tests in `xml_xpath_tests.xml` (actually
`xml_xpath_runner.html`) pass, as well as some random tests in
`text-html-attributes.html`.
Fixes: #37278

---------

Signed-off-by: Ville Lindholm <ville@lindholm.dev>
2025-06-06 07:16:42 +00:00
..
context.rs script: Fix two issues in the XPath parser to pass all xml_xpath_tests.xml tests (#37279) 2025-06-06 07:16:42 +00:00
eval.rs script: Fix two issues in the XPath parser to pass all xml_xpath_tests.xml tests (#37279) 2025-06-06 07:16:42 +00:00
eval_function.rs XPath: implement lang() and id() core functions (#34594) 2025-06-02 19:00:13 +00:00
eval_value.rs XPath: implement lang() and id() core functions (#34594) 2025-06-02 19:00:13 +00:00
mod.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
parser.rs script: Fix two issues in the XPath parser to pass all xml_xpath_tests.xml tests (#37279) 2025-06-06 07:16:42 +00:00