You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Rinil Baxi (JIRA)" <xe...@xml.apache.org> on 2005/07/26 07:37:19 UTC

[jira] Created: (XERCESC-1466) SAX Parser truncates the data on the left side of &(ampersand)

SAX Parser truncates the data on the left side of &(ampersand)
--------------------------------------------------------------

         Key: XERCESC-1466
         URL: http://issues.apache.org/jira/browse/XERCESC-1466
     Project: Xerces-C++
        Type: Bug
  Components: SAX/SAX2  
    Versions: 2.4.0    
 Environment: Tandem S series, c89 c++ compiler, Xercesc 2.4.0
    Reporter: Rinil Baxi


My input XML file is
===============
<?xml version ="1.0" ?>
<myservice>
<mystring>123&gt;ABCDEF</mystring>
</myservice>

Output should contain 123&gt;ABCDEF but it contains &gt;ABCDEF.

Analysis :
=======
While parsing XML file the parser hits parser->parseNext(token) it reinitializes the value of toUse->findex.
findex is the index of the XML buffer.
So it overwrites the contents of the buffer.

For checking this I have used "PParse".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (XERCESC-1466) SAX Parser truncates the data on the left side of &(ampersand)

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1466?page=all ]
     
David Bertoni closed XERCESC-1466:
----------------------------------


> SAX Parser truncates the data on the left side of &(ampersand)
> --------------------------------------------------------------
>
>          Key: XERCESC-1466
>          URL: http://issues.apache.org/jira/browse/XERCESC-1466
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.4.0
>  Environment: Tandem S series, c89 c++ compiler, Xercesc 2.4.0
>     Reporter: Rinil Baxi

>
> My input XML file is
> ===============
> <?xml version ="1.0" ?>
> <myservice>
> <mystring>123&gt;ABCDEF</mystring>
> </myservice>
> Output should contain 123&gt;ABCDEF but it contains &gt;ABCDEF.
> Analysis :
> =======
> While parsing XML file the parser hits parser->parseNext(token) it reinitializes the value of toUse->findex.
> findex is the index of the XML buffer.
> So it overwrites the contents of the buffer.
> For checking this I have used "PParse".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (XERCESC-1466) SAX Parser truncates the data on the left side of &(ampersand)

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1466?page=all ]
     
David Bertoni resolved XERCESC-1466:
------------------------------------

    Resolution: Invalid

Marking as invalid as I cannot reproduce it, and the reporter has not responded.

> SAX Parser truncates the data on the left side of &(ampersand)
> --------------------------------------------------------------
>
>          Key: XERCESC-1466
>          URL: http://issues.apache.org/jira/browse/XERCESC-1466
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.4.0
>  Environment: Tandem S series, c89 c++ compiler, Xercesc 2.4.0
>     Reporter: Rinil Baxi

>
> My input XML file is
> ===============
> <?xml version ="1.0" ?>
> <myservice>
> <mystring>123&gt;ABCDEF</mystring>
> </myservice>
> Output should contain 123&gt;ABCDEF but it contains &gt;ABCDEF.
> Analysis :
> =======
> While parsing XML file the parser hits parser->parseNext(token) it reinitializes the value of toUse->findex.
> findex is the index of the XML buffer.
> So it overwrites the contents of the buffer.
> For checking this I have used "PParse".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1466) SAX Parser truncates the data on the left side of &(ampersand)

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1466?page=comments#action_12316719 ] 

David Bertoni commented on XERCESC-1466:
----------------------------------------

I just tried to reproduce this with the PParse sample in Xerces-C 2.6 and could not.  Remember that a SAX parser can report characters with multiple events, which is exactly what is happening here.  When the parser encounters the &gt; entity, it sends a characters event with the first three characters "123" followed by a second characters event with the remainder of the string.

Can you please verify that you understand how SAX parsers deliver content through the characters event, and that you are actually seeing a skipped event.

> SAX Parser truncates the data on the left side of &(ampersand)
> --------------------------------------------------------------
>
>          Key: XERCESC-1466
>          URL: http://issues.apache.org/jira/browse/XERCESC-1466
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.4.0
>  Environment: Tandem S series, c89 c++ compiler, Xercesc 2.4.0
>     Reporter: Rinil Baxi

>
> My input XML file is
> ===============
> <?xml version ="1.0" ?>
> <myservice>
> <mystring>123&gt;ABCDEF</mystring>
> </myservice>
> Output should contain 123&gt;ABCDEF but it contains &gt;ABCDEF.
> Analysis :
> =======
> While parsing XML file the parser hits parser->parseNext(token) it reinitializes the value of toUse->findex.
> findex is the index of the XML buffer.
> So it overwrites the contents of the buffer.
> For checking this I have used "PParse".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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