Re: [xml] default entities

On Tue, Feb 14, 2006 at 04:48:10PM -0200, Guilherme Balestieri Bedin wrote:
Daniel Veillard wrote:
On Tue, Feb 14, 2006 at 04:11:32PM -0200, Guilherme Balestieri Bedin wrote:

I did a small change in xmlEscapeEntities() from  xmlsave.c to take 
account of the xmlSubstituteEntitiesDefaultValue parameter.
So, now I can control if default entities will be substitute or not by 
xmlSubstituteEntitiesDefault() in tree serialization like with the parser.

I wanna now if this behavior can be added to libxml2 ? If yes, how is 
the process ?

 No, this change the behaviour of a common function. Moreover
using global variables to change the behaviour of the library is an
error inherited from the early times of libxml and that's I'm trying
to get rid of as much as possible, so really no.

Ok, so how is the right way to achieve this behavior ?

  write your own function ! The places where xmlEscapeEntities() is called
must be preserved, I don't want libxml2 to output not well formed XML.
The behaviour, in the context of the library as it is used, must be preserved
it's not negociable. Now if you want a function similar to this but with
a different behaviour for your own use, use your own copy.


P.S.: and keep emails on the list please.

Daniel Veillard      | Red Hat
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]