[XML-SIG] Re: HtmlBuilder

Jonothan Farr jfarr@real.com
Tue, 9 Mar 1999 11:21:41 -0800


>Jeff.Johnson@icn.siemens.com writes:
>  [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" <fdrake@cnri.reston.va.us>
>To: Jeff.Johnson@icn.siemens.com
>
>Jeff,
>  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.

--jfarr