Re: [xml] SAX interface and xmlSubstituteEntitiesDefault()



On Fri, Sep 10, 2004 at 07:37:15AM -0700, Bill Moseley wrote:
We are calling xmlSubstituteEntitiesDefault(1); in our code, but the
entity is not magically replaced in the output like I had hoped.

  libxml2 entities support requires some of the tree constructs
done in the default SAX handlers. So this won't work.

Can someone help clear up my confusion on this issue?  And is there a
way to get these entities expanded in the SAX parser output?

  you could play with the SAX handlers pointing for examples
at the default entities declaration handling but even that won't
work in the general case.

On a related note, I'm using the SAX interface example by James
Henstridge as linked off http://www.xmlsoft.org/interface.html.  Yet,
I now see off the API menu the SAX2 interface and that the one I'm
using is deprecated.  I briefly looked through the changes file and tried
searching (but "sax" is a bit common a search term) for info on the
change to SAX2.  Is there a guide or list discussion someone can point
me to about this change and what is required to move to that
interface (and if/when the old SAX interface might no longer be
supported)?

removing APIs won't be done until a new incompatible 3.x is released and
I have no such plan so far. Discussions about the changes were one year
ago on this list, try to look in the archive from mid aug-2003 to end
of Sep-2003. The new APIs provide namespace informations and attribute
defaulting too.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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