code: public void appendPath(String p_addToPath) throws MalformedURIException
    {
  
      if (p_addToPath == null || p_addToPath.trim().length() == 0)
      {
        return;
      }
  
      if (!isURIString(p_addToPath))
      {
        throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_PATH_INVALID_CHAR, new Object[]{p_addToPath})); //"Path contains invalid character!");
      }
  
      if (m_path == null || m_path.trim().length() == 0)
      {
        if (p_addToPath.startsWith("/"))
        {
          m_path = p_addToPath;
        }
        else
        {
          m_path = "/" + p_addToPath;
        }
      }
      else if (m_path.endsWith("/"))
      {
        if (p_addToPath.startsWith("/"))
        {
          m_path = m_path.concat(p_addToPath.substring(1));
        }
        else
        {
          m_path = m_path.concat(p_addToPath);
        }
      }
      else
      {
        if (p_addToPath.startsWith("/"))
        {
          m_path = m_path.concat(p_addToPath);
        }
        else
        {
          m_path = m_path.concat("/" + p_addToPath);
        }
      }
    }
docs: Append to the end of the path of this URI. If the current path does
  not end in a slash and the path to be appended does not begin with
  a slash, a slash will be appended to the current path before the
  new segment is added. Also, if the current path ends in a slash
  and the new segment begins with a slash, the extra slash will be
  removed before the new segment is appended.
  
  @param p_addToPath the new segment to be added to the current path
  
  @throws MalformedURIException if p_addToPath contains syntax
  errors