rewrite
rewrite copied to clipboard
Xpath 'nodes from anywhere' + attribute selection does not work
What version of OpenRewrite are you using?
main branch
How are you running OpenRewrite?
The following test fails on the last assertThat when added to XPathMatcherTest
@Test
void noMatterWhereAttributeSelection() {
assertThat(match("/dependencies/dependency/artifactId[@scope='compile']", xmlDoc)).isTrue();
assertThat(match("//artifactId[@scope='compile']", xmlDoc)).isTrue();
assertThat(match("//dependency/artifactId[@scope='compile']", xmlDoc)).isTrue();
}
Are you interested in contributing a fix to OpenRewrite?
I always want to, but time is short:( #4269 is currently more concerning for us:)
- Now that #4532 was merged, these tests succeed :slightly_smiling_face:
Thanks again @DidierLoiseau !