You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@locus.apache.org on 2000/05/15 17:50:40 UTC
cvs commit: xml-xalan/c/src/DOMSupport DOMServices.cpp
dbertoni 00/05/15 08:50:39
Modified: c/src/DOMSupport DOMServices.cpp
Log:
Fixed bug in geNodeData() for document fragments.
Revision Changes Path
1.10 +22 -0 xml-xalan/c/src/DOMSupport/DOMServices.cpp
Index: DOMServices.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/DOMSupport/DOMServices.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DOMServices.cpp 2000/04/19 18:13:33 1.9
+++ DOMServices.cpp 2000/05/15 15:50:38 1.10
@@ -66,6 +66,7 @@
#include <XalanDOM/XalanDocument.hpp>
#include <XalanDOM/XalanElement.hpp>
#include <XalanDOM/XalanNamedNodeMap.hpp>
+#include <XalanDOM/XalanNodeList.hpp>
#include <XalanDOM/XalanText.hpp>
@@ -149,6 +150,27 @@
switch(node.getNodeType())
{
case XalanNode::DOCUMENT_FRAGMENT_NODE:
+ {
+ const XalanNodeList* const mnl = node.getChildNodes();
+ assert(mnl != 0);
+
+ const unsigned int n = mnl->getLength();
+
+ for(unsigned int i = 0; i < n; ++i)
+ {
+ assert(mnl->item(i) != 0);
+
+ const XalanDOMString nodeData =
+ getNodeData(*mnl->item(i));
+
+ if(0 < length(nodeData))
+ {
+ data += nodeData;
+ }
+ }
+ }
+ break;
+
case XalanNode::DOCUMENT_NODE:
case XalanNode::ELEMENT_NODE:
{