Index: src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java =================================================================== --- src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java (revision 629224) +++ src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java (working copy) @@ -57,6 +57,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +import org.xml.sax.InputSource; import org.xml.sax.ext.LexicalHandler; import org.xml.sax.helpers.DefaultHandler; @@ -738,7 +739,10 @@ try { UpdaterHandler updaterHandler = new UpdaterHandler(settings, out, resolvedRevisions, status, revision, pubdate, ns, replaceInclude, confsToExclude, inStreamCtx); - XMLHelper.parse(in, null, updaterHandler, updaterHandler); + InputSource inSrc = new InputSource(in); + if (inStreamCtx != null) + inSrc.setSystemId(inStreamCtx.toExternalForm()); + XMLHelper.parse(inSrc, null, updaterHandler, updaterHandler); } catch (ParserConfigurationException e) { IllegalStateException ise = new IllegalStateException( "impossible to update Ivy files: parser problem"); Index: src/java/org/apache/ivy/core/settings/XmlSettingsParser.java =================================================================== --- src/java/org/apache/ivy/core/settings/XmlSettingsParser.java (revision 629224) +++ src/java/org/apache/ivy/core/settings/XmlSettingsParser.java (working copy) @@ -43,6 +43,7 @@ import org.apache.ivy.util.url.URLHandlerRegistry; import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.InputSource; import org.xml.sax.helpers.DefaultHandler; /** @@ -96,7 +97,9 @@ InputStream stream = null; try { stream = URLHandlerRegistry.getDefault().openStream(settingsUrl); - SAXParserFactory.newInstance().newSAXParser().parse(stream, this); + InputSource inSrc = new InputSource(stream); + inSrc.setSystemId(settingsUrl.toExternalForm()); + SAXParserFactory.newInstance().newSAXParser().parse(settingsUrl.toExternalForm(), this); } catch (IOException e) { throw e; } catch (Exception e) { Index: src/java/org/apache/ivy/util/XMLHelper.java =================================================================== --- src/java/org/apache/ivy/util/XMLHelper.java (revision 629224) +++ src/java/org/apache/ivy/util/XMLHelper.java (working copy) @@ -32,6 +32,7 @@ import org.w3c.dom.Document; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.InputSource; import org.xml.sax.ext.LexicalHandler; import org.xml.sax.helpers.DefaultHandler; @@ -94,7 +95,9 @@ throws SAXException, IOException, ParserConfigurationException { InputStream xmlStream = URLHandlerRegistry.getDefault().openStream(xmlURL); try { - parse(xmlStream, schema, handler, lHandler); + InputSource inSrc = new InputSource(xmlStream); + inSrc.setSystemId(xmlURL.toExternalForm()); + parse(inSrc, schema, handler, lHandler); } finally { try { xmlStream.close(); @@ -107,6 +110,12 @@ public static void parse( InputStream xmlStream, URL schema, DefaultHandler handler, LexicalHandler lHandler) throws SAXException, IOException, ParserConfigurationException { + parse(new InputSource(xmlStream), schema, handler, lHandler ); + } + + public static void parse( + InputSource xmlStream, URL schema, DefaultHandler handler, LexicalHandler lHandler) + throws SAXException, IOException, ParserConfigurationException { InputStream schemaStream = null; try { if (schema != null) {