[XML-SIG] handle_entityref not being called
Sun, 30 May 1999 15:56:15 -0400
Michelle Mills Strout writes:
> I am using the XMLParser class which is part of the xmllib. I would like
> to define my own entity references of the form "β". In the process
> of doing this I found that the function handle_entityref isn't actually
> called with an entity reference is called. I stepped through the
> following function with the debugger.
The version of xmllib.py in Python 1.5.2 does seem to ignore
handle_entityref(). Entities are handled in the internal method
called goahead(), where, if an entity reference is found, the
self.entitydefs dictionary is checked, and, if no corresponding key is
found, the unknown_entityref() function is called. Perhaps the
handle_entityref() method is obsolete; Sjoerd?
The version of xmllib.py in the omnibus XML package is older,
and actually does call handle_entityref(), which is why I'm assuming
that the method was made vestigial (though not deleted) in version
A.M. Kuchling http://starship.python.net/crew/amk/
When John Ryder, for instance, writes "I utter valediction to the author of my
being", he means simply that he said goodbye to his mother.
-- Robertson Davies, "How to Be a Collector"