Re: [xml] external entity references using SAX interface

On Fri, Nov 22, 2002 at 12:23:59AM +0100, Vassili Dzuba wrote:
i know that the libxml documentation explicitely counsel to use
the dom interfce if one has to use entities, but i don't see any
philosophical reason why a sax interface should be so 

I will give you two:
  - libxml2 preserves entity references in attributes
    values, SAX doesn't allow it but I decided I wanted that feature.
  - libxml2 DOM shares a common subtree on multiple entities references
ask first for entity substitution to avoid them.
Plus a number of reasons which make SAX hard to use in pure C, Megginson
never bothered trying to solve those, SAX is not a C friendly API, it's
also too limited for an editing toolkit like libxml2.

Look at the various entry points in SAX.c related to entities, and
the value of ctxt->inSubset.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]