Author: mrglavas
Date: Mon Sep 14 18:26:10 2009
New Revision: 814770
URL: http://svn.apache.org/viewvc?rev=814770&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/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java?rev=814770&r1=814769&r2=814770&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java
Mon Sep 14 18:26:10 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]