You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ch...@locus.apache.org on 2000/03/24 02:30:51 UTC
cvs commit: xml-xerces/c/src/dom DOM_Text.cpp DOM_Text.hpp TextImpl.cpp TextImpl.hpp
chchou 00/03/23 17:30:51
Modified: c/src/dom DOM_Text.cpp DOM_Text.hpp TextImpl.cpp
TextImpl.hpp
Log:
Fix bug #8 to support ignorable whitespace text nodes
Revision Changes Path
1.5 +11 -0 xml-xerces/c/src/dom/DOM_Text.cpp
Index: DOM_Text.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/DOM_Text.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DOM_Text.cpp 2000/03/02 19:53:57 1.4
+++ DOM_Text.cpp 2000/03/24 01:30:50 1.5
@@ -56,6 +56,9 @@
/*
* $Log: DOM_Text.cpp,v $
+ * Revision 1.5 2000/03/24 01:30:50 chchou
+ * Fix bug #8 to support ignorable whitespace text nodes
+ *
* Revision 1.4 2000/03/02 19:53:57 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -118,4 +121,10 @@
DOM_Text DOM_Text::splitText(unsigned int offset)
{
return DOM_Text(((TextImpl *)fImpl)->splitText(offset));
+};
+
+
+bool DOM_Text::isIgnorableWhitespace()
+{
+ return ((TextImpl *)fImpl)->isIgnorableWhitespace();
};
1.7 +19 -0 xml-xerces/c/src/dom/DOM_Text.hpp
Index: DOM_Text.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/DOM_Text.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOM_Text.hpp 2000/03/02 19:53:57 1.6
+++ DOM_Text.hpp 2000/03/24 01:30:50 1.7
@@ -56,6 +56,9 @@
/*
* $Log: DOM_Text.hpp,v $
+ * Revision 1.7 2000/03/24 01:30:50 chchou
+ * Fix bug #8 to support ignorable whitespace text nodes
+ *
* Revision 1.6 2000/03/02 19:53:57 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -188,6 +191,20 @@
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
DOM_Text splitText(unsigned int offset);
+
+ //@}
+ /** @name Non-standard (not defined by the DOM specification) functions. */
+ //@{
+
+ /**
+ *
+ * <p><b>"Experimental - subject to change"</b></p>
+ *
+ * Return true if this node contains ignorable whitespaces only.
+ * @return True if this node contains ignorable whitespaces only.
+ */
+ bool isIgnorableWhitespace();
+
//@}
protected:
1.6 +18 -0 xml-xerces/c/src/dom/TextImpl.cpp
Index: TextImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/TextImpl.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TextImpl.cpp 2000/03/02 19:54:05 1.5
+++ TextImpl.cpp 2000/03/24 01:30:50 1.6
@@ -56,6 +56,9 @@
/*
* $Log: TextImpl.cpp,v $
+ * Revision 1.6 2000/03/24 01:30:50 chchou
+ * Fix bug #8 to support ignorable whitespace text nodes
+ *
* Revision 1.5 2000/03/02 19:54:05 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -93,6 +96,7 @@
TextImpl::TextImpl(DocumentImpl *ownerDoc, const DOMString &data) :
CharacterDataImpl(ownerDoc, DStringPool::getStaticString("#text", &gText),
DOM_Node::TEXT_NODE, data)
+, fIgnorableWhitespace(false)
{
};
@@ -138,3 +142,15 @@
return newText;
};
+
+
+bool TextImpl::isIgnorableWhitespace()
+{
+ return fIgnorableWhitespace;
+}
+
+
+void TextImpl::setIgnorableWhitespace(bool ignorable)
+{
+ fIgnorableWhitespace = ignorable;
+}
1.7 +10 -0 xml-xerces/c/src/dom/TextImpl.hpp
Index: TextImpl.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/TextImpl.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TextImpl.hpp 2000/03/02 19:54:05 1.6
+++ TextImpl.hpp 2000/03/24 01:30:50 1.7
@@ -56,6 +56,9 @@
/*
* $Log: TextImpl.hpp,v $
+ * Revision 1.7 2000/03/24 01:30:50 chchou
+ * Fix bug #8 to support ignorable whitespace text nodes
+ *
* Revision 1.6 2000/03/02 19:54:05 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -110,6 +113,11 @@
virtual NodeImpl *cloneNode(bool deep);
virtual bool isTextImpl();
virtual TextImpl *splitText(unsigned int offset);
+ virtual bool isIgnorableWhitespace();
+protected:
+ virtual void setIgnorableWhitespace(bool ignorable);
+ bool fIgnorableWhitespace;
+ friend class DOMParser;
};
#endif