Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Magnus Lie Hetland wrote: According to The Sgmlop Module Handbook [1], the handle_entityref() callback is called for malformed character entities. What does that mean, exactly? What is a malformed character entity? I've tried mis-spelling them (e.g., dropping the semicolon), but then they're

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
In article [EMAIL PROTECTED], Fredrik Lundh wrote: Magnus Lie Hetland wrote: [snip] with sgmlop 1.1, the following script class entity_handler: def handle_entityref(self, entityref): print ENTITY, repr(entityref) parser = sgmlop.XMLParser() parser.register(entity_handler())

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Magnus Lie Hetland wrote: if you have a handle_entityref hook, but no handle_charref, the part between and ; is passed to handle_entityref. Strange. It doesn't seem to work that way for me... Here is an example: from xml.parsers.sgmlop import SGMLParser, XMLParser, XMLUnicodeParser are the

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
In article [EMAIL PROTECTED], Fredrik Lundh wrote: [snip] are the PyXML folks shipping the latest sgmlop? I don't know. The last history entry marked fl is from 2000-07-05... Perhaps I should just get the effbot version. (And perhaps file a bug report about this behaviour in PyXML.) I'm pretty

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Martin v. Löwis
Fredrik Lundh wrote: are the PyXML folks shipping the latest sgmlop? I'm pretty sure they've forked the code (there's no UnicodeParser in the effbot.org edition), and I have no idea how things work in the fork. As we've forked the code, the answer is a clear yes :-) It certainly is the latest

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Martin v. Löwis wrote: are the PyXML folks shipping the latest sgmlop? I'm pretty sure they've forked the code (there's no UnicodeParser in the effbot.org edition), and I have no idea how things work in the fork. As we've forked the code, the answer is a clear yes :-) It certainly is the