DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4973>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4973

xerces2b3: line breaks within CDATA are discarded

           Summary: xerces2b3: line breaks within CDATA are discarded
           Product: Xerces2-J
           Version: 2.0.0 [beta 2]
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


It couldn't begin to read it completely by the call of getNodeValue() though 
the sentence of two lines and more was specified in the <! [CDATA]> 
section.First of all, it tried to apply the following patch.

*** DeferredDocumentImpl.java   Tue Nov 20 15:10:36 2001
--- DeferredDocumentImpl-BEE.java       Tue Nov 20 15:14:22 2001
*************** public class DeferredDocumentImpl
*** 808,814 ****
          int chunk = nodeIndex >> CHUNK_SHIFT;
          int index = nodeIndex & CHUNK_MASK;
          int type = getChunkIndex(fNodeType, chunk, index);
!         if (type != Node.TEXT_NODE) {
              clearChunkIndex(fNodeType, chunk, index);
          }

--- 808,814 ----
          int chunk = nodeIndex >> CHUNK_SHIFT;
          int index = nodeIndex & CHUNK_MASK;
          int type = getChunkIndex(fNodeType, chunk, index);
!         if (type != Node.TEXT_NODE && type != Node.CDATA_SECTION_NODE ) 
{   // *** BEE ***
              clearChunkIndex(fNodeType, chunk, index);
          }

*************** public class DeferredDocumentImpl
*** 1039,1051 ****
              if (child != -1) {
                  StringBuffer str = new StringBuffer();
                  str.append(value);
                  do {
                      chunk = child >> CHUNK_SHIFT;
                      index = child & CHUNK_MASK;
                      value = getChunkValue(fNodeValue, chunk, index);
                      // NOTE: This has to be done backwards because the
                      //       children are placed backwards.
!                     str.insert(0, value);
                      child = getChunkIndex(fNodePrevSib, chunk, index);
                  } while (child != -1);
                  return str.toString();
--- 1039,1052 ----
              if (child != -1) {
                  StringBuffer str = new StringBuffer();
                  str.append(value);
+                 int offset = str.length();           // **** BEE ****
                  do {
                      chunk = child >> CHUNK_SHIFT;
                      index = child & CHUNK_MASK;
                      value = getChunkValue(fNodeValue, chunk, index);
                      // NOTE: This has to be done backwards because the
                      //       children are placed backwards.
!                     str.insert(offset, value);     // **** BEE ****
                      child = getChunkIndex(fNodePrevSib, chunk, index);
                  } while (child != -1);
                  return str.toString();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to