6.6.4.3 Context Node

The context node of an XPath query is the XML node relative to which the query expression is evaluated.

A relative XPath statement (one that does not have a leading /) will be interpreted relative to the root node of the workspace, which, in the XML document view is the top-most XML element, <jcr:root>. This means that one should not include jcr:root as the first segment in a relative XPath statement, since that element is already the default context node.

An absolute XPath (one with a leading /), in contrast, will be interpreted relative to a position one level above <jcr:root>. This means that an absolute XPath must either begin with // or with /jcr:root in order to match anything at all.