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 "Williamson, Siehnai" <sw...@docucorp.com> on 2001/10/19 20:38:44 UTC

Progressive parse token issues

Hi Everyone,

I'm currently using the SAXParser and I'm getting warnings when my encoding
scheme stated does not match the actual encoding in the document.  This is
good.  However, when I attempt a parseNext(token) after the warning, I get
an error code 68 which is "Scan_BadPScanToken".  This is because the
XMLPScanToken passed to parseNext() still has both the fScannerId and
fSequenceId as 0 (zero) while the internal fScannerId and fSequenceId in
XMLScanner is something other than zero.

Isn't my XMLPScanToken passed to parseFirst() supposed to be loaded with the
new info from the XMLScanner regardless of whether I get an error in the
prolog or not?  In my case, it is still zero and causes a subsequent error
when I parseNext().

Or is the internal fScannerId and fSequenceId in XMLScanner suppose to
reinitialize back to zero after a warning so that I can avoid subsequent
errors after a warning?

How do I keep my token in sync with the XMLScanner token?  

Re: Progressive parse token issues

Posted by Dean Roddey <dr...@charmedquark.com>.
Progressive parse token issuesIf parseFirst() returns false, then you can't go any further and in that case it wouldn't have probably set up the token. If parseFirst() is returning true, and you are seeing this problem, then that's probably a bug.

--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"If it don't have a control port, don't buy it!"


  ----- Original Message ----- 
  From: Williamson, Siehnai 
  To: 'xerces-c-dev@xml.apache.org' 
  Sent: Friday, October 19, 2001 11:38 AM
  Subject: Progressive parse token issues




  Hi Everyone, 

  I'm currently using the SAXParser and I'm getting warnings when my encoding scheme stated does not match the actual encoding in the document.  This is good.  However, when I attempt a parseNext(token) after the warning, I get an error code 68 which is "Scan_BadPScanToken".  This is because the XMLPScanToken passed to parseNext() still has both the fScannerId and fSequenceId as 0 (zero) while the internal fScannerId and fSequenceId in XMLScanner is something other than zero.

  Isn't my XMLPScanToken passed to parseFirst() supposed to be loaded with the new info from the XMLScanner regardless of whether I get an error in the prolog or not?  In my case, it is still zero and causes a subsequent error when I parseNext().

  Or is the internal fScannerId and fSequenceId in XMLScanner suppose to reinitialize back to zero after a warning so that I can avoid subsequent errors after a warning?

  How do I keep my token in sync with the XMLScanner token?