Olaf Klischat - 2006-08-18

..well, WebTable and others, actually.

HTMLSegment, according to its documentation, "represents the parse tree for a segment of HTML". Which WebTable clearly does, or not? Instead, WebTable is an HTMLElement, which is "an interface which defines the common properties for an HTML element, which can correspond to any HTML tag". There are essentially two separate hierarchies for HTML trees, one based on HTMLSegment, the other on HTMLElement. Some things like TableCell or TextBlock are HTMLSegments, most others like TableRow, WebTable or WebList are HTMLElements (TextBlocks are both, actually). There is no common base interface for all kinds of HTML segments. It makes deriving your own classes a total pain in the *ss.

Is there some motivation behind this design?