The path constraint restricts the result node to a scope specified by a path expression. The following path constraints must be supported:
Exact
Child nodes
Descendants
Descendants or self
XPath: In XPath the location steps specify the path constraint.
SQL: In SQL the path constraint occurs as an ANDed test within the WHERE clause of the pseudo-property jcr:path using either the = operator or the LIKE operator.
Exact path constraint examples:
SQL |
XPath |
SELECT * |
/jcr:root/some/ |
SELECT * |
/jcr:root/some[1]/element(nodes, my:type)[1] |
Child nodes path constraint examples:
SQL |
XPath |
SELECT * |
/jcr:root/some/nodes/ |
SELECT * |
/jcr:root/some[1]/nodes[1]/ |
Descendants path constraint examples:
SQL |
XPath |
SELECT * |
/jcr:root/some/nodes// |
SELECT * |
/jcr:root/some[1]/nodes[1]// |
Descendants or self path constraint examples:
SQL |
XPath |
SELECT * |
/jcr:root/some/nodes// |
SELECT * |
/jcr:root/some[1]/nodes[1]// |