Author: mrglavas
Date: Mon Sep 14 18:25:54 2009
New Revision: 814769
URL: http://svn.apache.org/viewvc?rev=814769&view=rev
Log:
Fixing JIRA Issue #1394: https://issues.apache.org/jira/browse/XERCESJ-1394. If
a prefix has been undeclared we must return null from Node.lookupNamespaceURI()
instead of an empty string.
Modified:
xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java?rev=814769&r1=814768&r2=814769&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java Mon Sep 14
18:25:54 2009
@@ -1540,12 +1540,12 @@
if (specifiedPrefix == null &&
attr.getNodeName().equals("xmlns")) {
// default namespace
- return value;
+ return value.length() > 0 ? value : null;
} else if (attrPrefix !=null &&
attrPrefix.equals("xmlns") &&
attr.getLocalName().equals(specifiedPrefix)) {
// non default namespace
- return value;
+ return value.length() > 0 ? value : null;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]