It's in, thanks.
On Friday, February 22, 2002, at 11:22 AM, Mike Gratton wrote:
w00t! Fixed it.
Mike Gratton wrote: > > According to the namespace rec, unprefixed attributes are *not* in > the default namespace [...]
For some reason, I didn't think to look at NodeImpl.getNamespaceURI() until just then. Specifically, NodeImpl.lookupDefaultNamespaceURI() is returning the default namespace even when the node is an attribute.
The attached patch fixes this, please have a look and let me know if there are problems with it. If not, could Tom, Kimbro, or another happy committer please apply it to the repository.
Thanks, Mike.
-- Mike Gratton <[EMAIL PROTECTED]>
"Every motive escalate."
Blatant self-promotion: <http://web.vee.net/>
Index: java/src/org/apache/xindice/xml/dom/NodeImpl.java
===================================================================
RCS file: /home/cvspublic/xml-xindice/java/src/org/apache/xindice/xml/dom/
NodeImpl.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 NodeImpl.java
--- java/src/org/apache/xindice/xml/dom/NodeImpl.java 6 Dec 2001 19:34:00 -0000 1.1.1.1
+++ java/src/org/apache/xindice/xml/dom/NodeImpl.java 22 Feb 2002 18:22:07 -0000
@@ -765,9 +765,9 @@
* @return The URI (or null)
*/
public final String lookupDefaultNamespaceURI() {
- String uri = null;
- if ( getNodeType() == Node.ELEMENT_NODE )
- uri = ((Element)this).getAttribute(XMLNS_PREFIX);
+ if ( getNodeType() != Node.ELEMENT_NODE )
+ return null;
+ String uri = ((Element)this).getAttribute(XMLNS_PREFIX);
if ( uri != null && uri.length() > 0 )
return uri;
return parentNode != null ? parentNode.lookupDefaultNamespaceURI()
Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org Apache Xindice native XML database http://xml.apache.org XML:DB Initiative http://www.xmldb.org Senior Technologist (Your company name here)
