You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/09/23 23:00:30 UTC
cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMNodeImpl.cpp
tng 2002/09/23 14:00:30
Modified: c/src/xercesc/dom/impl DOMNodeImpl.cpp
Log:
DOM L3: fix to isDefaultNamespace. Patch from Gareth Reakes.
Revision Changes Path
1.16 +11 -1 xml-xerces/c/src/xercesc/dom/impl/DOMNodeImpl.cpp
Index: DOMNodeImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNodeImpl.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DOMNodeImpl.cpp 23 Sep 2002 19:41:07 -0000 1.15
+++ DOMNodeImpl.cpp 23 Sep 2002 21:00:30 -0000 1.16
@@ -921,6 +921,16 @@
}
}
+ const XMLCh *prefix = thisNode->getPrefix();
+ // REVISIT: is it possible that prefix is empty string?
+ if (prefix == 0 || XMLString::stringLen(prefix) == 0) {
+ const XMLCh* ns = thisNode->getNamespaceURI();
+ if (namespaceURI == 0) {
+ return (ns == namespaceURI);
+ }
+ return (XMLString::compareString(namespaceURI, ns) == 0);
+ }
+
if (thisNode->hasAttributes()) {
DOMElement *elem = (DOMElement *)thisNode;
DOMNode *attr = elem->getAttributeNodeNS(s_xmlnsURI, s_xmlns);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org