You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2002/03/22 01:43:41 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils SystemIDResolver.java
sboag 02/03/21 16:43:41
Modified: java/src/org/apache/xml/utils SystemIDResolver.java
Log:
Put extra check for getAbsoluteURI(String urlString, String base) for absolute
file paths with no protocol... I think one of the last check-in's wiped this out.
So now, if the path is the form of "x:/x" or "/x" then "file:///" is added to it.
I don't see how this can screw anything up... but I'm sure it will.
Revision Changes Path
1.15 +9 -0 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- SystemIDResolver.java 13 Jan 2002 21:25:06 -0000 1.14
+++ SystemIDResolver.java 22 Mar 2002 00:43:41 -0000 1.15
@@ -259,6 +259,15 @@
}
String uriStr = uri.toString();
+
+ // Not so sure if this is good. But, for now, I'll try it. We really must
+ // make sure the return from this function is a URL!
+ if((Character.isLetter(uriStr.charAt(0)) && (uriStr.charAt(1) == ':')
+ && (uriStr.charAt(2) == '/') && (uriStr.charAt(3) != '/'))
+ || ((uriStr.charAt(0) == '/') && (uriStr.charAt(1) != '/')))
+ {
+ uriStr = "file:///"+uriStr;
+ }
return uriStr;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org