mmidy 01/03/08 14:48:03
Modified: java/src/org/apache/xml/utils SystemIDResolver.java
Log:
Change SystemIdResolver to default to user.dir if the base URI is null
Revision Changes Path
1.6 +11 -4
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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SystemIDResolver.java 2001/01/02 03:42:50 1.5
+++ SystemIDResolver.java 2001/03/08 22:48:02 1.6
@@ -90,7 +90,10 @@
if (null != curdir)
{
- uri = "file:///" + curdir + System.getProperty("file.separator") + uri;
+ if (uri != null)
+ uri = "file:///" + curdir +
System.getProperty("file.separator") + uri;
+ else
+ uri = "file:///" + curdir +
System.getProperty("file.separator");
}
if (null != uri && (uri.indexOf('\\') > -1))
@@ -111,9 +114,12 @@
public static String getAbsoluteURI(String urlString, String base)
throws TransformerException
{
+ boolean isAbsouteUrl = false;
+ if (urlString.indexOf(':') > 0)
+ isAbsouteUrl = true;
- if ((urlString.indexOf(':') < 0) && (null != base)
- && (base.indexOf(':') < 0))
+ if ((!isAbsouteUrl) && ((null == base)
+ || (base.indexOf(':') < 0)))
{
base = getAbsoluteURIFromRelative(base);
}
@@ -129,6 +135,7 @@
else
{
urlString = urlString.substring(5);
+ isAbsouteUrl = false;
}
}
@@ -143,7 +150,7 @@
try
{
- if ((null == base) || (base.length() == 0))
+ if ((null == base) || (base.length() == 0) || (isAbsouteUrl))
{
uri = new URI(urlString);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]