You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/05/23 16:34:25 UTC

DO NOT REPLY [Bug 9350] New: - SAX parser calls characters() with wrong buffer

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=9350>.
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=9350

SAX parser calls characters() with wrong buffer

           Summary: SAX parser calls characters() with wrong buffer
           Product: Xerces2-J
           Version: 2.0.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: SAX
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: sergeimo@hot.ee


it is appers that SAX parser calls characters() with the buffer content.

Buffer size is 2048 bytes. 

In my case I see the whole buffer is filled from the beginnig of the XML 
document:
<message xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xsi:noNamespaceSchemaLocation='./schema.xsd'>
<message_header>....

Unfortunatelly <val>ABC</val> appears in the buffer broken:
i.e. when parser calls characters( char[]ch, int start, int len)
i see start=2046 and len=2, but 'start' actually point to 'A' character and
String (ch, start, len) returns 'AB' instead of 'ABC'

startElement() also called for <val> tag before characters() - thus I assume
the problem is in buffer management because I feel that startElement should
not be called at all if buffer doesn't contain </val> closing tag.


Tested with J2 2.0.0 and 2.0.1 with the same result.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org