Index: gnu/xml/aelfred2/SAXDriver.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/aelfred2/SAXDriver.java,v retrieving revision 1.1 diff -u -r1.1 SAXDriver.java --- gnu/xml/aelfred2/SAXDriver.java 23 Dec 2004 22:38:43 -0000 1.1 +++ gnu/xml/aelfred2/SAXDriver.java 19 Jan 2005 09:10:23 -0000 @@ -644,7 +644,7 @@ // - Map reserved and non-ASCII characters to %HH try { - if (baseURI == null) { + if (baseURI == null && XmlParser.uriWarnings) { warn ("No base URI; hope this SYSTEM id is absolute: " + systemId); return new URL (systemId).toString (); Index: gnu/xml/aelfred2/XmlParser.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/aelfred2/XmlParser.java,v retrieving revision 1.1 diff -u -r1.1 XmlParser.java --- gnu/xml/aelfred2/XmlParser.java 23 Dec 2004 22:38:43 -0000 1.1 +++ gnu/xml/aelfred2/XmlParser.java 19 Jan 2005 09:10:23 -0000 @@ -53,6 +53,8 @@ package gnu.xml.aelfred2; +import gnu.java.net.GetSystemPropertyAction; + import java.io.BufferedInputStream; import java.io.CharConversionException; import java.io.EOFException; @@ -63,6 +65,7 @@ import java.io.UnsupportedEncodingException; import java.net.URL; import java.net.URLConnection; +import java.security.AccessController; // maintaining 1.1 compatibility for now ... // Iterator and Hashmap ought to be faster @@ -89,8 +92,15 @@ // avoid slow per-character readCh() private final static boolean USE_CHEATS = true; - - ////////////////////////////////////////////////////////////////////// + // Emit warnings for relative URIs with no base URI. + static boolean uriWarnings; + static + { + String key = "gnu.xml.aelfred2.XmlParser.uriWarnings"; + GetSystemPropertyAction a = new GetSystemPropertyAction(key); + uriWarnings = "true".equals(AccessController.doPrivileged(a)); + } + // Constructors. //////////////////////////////////////////////////////////////////////// @@ -2807,9 +2817,11 @@ if (ids [1].indexOf ('#') != -1) handler.verror ("SYSTEM id has a URI fragment: " + ids [1]); ids [2] = handler.getSystemId (); - if (ids [2] == null) - handler.warn ("No base URI; hope URI is absolute: " - + ids [1]); + if (ids [2] == null && uriWarnings) + { + handler.warn ("No base URI; hope URI is absolute: " + + ids [1]); + } } return ids;