code: public static String concatXpath(String prefix, String suffix) {
  
          if (suffix == null) {
              // ensure suffix is not null
              suffix = "";
          } else {
              if ((suffix.length() > 0) && (suffix.charAt(0) == '/')) {
                  // remove leading '/' form suffix
                  suffix = suffix.substring(1);
              }
          }
          if (prefix != null) {
              StringBuffer result = new StringBuffer(32);
              result.append(prefix);
              if (!CmsResource.isFolder(prefix) && (suffix.length() > 0)) {
                  result.append('/');
              }
              result.append(suffix);
              return result.toString();
          }
          return suffix;
      }
docs: Concatenates two Xpath expressions, ensuring that exactly one slash "/" is between them.<p>
  
  Use this method if it's uncertain if the given arguments are starting or ending with
  a slash "/".<p>
  
  Examples:<br>
  <code>"title", "subtitle"</code> becomes <code>title/subtitle</code><br>
  <code>"title[1]/", "subtitle"</code> becomes <code>title[1]/subtitle</code><br>
  <code>"title[1]/", "/subtitle[1]"</code> becomes <code>title[1]/subtitle[1]</code><p>
  
  @param prefix the prefix Xpath
  @param suffix the suffix Xpath
  
  @return the concatenated Xpath build from prefix and suffix