Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.0.1
-
None
-
None
Description
Expression with position function are supported in XPath but does not work.
All rows are returned when equality operator is used.
public void testXPathPosition() throws Exception {
Node foo = testRootNode.addNode("name");
Node bar = testRootNode.addNode("name");
testRootNode.save();
String xpath = "//name[position()=2]";
Query q = superuser.getWorkspace().getQueryManager().createQuery(xpath, Query.XPATH);
QueryResult result = q.execute();
checkResult(result, 1);
checkResult(result, new Node[]
);
}