code: public static String removeXpath(String path) {
  
          if (path.indexOf('/') > -1) {
              // this is a complex path over more then 1 node
              StringBuffer result = new StringBuffer(path.length() + 32);
  
              // split the path into sub-elements
              List<String> elements = CmsStringUtil.splitAsList(path, '/');
              int end = elements.size() - 1;
              for (int i = 0; i <= end; i++) {
                  // remove [i] from path element if required
                  result.append(removeXpathIndex(elements.get(i)));
                  if (i < end) {
                      // append path delimiter if not final path element
                      result.append('/');
                  }
              }
              return result.toString();
          }
  
          // this path has only 1 node, remove last index if required
          return removeXpathIndex(path);
      }
docs: Removes all Xpath index information from the given input path.<p>
  
  Examples:<br>
  <code>title</code> is left untouched<br>
  <code>title[1]</code> becomes <code>title</code><br>
  <code>title/subtitle</code> is left untouched<br>
  <code>title[1]/subtitle[1]</code> becomes <code>title/subtitle</code><p>
  
  @param path the path to remove the Xpath index information from
  
  @return the simplified Xpath for the given name