You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2005/03/23 19:10:42 UTC

cvs commit: xml-security/src/org/apache/xml/security/utils/resolver ResourceResolverSpi.java

raul        2005/03/23 10:10:42

  Modified:    src/org/apache/xml/security/utils/resolver
                        ResourceResolverSpi.java
  Log:
  Remove the Use of xalan or xerces class URI.
  
  Removed the expandSystemId
  
  Revision  Changes    Path
  1.12      +0 -83     xml-security/src/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java
  
  Index: ResourceResolverSpi.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ResourceResolverSpi.java	25 Sep 2004 19:42:22 -0000	1.11
  +++ ResourceResolverSpi.java	23 Mar 2005 18:10:42 -0000	1.12
  @@ -21,7 +21,6 @@
   import java.util.Map;
   
   import org.apache.xml.security.signature.XMLSignatureInput;
  -import org.apache.xml.utils.URI;
   import org.w3c.dom.Attr;
   
   
  @@ -146,88 +145,6 @@
         return false;
      }
   
  -   /**
  -    * Expands a system id and returns the system id as a URL, if
  -    * it can be expanded. A return value of null means that the
  -    * identifier is already expanded. An exception thrown
  -    * indicates a failure to expand the id.
  -    *
  -    * @param systemId The systemId to be expanded.
  -    * @param currentSystemId
  -    *
  -    * @return Returns the URL object representing the expanded system
  -    *         identifier. A null value indicates that the given
  -    *         system identifier is already expanded.
  -    *
  -    * @throws Exception
  -    */
  -   public static String expandSystemId(String systemId, String currentSystemId)
  -           throws Exception {
  -
  -      String id = systemId;
  -
  -      // check for bad parameters id
  -      if ((id == null) || (id.length() == 0)) {
  -         return systemId;
  -      }
  -
  -      // if id already expanded, return
  -      try {
  -         URI url = new URI(id);
  -
  -         if (url != null) {
  -            return systemId;
  -         }
  -      } catch (Exception e) {
  -
  -         // continue on...
  -      }
  -
  -      // normalize id
  -      id = ResourceResolverSpi.fixURI(id);
  -
  -      // normalize base
  -      URI base = null;
  -      URI url = null;
  -
  -      try {
  -         if (currentSystemId == null) {
  -            String dir;
  -
  -            try {
  -               dir = ResourceResolverSpi.fixURI(System.getProperty("user.dir"));
  -            } catch (SecurityException se) {
  -               dir = "";
  -            }
  -
  -            if (!dir.endsWith("/")) {
  -               dir = dir + "/";
  -            }
  -
  -            final String protocol = "file";
  -            final String host = "";
  -
  -            base = new URI(protocol, host, dir, null, null);
  -         } else {
  -
  -            // should we fix currentSystemId?
  -            currentSystemId = ResourceResolverSpi.fixURI(currentSystemId);
  -            base = new URI(currentSystemId);
  -         }
  -
  -         // expand id
  -         url = new URI(base, id);
  -      } catch (Exception e) {
  -
  -         // let it go through
  -      }
  -
  -      if (url == null) {
  -         return systemId;
  -      }
  -
  -      return url.toString();
  -   }
   
      /**
       * Fixes a platform dependent filename to standard URI form.