[XML-SIG] Re: HtmlBuilder
Tue, 9 Mar 1999 11:21:41 -0800
> [on ignoring bogus end tags]
>>I like the idea of allowing the user to toggle raising exceptions or
>>ignoring the error.
>Indeed. Here's a proposal for the interface:
>b = HTMLBuilder( ignore_mismatched_end_tags = 1 )
>From: "Fred L. Drake" <firstname.lastname@example.org>
> Well, this specific error would be handled, but not a lot of
>variations. That's probably something best handled by a sub-class, as
>you'll probably identify a lot of weird cases, and many may be
>specific to the group of authors you're supporting.
If you're going to subclass, you could also just call a
handle_mismatched_end_tag() method which raises an exception in the base
class, but can be overridden in the derived class to do nothing or perhaps
just print out a warning.