RFR: 8289511: Axes: child [v2]
Bill Huang
duke at openjdk.org
Thu Jul 14 20:09:04 UTC 2022
On Thu, 14 Jul 2022 01:16:43 GMT, Joe Wang <joehw at openjdk.org> wrote:
>> Bill Huang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into JDK-8289511
>> - Added more XPath expression test cases and created negative tests for invalid expressions.
>> - Created XPathChildTest.java
>
> test/jaxp/javax/xml/jaxp/unittest/xpath/XPathChildTest.java line 135:
>
>> 133: {"/store/child::*[attribute::*]/author", AUTHOR_1},
>> 134: {"/store/*[*][*][*][*][*][*][*][*]/author", AUTHOR_1},
>> 135: {"/store/*[@*][@*][@*][@*][@*][@*][@*][@*]/author", AUTHOR_1},
>
> What are we testing here, I mean vs ```*[*] or *[@*]?```
Given the wildcard `*` selects all children of the context node, `*[*] or *[@*]` will select all children that with at least one child or one attribute. This is what we cover with line 132 and 133. For line 134 and 135, we are trying to see if multiple wildcards swallow the child node in the chain.
-------------
PR: https://git.openjdk.org/jdk/pull/9484
More information about the core-libs-dev
mailing list