knoaman 2002/08/12 12:58:57
Modified: c/src/xercesc/dom/impl DOMElementNSImpl.cpp
DOMAttrNSImpl.cpp
Log:
namespaceURI is never empty string.
Revision Changes Path
1.5 +9 -3 xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.cpp
Index: DOMElementNSImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DOMElementNSImpl.cpp 4 Jul 2002 15:27:56 -0000 1.4
+++ DOMElementNSImpl.cpp 12 Aug 2002 19:58:57 -0000 1.5
@@ -215,8 +215,14 @@
if (index >= 3999)
delete[] newName;
}
-
- const XMLCh * URI = DOMNodeImpl::mapPrefix(fPrefix, namespaceURI,
DOMNode::ELEMENT_NODE);
+
+ // DOM Level 3: namespace URI is never empty string.
+ const XMLCh * URI = DOMNodeImpl::mapPrefix
+ (
+ fPrefix,
+ (XMLString::stringLen(namespaceURI) == 0) ? 0 : namespaceURI,
+ DOMNode::ELEMENT_NODE
+ );
this -> fNamespaceURI = (URI == 0) ? 0 : ownerDoc->getPooledString(URI);
};
1.5 +9 -3 xml-xerces/c/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
Index: DOMAttrNSImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrNSImpl.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DOMAttrNSImpl.cpp 4 Jul 2002 15:27:56 -0000 1.4
+++ DOMAttrNSImpl.cpp 12 Aug 2002 19:58:57 -0000 1.5
@@ -238,8 +238,14 @@
delete[] newName;
}
- const XMLCh * URI = xmlnsAlone ?
- xmlnsURI : DOMNodeImpl::mapPrefix(fPrefix, namespaceURI,
DOMNode::ATTRIBUTE_NODE);
+ // DOM Level 3: namespace URI is never empty string.
+ const XMLCh * URI = xmlnsAlone ? xmlnsURI
+ : DOMNodeImpl::mapPrefix
+ (
+ fPrefix,
+ (XMLString::stringLen(namespaceURI) == 0) ? 0 : namespaceURI,
+ DOMNode::ATTRIBUTE_NODE
+ );
this -> fNamespaceURI = (URI == 0) ? 0 : ownerDoc->getPooledString(URI);
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]