The Ancestor Axis

The ancestor axis specifies the ancestors, such as the parent or grandparent, of the current object. For example, the following search path selects the package object that is the ancestor of the folder object named Documentation Report Samples:

/content//folder[@name='Documentation Report Samples']/ancestor::package