diff --git a/doc/html/bug-todo.html b/doc/html/bug-todo.html index 1a4a3df350bf5d1ef4f7168f27ef235b731a6ae8..3a35764d26dc30099a098b53b9a63b8b48e81f30 100644 --- a/doc/html/bug-todo.html +++ b/doc/html/bug-todo.html @@ -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> @@ -23,6 +21,22 @@ Xerces-C Bug List</H2> <TD WIDTH="13%">By</TD> <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> @@ -37,7 +51,7 @@ Xerces-C Bug List</H2> <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 @@ Xerces-C Bug List</H2> <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 @@ Xerces-C Bug List</H2> <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 @@ Xerces-C Bug List</H2> <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 @@ Xerces-C Bug List</H2> <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 @@ Xerces-C Bug List</H2> <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> @@ -211,12 +212,23 @@ Xerces-C Bug List</H2> <TR> <TD WIDTH="10%"> </TD> <TD WIDTH="13%"> </TD> - <TD WIDTH="77%">Better Build. Make it simpler, more standard.</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> </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> diff --git a/src/dom/TextImpl.cpp b/src/dom/TextImpl.cpp index e67c8079df01cc6ad7b35699a676711f0cdf2e2d..d0ef9e4d4bb526ac07cf6bb7dc0beee9dca3fdff 100644 --- a/src/dom/TextImpl.cpp +++ b/src/dom/TextImpl.cpp @@ -113,7 +113,7 @@ TextImpl *TextImpl::splitText(unsigned int offset) 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 = diff --git a/tests/DOM/DOMMemTest/DOMMemTest.cpp b/tests/DOM/DOMMemTest/DOMMemTest.cpp index e36020ac61e0af04fbbec081c57db588089337c5..3ab9b594cec3f69989d299a4e96fb905637f3216 100644 --- a/tests/DOM/DOMMemTest/DOMMemTest.cpp +++ b/tests/DOM/DOMMemTest/DOMMemTest.cpp @@ -66,6 +66,10 @@ /* * $Log$ + * 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 @@ void DOMStringTests() TASSERT(strcmp(testString, "Hello") == 0); } TESTEPILOG; - - } @@ -1029,6 +1031,30 @@ void DOMBasicTests() 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; + + }