On Wed, 31 Aug 2022 20:16:33 GMT, Bill Huang <d...@openjdk.org> wrote:
> The goal of this task is validating the parent axis contains the parent of > the context node. Context nodes include > - root node > - element nodes > - text nodes > - attribute nodes > - namespace nodes > - comment nodes test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpParentTest.java line 56: > 54: return new Object[][]{ > 55: {"//Customer/parent::*", "//Customers"}, > 56: {"//Customer[1]/text()/parent::*", "//Customer"}, I see that the 2nd parameter meant to be the parent, it thus needs to return a single and unique node. But "//Customer" may return multiple nodes. test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpParentTest.java line 86: > 84: > 85: // parent of document root > 86: {"/.."}, The nature of these two statements seems to be quite different. It might be worth to explain a bit more, a reference to the spec or note from the Slack discussion, sth. that might help the reader of these tests. test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpParentTest.java line 145: > 143: > 144: /** > 145: * Verifies that XPath relative expressions provide a parent node. The context node happens to be the parent node of the 2nd statement. Needs to document it in the description and the params below. ------------- PR: https://git.openjdk.org/jdk/pull/10107