You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/11/30 20:46:09 UTC
cvs commit: xml-xerces/c/tests/DOM/DOMMemTest DOMMemTest.cpp
andyh 00/11/30 11:46:08
Modified: c/doc/html bug-todo.html
c/src/dom TextImpl.cpp
c/tests/DOM/DOMMemTest DOMMemTest.cpp
Log:
DOM_Text::splitText(), fix off by one error in the test for index too big error.
Tinny Ng
Revision Changes Path
1.3 +49 -37 xml-xerces/c/doc/html/bug-todo.html
Index: bug-todo.html
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/html/bug-todo.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bug-todo.html 2000/11/07 19:19:15 1.2
+++ bug-todo.html 2000/11/30 19:45:59 1.3
@@ -11,11 +11,9 @@
<H2><IMG SRC="resources/logo.gif" WIDTH="135" HEIGHT="60" ALIGN="TOP" BORDER="0"><IMG SRC="graphics/index-header.jpg"
WIDTH="456" HEIGHT="35" ALIGN="TOP" BORDER="0"></H2>
-
<H2><BR>
Xerces-C Bug List</H2>
-<P>This is a list of bugs that have been submitted on the xerces-c-dev mailing list. <I>Under Construction.</I></P>
-
+<P>This is a list of bugs that have been submitted on the xerces-c-dev mailing list. <I>Under Construction.</I></P>
<P>
<TABLE BORDER="1" WIDTH="100%">
<TR>
@@ -24,6 +22,22 @@
<TD WIDTH="78%">Description</TD>
</TR>
<TR>
+ <TD WIDTH="9%">2000-11-20 </TD>
+ <TD WIDTH="13%">Krisztián Havasi</TD>
+ <TD WIDTH="78%">DOM: Crash when deleting entity reference nodes. See xerces-c-dev mail.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="9%">2000-11-17</TD>
+ <TD WIDTH="13%">Daniel Walker</TD>
+ <TD WIDTH="78%">Behavior of ElementImpl::setAttributeNode() - When setting an attribute node, the new AttrImpl's ownerElment member
+ is not updated.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="9%">2000-11-16</TD>
+ <TD WIDTH="13%">Moishe Lettvin</TD>
+ <TD WIDTH="78%">BinHTTPURLInputStream, the query part of the URL is being ignored.</TD>
+ </TR>
+ <TR>
<TD WIDTH="9%">2000-10-26</TD>
<TD WIDTH="13%">Dean Roddey</TD>
<TD WIDTH="78%">EnumVal Sample should have an error handler installed, so that errors in the DTD would be displayed in some reasonable
@@ -37,7 +51,7 @@
<TR>
<TD WIDTH="9%">2000-10-30</TD>
<TD WIDTH="13%">Radovan Chytracek</TD>
- <TD WIDTH="78%">ignorableWhiteSpace not called during progressive SAX parsing. Works correctly with batch parsing.</TD>
+ <TD WIDTH="78%">ignorableWhiteSpace not called during progressive SAX parsing. Works correctly with batch parsing.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-15</TD>
@@ -79,19 +93,18 @@
<TR>
<TD WIDTH="9%"> </TD>
<TD WIDTH="13%"> </TD>
- <TD WIDTH="78%">DOM_XMLDecl - mark as nonstandard, since it's not part of W3C design. Implement DOM L3 proposal for access to
- the same information.</TD>
+ <TD WIDTH="78%">DOM_XMLDecl - mark as nonstandard, since it's not part of W3C design. Implement DOM L3 proposal for access to the
+ same information.</TD>
</TR>
<TR>
<TD WIDTH="9%">7-2000</TD>
<TD WIDTH="13%">Eliot Muir</TD>
- <TD WIDTH="78%">Dynamically link to either wsock32.lib or ws2_32.lib on Windows, to get rid of hard dependency on one or the other.
- </TD>
+ <TD WIDTH="78%">Dynamically link to either wsock32.lib or ws2_32.lib on Windows, to get rid of hard dependency on one or the other.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-3</TD>
<TD WIDTH="13%">Joe Pruitt</TD>
- <TD WIDTH="78%">NetAccessor: investigate use of open source library "cURL". http://curl.haxx.se Looks promising.</TD>
+ <TD WIDTH="78%">NetAccessor: investigate use of open source library "cURL". http://curl.haxx.se Looks promising.</TD>
</TR>
<TR>
<TD WIDTH="9%"> </TD>
@@ -116,7 +129,7 @@
<TR>
<TD WIDTH="9%"> </TD>
<TD WIDTH="13%"> </TD>
- <TD WIDTH="78%">HPUX - incorrect transcode to wchar_t? Investigate again.</TD>
+ <TD WIDTH="78%">HPUX - incorrect transcode to wchar_t? Investigate again.</TD>
</TR>
<TR>
<TD WIDTH="9%"> </TD>
@@ -126,22 +139,22 @@
<TR>
<TD WIDTH="9%">2000-10-25</TD>
<TD WIDTH="13%">Tony Wuebben</TD>
- <TD WIDTH="78%">DOMParser throws exception during DTD evaluation. See mail list.</TD>
+ <TD WIDTH="78%">DOMParser throws exception during DTD evaluation. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-24</TD>
<TD WIDTH="13%">Joel C. Lim</TD>
- <TD WIDTH="78%">Possible memory leak. See mail list.</TD>
+ <TD WIDTH="78%">Possible memory leak. See mail list.</TD>
</TR>
<TR>
- <TD WIDTH="9%">2000-10-23 </TD>
+ <TD WIDTH="9%">2000-10-23</TD>
<TD WIDTH="13%">Hal DeVore</TD>
- <TD WIDTH="78%">Access to DOCUMENT_TYPE_NODE entities causes exception. See mail list.</TD>
+ <TD WIDTH="78%">Access to DOCUMENT_TYPE_NODE entities causes exception. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-19</TD>
<TD WIDTH="13%">Perry A. Caro</TD>
- <TD WIDTH="78%">Possible bug in VecAttributesImpl.cpp. See mail list.</TD>
+ <TD WIDTH="78%">Possible bug in VecAttributesImpl.cpp. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-18</TD>
@@ -151,7 +164,7 @@
<TR>
<TD WIDTH="9%">2000-10-16</TD>
<TD WIDTH="13%">Tony Wuebben</TD>
- <TD WIDTH="78%">Entity Reference Cleanup dumping core. See mail list.</TD>
+ <TD WIDTH="78%">Entity Reference Cleanup dumping core. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-10-16</TD>
@@ -162,46 +175,34 @@
<TR>
<TD WIDTH="9%">2000-09-30</TD>
<TD WIDTH="13%">Bala Ayres</TD>
- <TD WIDTH="78%">Possible SAXParser bug. Verify. See mail list.</TD>
+ <TD WIDTH="78%">Possible SAXParser bug. Verify. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-09-21</TD>
<TD WIDTH="13%">Dave Connet</TD>
- <TD WIDTH="78%">DOMPrint creates invalid XML. See mail list. </TD>
+ <TD WIDTH="78%">DOMPrint creates invalid XML. See mail list.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-09-14</TD>
<TD WIDTH="13%">Jeff Lewis</TD>
- <TD WIDTH="78%">ReuseValidator enhancement request. Reuse only if the DTD listed in the XML is the same as the one previously
- loaded.</TD>
+ <TD WIDTH="78%">ReuseValidator enhancement request. Reuse only if the DTD listed in the XML is the same as the one previously loaded.</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-07-31</TD>
<TD WIDTH="13%">Pawel Hubczak</TD>
- <TD WIDTH="78%">Possible memory leak when ErrorHandler::error override called. (This might be fixed already)</TD>
+ <TD WIDTH="78%">Possible memory leak when ErrorHandler::error override called. (This might be fixed already)</TD>
</TR>
<TR>
<TD WIDTH="9%">2000-03-08</TD>
<TD WIDTH="13%">Dean Roddey</TD>
<TD WIDTH="78%">DOMString feature request - transcode to a caller supplied buffer, rather than always allocating a new one on the
- heap. Primarily for better performance.</TD>
+ heap. Primarily for better performance.</TD>
</TR>
</TABLE>
</P>
-
-
-<BLOCKQUOTE>
-
- <BLOCKQUOTE>
- <P>
-
- </BLOCKQUOTE>
-
-</BLOCKQUOTE>
-
<H2>Xerces-C New Feature Request List</H2>
-
-<H2>
+<H2></H2>
+<P>
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="10%"> </TD>
@@ -210,13 +211,24 @@
</TR>
<TR>
<TD WIDTH="10%"> </TD>
+ <TD WIDTH="13%"> </TD>
+ <TD WIDTH="77%">DOM Revalidation. Easiest approach is probably to create a DOMInputStream and re-run the parser. Once the DOM
+ Serializer is ready, this shouldn't be hard.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="10%"> </TD>
+ <TD WIDTH="13%"> </TD>
+ <TD WIDTH="77%">Option to not read external DTDs (ignore DOCTYPE line)</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="10%"> </TD>
<TD WIDTH="13%"> </TD>
- <TD WIDTH="77%">Better Build. Make it simpler, more standard.</TD>
+ <TD WIDTH="77%">Better Build. Make it simpler, more standard.</TD>
</TR>
<TR>
<TD WIDTH="10%"> </TD>
<TD WIDTH="13%"> </TD>
- <TD WIDTH="77%">XML Serializer. Write out a DOM tree in memory as XML.</TD>
+ <TD WIDTH="77%">XML Serializer. Write out a DOM tree in memory as XML.</TD>
</TR>
<TR>
<TD WIDTH="10%"> </TD>
1.15 +2 -2 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TextImpl.cpp 2000/08/17 22:47:12 1.14
+++ TextImpl.cpp 2000/11/30 19:46:02 1.15
@@ -55,7 +55,7 @@
*/
/*
- * $Id: TextImpl.cpp,v 1.14 2000/08/17 22:47:12 lehors Exp $
+ * $Id: TextImpl.cpp,v 1.15 2000/11/30 19:46:02 andyh Exp $
*/
#include "DocumentImpl.hpp"
@@ -113,7 +113,7 @@
DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null);
}
unsigned int len = data.length();
- if (offset >= len)
+ if (offset > len)
throw DOM_DOMException(DOM_DOMException::INDEX_SIZE_ERR, null);
TextImpl *newText =
1.24 +28 -2 xml-xerces/c/tests/DOM/DOMMemTest/DOMMemTest.cpp
Index: DOMMemTest.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/DOM/DOMMemTest/DOMMemTest.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- DOMMemTest.cpp 2000/10/13 22:47:37 1.23
+++ DOMMemTest.cpp 2000/11/30 19:46:07 1.24
@@ -66,6 +66,10 @@
/*
* $Log: DOMMemTest.cpp,v $
+ * Revision 1.24 2000/11/30 19:46:07 andyh
+ * DOM_Text::splitText(), fix off by one error in the test for index too big error.
+ * Tinny Ng
+ *
* Revision 1.23 2000/10/13 22:47:37 andyh
* Fix bug (failure to null-terminate result) in XMLString::trim().
* Patch contributed by Nadav Aharoni
@@ -591,8 +595,6 @@
TASSERT(strcmp(testString, "Hello") == 0);
}
TESTEPILOG;
-
-
}
@@ -1025,6 +1027,30 @@
s = a.getValue();
TASSERT(s.equals("CTestAttrValue"));
+ }
+ TESTEPILOG;
+
+
+ //
+ // splitText()
+ // Regression test for a bug from Tinny Ng
+ //
+ TESTPROLOG;
+ {
+ DOM_Document doc;
+ doc = DOM_Document::createDocument();
+ DOM_Text tn, tn1, tn2;
+ tn = doc.createTextNode ("0123456789");
+
+ tn1 = tn.splitText(5);
+ TASSERT( tn.getNodeValue().equals("01234"));
+ TASSERT(tn1.getNodeValue().equals("56789"));
+
+ tn2 = tn.splitText(5);
+ TASSERT( tn.getNodeValue().equals("01234"));
+ TASSERT(tn2.getNodeValue().equals(""));
+
+ EXCEPTION_TEST(tn.splitText(6), DOM_DOMException::INDEX_SIZE_ERR);
}
TESTEPILOG;