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

XML Tag content is not returned completely

           Summary: XML Tag content is not returned completely
           Product: Xerces2-J
           Version: 2.1.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Given a tag and its content, <commandName>Display Device - Detail</commandName>,
the parser will sometimes return only part of the content, Dispaly Devi, and
send that to the characters method of the document handler.

The problem happens when the content of the XML tag spans the buffer boundry
used in the XMLEntityManager class. In my case the Manager reads in 64 bytes
each time. Byte 64 lands on the 'c' character, leaving the " - Detail" still
unread. The scanContent method in the XMLEntityManager states that it does not
read in the full content if the end of the buffer is reached. In this case a -1
one is returned since the next character is unknown.

The calling object, XMLDocumentFragmentScannerImpl, does not handle this case at
all. All it checks for is if the length in the XMLString is greater than zero
and there is a document handler present. If these are true, which it is, then
the characters method is called on the document handler.

Whether the fix should be in scanContent in the XMLEntityManager or in the
XMLDocumentFragmentScannerImpl I do not know. Somehow the parser needs to
determine if it recieved incomplete data and read in chunks until it has
recieved all the data it needs.

I raised this as a critical issue because the program I am writing loads
different classes based on the content of the commandName tag. Since the content
is not combing back the program is not working correctly.

If an XML example that produces this bug is needed, please email me and I will
send you it.

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

Reply via email to