At 02:37 PM 2000-04-27 +0200, Reinier Post wrote:
>A question about HTML::TreeBuilder.  I am trying to use this module
>in a HTML rewriting proxy.  The documentation says
>
>>BUGS
>>     * Currently, it's assumed that "HTML" is the top node in the
>>     tree, and that "HEAD" and "BODY" must be right under "HTML".
>>     Framesets are therefore coerced into being under "BODY",
>>     even if the document in question has the "BODY" inside a
>>     "NOFRAMES" element. This may change in a future version,
>
>Does anything outside HTML::TreeBuilder and/or HTML::Element
>depend on this assumption?

It emerges incidentally from necessary assumptions.  Specifically the
assumption that all elements besides head, body, and html belong either in
the head, or in the body, or can be in either.

>How easy would it be to change HTML::TreeBuilder to preserve
>the structure of framed pages?

Not terribly, but I'll give it a try.  In the meantime, yes, try moving
things around to repair the tree.  Presumably it's just a matter of finding
the body, finding the frameset under that, moving it up to be body's
sister, and then demoting body to... be inside the noframe element inside
the frameset (or make one if none there?).

--
Sean M. Burke  [EMAIL PROTECTED]  http://www.spinn.net/~sburke/

Reply via email to