code: public short getLevel(Node n)
    {
  
      short level = 1;
  
      while (null != (n = getParentOfNode(n)))
      {
        level++;
      }
  
      return level;
    }
docs: Get the depth level of this node in the tree (equals 1 for
  a parentless node).
  
  @param n Node to be examined.
  @return the number of ancestors, plus one
  @xsl.usage internal