[ expat-Patches-551599 ] Patch for bugs # 483514, 544679, 548690

noreply@sourceforge.net noreply@sourceforge.net
Thu May 2 13:39:12 2002


Patches item #551599, was opened at 2002-05-02 16:38
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=551599&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Karl Waclawek (kwaclaw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for bugs # 483514, 544679, 548690

Initial Comment:
This is an extensive patch, and needs not only 
testing, but also a review by my fellow developers!

It addresses these issues:

# 483514 (default handler reports too much from DTD):
    only the following data are reported now: 
    - ignored DTD sections
    - unhandled external parameter entity references
    - top level whitespace
    This may not be what is needed, but more would
    have been a lot of work

# 544679, 548690 (DTD handling of external entities): 
   - the storeEntityValue function has been modified
     to call the external entity reference handler, 
     since it did not handle external PE references
     at all
    - a new STRING_POOL has been added that gets
      passed from a parent to a child parser
     (member of DTD structure), so that entity values
      can be built across parsers 
    - new functions entityValueInitProcessor and 
      entityValueProcessor have been added
    - the old usage of dtd.complete was completely
      changed - I never understood how it worked,
      and it didn't work properly anyway;
      therefore there is a danger now that some logic
      will not work anymore - please review and check
    - the usage of hadExternalDoctype was modified too
    - there have been changes in xmlrole.c too - the
      chain of state handlers was extended from 
      entity9 to entity10 - in analogy to how general 
      entities - please review the diff file 
    - as a result, this patch now processes all
      of James Clark's test cases in the
      /valid/not-sa and /valid/ext-sa directories
      properly

* I have also made some fixes to the recently
  introduced XML_ParserReset function (incl. 
  changing it's return type), and one fix that
  prevents a null pointer error

The patch is based on these revisions:
- expat.h rev. 1.17
- xmlparse.c rev. 1.31
- xmlrole.c rev. 1.5
- xmlrole.h rev. 1.3

I have included the full patch files, 
an annotated version of xmlparse.c - good
to understand my changes, and the diff files.

Karl


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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=551599&group_id=10127