Skip to content

Conversation

@simonwuelker
Copy link
Contributor

@simonwuelker simonwuelker commented Nov 12, 2025

The result of a predicate can depend on the position of the node in its set, and this position is dependent on the axis that the node set came from. This is specified in https://www.w3.org/TR/1999/REC-xpath-19991116/#predicates.

Additionally, this change fixes a small bug in the implementation of preceding:: (#40588) where the root of a subtree would be included twice. That wasn't discovered earlier because nodes are deduplicated at the end of the evaluation.

Testing: New tests start to pass, this change adds more tests

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 12, 2025
Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there 🎉

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 12, 2025
@TimvdLippe TimvdLippe added this pull request to the merge queue Nov 12, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2025
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 12, 2025
@simonwuelker simonwuelker force-pushed the xpath-sorting-predicates branch from 29e4a21 to 5e475e3 Compare November 12, 2025 15:35
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 12, 2025
@yezhizhen
Copy link
Member

We need to merge #40595 first to fix yanked crate.

@simonwuelker
Copy link
Contributor Author

My bad, I thought rebasing was enough.

@yezhizhen yezhizhen enabled auto-merge November 12, 2025 23:02
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@yezhizhen yezhizhen force-pushed the xpath-sorting-predicates branch from 5e475e3 to c7d7049 Compare November 13, 2025 10:18
@yezhizhen
Copy link
Member

Emm I clicked "rebase branch" in GitHub UI. I thought it would be seamless but somehow got me involved too. Feel free to repush by yourself. @simonwuelker

@yezhizhen yezhizhen disabled auto-merge November 13, 2025 10:20
@simonwuelker simonwuelker added this pull request to the merge queue Nov 13, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 13, 2025
@simonwuelker
Copy link
Contributor Author

I thought it would be seamless but somehow got me involved too. Feel free to repush by yourself. @simonwuelker

I don't mind (:

Merged via the queue into servo:main with commit c039078 Nov 13, 2025
32 checks passed
@simonwuelker simonwuelker deleted the xpath-sorting-predicates branch November 13, 2025 12:02
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 13, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 13, 2025
When a NodeSet is passed to the `id` function then we want to act as if
we were computing the union of individual `id` calls for each node in
the set. We weren't doing that before.

Depends on #40592
Testing: A new test starts to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
github-merge-queue bot pushed a commit that referenced this pull request Nov 13, 2025
When a NodeSet is passed to the `id` function then we want to act as if
we were computing the union of individual `id` calls for each node in
the set. We weren't doing that before.

Depends on #40592
Testing: A new test starts to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants