Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #396.
The XML parser already knows the reserved
xmlbinding, but XPath was looking it up in each element’s declared namespaces. For<r lang="other" xml:lang="en"/>,//@xml:*with an explicit XML namespace map returned no attributes. The change shares the reserved binding between the parser, the node namespace lookup, and XPath. It also covers lookup by a different expression prefix andnamespace-uri(), without adding a synthetic declaration to the document.The other failure in the issue was independent: Ruby treats an empty string as true. Non-numeric predicates now use XPath’s existing boolean conversion, while numeric predicates still compare against the context position. A regression test keeps a text node containing
0but drops a whitespace-only one afternormalize-space(.).Both new tests failed on master (
f073640a). On macOS, Ruby 4.0.1:bundle exec rake testand the frozen-string-literal run each passed (877 tests, 2,798 assertions);bundle exec rake warning:error rdocalso passed. Other platforms and Ruby versions were not tested locally.AI assistance: used OpenAI Codex to develop the patch and regression tests and run the checks above.