RE: [libxml++] sax_parser example: entity not defined



On Tue, 2003-11-25 at 09:02, Murray Cumming Comneon com wrote:
> > > I would be surprised
> > > if we always had to use this dummy document just to get 
> > normal entity 
> > > substitution.
> > 
> > It can be made to work without using a Document object, just 
> > don't ask me how because this is my preferred solution ;-). I 
> > think another solution would end up duplicating much logic in libxml2.
> 
> I don't object to your use of the dummy document, I am just surprised that
> we must do anything, even when we don't want callbacks for the entities. I
> must do some C tests to find out what's going on here.

It is still possible to set_substitute_entities(false) and it works,
encoding the reference as &ref;  That is regardless of whether the
get_entity callback is registered. Without a callback and
set_substitute_entities(true) is what is rather broken and only confuses
users. Having a callback that is always registered with a default
behaviour in the base class is nice because users deriving SaxParser
must virtually request the callback by overriding the method.






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