Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(css-selector): default XML namespace should not be applied to wildcard #3413

Merged
merged 4 commits into from
Jan 19, 2025

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

When performing a CSS selector query, an XML document's root namespace declarations are injected into the XPathVisitor, and the default namespace is applied to any non-namespaced element in the resulting xpath query.

However, the wildcard selector "*" should not have this namespace applied. This regressed in v1.17.0 with 179d74d.

Fixes #3411

Have you included adequate test coverage?

Yes.

Does this change affect the behavior of either the C or the Java implementations?

N/A

When performing a CSS selector query, an XML document's root namespace
declarations are injected into the XPathVisitor, and the default
namespace is applied to any non-namespaced element in the resulting
xpath query.

However, the wildcard selector "*" should not have this namespace
applied. This regressed in v1.17.0 with 179d74d.

Fixes #3411
this time, it's the ruby:alpine images that removed all the -dev
libraries. JFC i'm just trying to stay green here.
@flavorjones flavorjones force-pushed the flavorjones-3411-xml-css-search branch from 68cf827 to 671462f Compare January 19, 2025 18:05
@flavorjones flavorjones enabled auto-merge January 19, 2025 18:26
@flavorjones flavorjones merged commit d3985fd into main Jan 19, 2025
145 of 146 checks passed
@flavorjones flavorjones deleted the flavorjones-3411-xml-css-search branch January 19, 2025 18:32
@flavorjones flavorjones changed the title fix(css-selector): default XML namespace is not applied to wildcard fix(css-selector): default XML namespace should not be applied to wildcard Jan 19, 2025
flavorjones added a commit that referenced this pull request Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Nokogiri::XML::Document#css no longer matches namespaced XML attributes
1 participant