mrglavas 2004/01/19 14:38:16
Modified: java/src/org/apache/xerces/impl XMLEntityManager.java
Log:
For backwards compatibility, trim whitespace before passing a
system id to the URI class to read (when standard-uri-conformant
feature is false).
Revision Changes Path
1.71 +5 -5 xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java
Index: XMLEntityManager.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- XMLEntityManager.java 16 Jan 2004 15:08:12 -0000 1.70
+++ XMLEntityManager.java 19 Jan 2004 22:38:16 -0000 1.71
@@ -1643,7 +1643,7 @@
}
// if id already expanded, return
try {
- URI uri = new URI(systemId);
+ URI uri = new URI(systemId.trim());
if (uri != null) {
return systemId;
}
@@ -1665,13 +1665,13 @@
}
else {
try {
- base = new URI(fixURI(baseSystemId));
+ base = new URI(fixURI(baseSystemId).trim());
}
catch (URI.MalformedURIException e) {
if (baseSystemId.indexOf(':') != -1) {
// for xml schemas we might have baseURI with
// a specified drive
- base = new URI("file", "", fixURI(baseSystemId), null,
null);
+ base = new URI("file", "", fixURI(baseSystemId).trim(),
null, null);
}
else {
String dir = getUserDir();
@@ -1681,7 +1681,7 @@
}
}
// expand id
- uri = new URI(base, id);
+ uri = new URI(base, id.trim());
}
catch (Exception e) {
// let it go through
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]