mmidy       01/08/15 14:40:06

  Modified:    java/src/org/apache/xml/utils SystemIDResolver.java
  Log:
  Fix problem with resolving a relative URI from a  processing instruction
  
  Revision  Changes    Path
  1.11      +6 -6      
xml-xalan/java/src/org/apache/xml/utils/SystemIDResolver.java
  
  Index: SystemIDResolver.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/utils/SystemIDResolver.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SystemIDResolver.java     2001/08/09 18:32:55     1.10
  +++ SystemIDResolver.java     2001/08/15 21:40:06     1.11
  @@ -147,11 +147,8 @@
             throws TransformerException
     {
       boolean isAbsouteUrl = false;
  -    boolean needToResolve = false;
  -    
  -    if (urlString.startsWith("..") && base == null)
  -      urlString = new File(urlString).getAbsolutePath();
  -    
  +    boolean needToResolve = false;    
  + 
       if(urlString.startsWith("file:") && urlString.charAt(5) != '/') 
       {
         needToResolve = true;
  @@ -167,7 +164,10 @@
       if ((!isAbsouteUrl) && ((null == base)
               || (base.indexOf(':') < 0)))
       {
  -      base = getAbsoluteURIFromRelative(base);
  +      if (base.startsWith(File.separator))
  +        base = "file://" + base;
  +      else
  +        base = getAbsoluteURIFromRelative(base);
       }
   
       // bit of a hack here.  Need to talk to URI person to see if this can be 
fixed.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to