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:07:08 UTC

cvs commit: xml-security/src/org/apache/xml/security/utils/resolver/implementations ResolverXPointer.java ResolverDirectHTTP.java ResolverLocalFilesystem.java

raul        2005/03/23 10:07:08

  Modified:    src/org/apache/xml/security/utils/resolver/implementations
                        ResolverXPointer.java ResolverDirectHTTP.java
                        ResolverLocalFilesystem.java
  Log:
  Remove the Use of xalan or xerces class URI
  
  Revision  Changes    Path
  1.25      +2 -10     xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java
  
  Index: ResolverXPointer.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ResolverXPointer.java	13 Feb 2005 12:07:11 -0000	1.24
  +++ ResolverXPointer.java	23 Mar 2005 18:07:08 -0000	1.25
  @@ -23,7 +23,6 @@
   import org.apache.xml.security.utils.IdResolver;
   import org.apache.xml.security.utils.resolver.ResourceResolverException;
   import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
  -import org.apache.xml.utils.URI;
   import org.w3c.dom.Attr;
   import org.w3c.dom.Document;
   import org.w3c.dom.Node;
  @@ -90,18 +89,11 @@
         
   
         //Set resultSet = XMLUtils.convertNodelistToSet(resultNode); 
  -      CachedXPathAPIHolder.setDoc(doc);
  +      //CachedXPathAPIHolder.setDoc(doc);
         XMLSignatureInput result = new XMLSignatureInput(resultNode);
   
         result.setMIMEType("text/xml");
  -
  -      try {
  -         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
  -
  -         result.setSourceURI(uriNew.toString());
  -      } catch (URI.MalformedURIException ex) {
  -         result.setSourceURI(BaseURI);
  -      }
  +	  result.setSourceURI(BaseURI.concat(uri.getNodeValue()));      
   
         return result;
      }
  
  
  
  1.14      +2 -2      xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java
  
  Index: ResolverDirectHTTP.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ResolverDirectHTTP.java	25 Sep 2004 19:42:22 -0000	1.13
  +++ ResolverDirectHTTP.java	23 Mar 2005 18:07:08 -0000	1.14
  @@ -26,11 +26,11 @@
   import java.net.URL;
   import java.net.URLConnection;
   
  +import org.apache.xerces.util.URI;
   import org.apache.xml.security.signature.XMLSignatureInput;
   import org.apache.xml.security.utils.Base64;
   import org.apache.xml.security.utils.resolver.ResourceResolverException;
   import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
  -import org.apache.xml.utils.URI;
   import org.w3c.dom.Attr;
   
   
  @@ -254,7 +254,7 @@
   
         String uriNodeValue = uri.getNodeValue();
   
  -      if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) {
  +      if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#')) {
            log.debug("quick fail for empty URIs and local ones");
   
            return false;
  
  
  
  1.12      +2 -2      xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java
  
  Index: ResolverLocalFilesystem.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ResolverLocalFilesystem.java	25 Sep 2004 19:42:22 -0000	1.11
  +++ ResolverLocalFilesystem.java	23 Mar 2005 18:07:08 -0000	1.12
  @@ -20,10 +20,10 @@
   
   import java.io.FileInputStream;
   
  +import org.apache.xerces.util.URI;
   import org.apache.xml.security.signature.XMLSignatureInput;
   import org.apache.xml.security.utils.resolver.ResourceResolverException;
   import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
  -import org.apache.xml.utils.URI;
   import org.w3c.dom.Attr;
   
   
  @@ -127,7 +127,7 @@
   
         String uriNodeValue = uri.getNodeValue();
   
  -      if (uriNodeValue.equals("") || uriNodeValue.startsWith("#")) {
  +      if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#')) {
            return false;
         }