logo       

Characters divided into 2 parts in Xerces 2.8.0: msg#00019

Subject: Characters divided into 2 parts in Xerces 2.8.0

Hi all. My name is Xaltotun. I encountered the following bug in Xerces2 version 2.8.0.

 

BUG DESRIPTION

At first there is an xml file that looks like this:

 

<element_1>

abcabcabcabcabcabc

abcabcabcabcabcabc

</element_1>

<element_2>

abcabcabcabcabcabc

abcabcabcabcabcabc

</element_2>

<element_n>

abcabcabcabcabcabc

abcabcabcabcabcabc

</element_n>

 

I subclass DefaultHandler and override startDocument, startElement, characters, endElement, endDocument.

The text “abcabc…abc” is processed in the “characters” function. But when the file is big enough I sometimes get this text broken into two parts.

I.e. the characters function returns

“abcabcabcabcabcabc

ab”

and after this characters is called one more time and it returns

the remaining part

“cabcabcabcabcabc”.

 

 

FILES ATTACHED

I’ve attached two files to this email.

xml_file.xml – with this file one can reproduce the error I’ve found. Only print what the characters function returns and prevent escape characters from printing.

xercesIssueText.txt – to this file I printed what characters returned without escape characters. I marked the wrong lines with several exclamation signs “!!!!!!”.

 

For example there is an element in this file

<Node NodeType="NODE_TYPE_PROPERTY_STRING">

<NodeName>Location generation type</NodeName>

                  <NodeDisplayName>PROPERTY_DISPLAY_NAME_LOCATION_GENERATION_TYPE</NodeDisplayName>

                  <NodeDescription>PROPERTY_DESCRIPTION_LOCATION_GENERATION_TYPE</NodeDescription>

                  <NodeValueType>VALUE_TYPE_STRING</NodeValueType>

                  <NodeValue>NETWORK_DEVICE_LOCATION_GENERATION_TYPE_RANDOM_UNIFORM_X_Y_Z</NodeValue>

<NodeEnabled>true</NodeEnabled>

                  <NodeDisplayable>true</NodeDisplayable>

                  <NodeEditable>true</NodeEditable>

</Node>

The characters function returns the following:

Location generation type

PROPERTY_DISPLAY_NAME_LOCATION_GENERATION_TYPE

PROPERTY_DESCRIPTION_LOCATION_GENERATION_TYPE

VALUE_TYPE_STRING

NETWORK_DEVICE_LOCATION_GENERATION_TYPE_R

ANDOM_UNIFORM_X_Y_Z

true

true

true

 

I think the characters function should return

PROPERTY_DISPLAY_NAME_LOCATION_GENERATION_TYPE

PROPERTY_DESCRIPTION_LOCATION_GENERATION_TYPE

VALUE_TYPE_STRING

NETWORK_DEVICE_LOCATION_GENERATION_TYPE_RANDOM_UNIFORM_X_Y_Z

true

true

true

 

 

QUESTION

As for me it is a bug. But I think it is strange no one has ever found it. That is why I decided to post my question to this list. Can anyone help me to decide if this is a bug?

 

 

-----------------------------

Xaltotun

 

Attachment: xml_file.xml
Description: Text Data

Attachment: xercesIssueText.txt
Description: Text document

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe