Index: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathFactoryImpl.java
===================================================================
--- jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathFactoryImpl.java	(revision 620788)
+++ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathFactoryImpl.java	(working copy)
@@ -430,17 +430,18 @@
         }
 
         /**
-         * @see Path#getAncestor(int)
+         * @see Path#getSubPath(int)
          */
-        public Path getAncestor(int degree) throws IllegalArgumentException, PathNotFoundException {
+        public Path getSubPath(int degree) throws IllegalArgumentException, PathNotFoundException {
             if (degree < 0) {
                 throw new IllegalArgumentException("degree must be >= 0");
-            } else if (degree == 0) {
+            }
+            else if (degree == 0) {
                 return this;
             }
             int length = elements.length - degree;
             if (length < 1) {
-                throw new PathNotFoundException("no such ancestor path of degree " + degree);
+                throw new PathNotFoundException("no sub-path of degree " + degree);
             }
             Path.Element[] elements = new Element[length];
             System.arraycopy(this.elements, 0, elements, 0, length);
@@ -448,6 +449,14 @@
         }
 
         /**
+         * @deprecated use Path#getSubPath(int)
+         */
+        public Path getAncestor(int degree) throws IllegalArgumentException, PathNotFoundException {
+            return getSubPath(degree);
+        }
+
+        /**
+         * @deprecated
          * @see Path#getAncestorCount()
          */
         public int getAncestorCount() {
Index: jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/name/PathBuilderTest.java
===================================================================
--- jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/name/PathBuilderTest.java	(revision 620788)
+++ jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/name/PathBuilderTest.java	(working copy)
@@ -29,6 +29,8 @@
 
 import java.util.Vector;
 
+import javax.jcr.PathNotFoundException;
+
 /**
  * <code>PathBuilderTest</code>...
  */
@@ -92,6 +94,32 @@
         }
     }
 
+    public void testSubPath() throws Exception {
+        for (int i=0; i<tests.length; i++) {
+            JcrPath t = tests[i];
+            if (t.isValid()) {
+                Path p = build(t.path, false);
+
+                for (int degree = p.getLength(); degree >= 0; degree--) {
+                    try {
+                        Path s = p.getSubPath(degree);
+                        assertTrue("\"" + t.path + "\".getSubPath()", t.path.startsWith(pathResolver.getJCRPath(s)));
+
+                        if (t.isNormalized() && !s.equals(p)) {
+                            assertTrue("\"" + t.path + "\".getSubPath()", s.isAncestorOf(p));
+                            assertTrue("\"" + t.path + "\".getSubPath()", p.isDescendantOf(s));
+                        }
+                    }
+                    catch (PathNotFoundException e) {
+                        if (degree < p.getLength())
+                            assertTrue("\"" + t.path + "\".getSubPath()", false);
+                    }
+                }
+
+            }
+        }
+    }
+
     private Path build(String path, boolean normalize)
             throws Exception {
         PathBuilder builder = new PathBuilder();
Index: jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java
===================================================================
--- jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java	(revision 620788)
+++ jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Path.java	(working copy)
@@ -143,30 +143,34 @@
     public Path computeRelativePath(Path other) throws RepositoryException;
 
     /**
-     * Returns the ancestor path of the specified relative degree.
+     * Returns the sub-path of a specified degree.
      * <p/>
-     * An ancestor of relative degree <i>x</i> is the path that is <i>x</i>
-     * levels up along the path.
+     * A sub-path of degree <i>k</i> of a path of length <i>n</i>
+     * consists of the first <i>n - k</i> elements of the path.
      * <ul>
      * <li><i>degree</i> = 0 returns this path.
-     * <li><i>degree</i> = 1 returns the parent of this path.
-     * <li><i>degree</i> = 2 returns the grandparent of this path.
-     * <li>And so on to <i>degree</i> = <i>n</i>, where <i>n</i> is the depth
-     * of this path, which returns the root path.
+     * <li><i>degree</i> = 1 returns this path without its last element.
+     * <li><i>degree</i> = 2 returns this path without its two last elements.
+     * <li>And so on up to <i>degree</i> = <i>n - 1</i>, where <i>n</i> is the
+     * length of this path.
      * </ul>
      * <p/>
-     * Note that there migth be an unexpected result if <i>this</i> path is not
-     * normalized, e.g. the ancestor of degree = 1 of the path "../.." would
-     * be ".." although this is not the parent of "../..".
      *
-     * @param degree the relative degree of the requested ancestor.
-     * @return the ancestor path of the specified degree.
-     * @throws PathNotFoundException if there is no ancestor of the specified degree.
+     * @param degree the degree of the sub-path.
+     * @return the sub-path of the specified degree.
+     * @throws PathNotFoundException if there is no sub-path of the specified degree.
      * @throws IllegalArgumentException if <code>degree</code> is negative.
+     * @see #getLength()
      */
+    public Path getSubPath(int degree) throws IllegalArgumentException, PathNotFoundException;
+
+    /**
+     * @deprecated Use {@link #getSubPath(int)}
+     */
     public Path getAncestor(int degree) throws IllegalArgumentException, PathNotFoundException;
 
     /**
+     * @deprecated Use <code>{@link #getDepth()} - 1</code>.
      * Returns the number of ancestors of this path. This is the equivalent
      * of <code>{@link #getDepth()} - 1</code>.
      * <p/>
@@ -363,7 +367,7 @@
          * in the format "<code>{namespaceURI}localPart</code>" or
          * "<code>{namespaceURI}localPart[index]</code>" in case of an index
          * greater than {@link Path#INDEX_DEFAULT}.
-         * 
+         *
          * @return
          */
         public String getString();
