HTML::Tree - doctype bug, documentation update, HTML::Element documentation bug

HTML::Tree - doctype bug, documentation update, HTML::Element documentation bug

am 20.11.2005 13:46:25 von metaperl

------=_Part_21381_2975357.1132490785612
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

A few things about HTML::Tree -

DOCTYPE bug
=3Dfor comment
This program shows that HTML::TreeBuilder renders a document with the
DOCTYPE declaration in the wrong place. In the docs, Sean says that
DOCTYPE decl is not important. It wasn't when he wrote TreeBuilder but it i=
s
becoming more important these days.
=3Dcut

use strict;
use warnings;

use HTML::TreeBuilder;


my $html =3D<<'EOHTML';
"http://www.w3.org/TR/html4/loose.dtd">





blah blah


EOHTML

my $tree =3D HTML::TreeBuilder->new;
$tree->store_declarations(1);

$tree->parse($html);
$tree->eof;

print $tree->as_HTML(undef, " ");


rework of HTML::Element docs to use head3 instead of item
The table of contents for HTML::Element does not list the method names
because they were documented using =3Ditem instead of =3Dhead3. I'd be happ=
y to
rewrite them this weekend.

here's a small doc bug.


http://search.cpan.org/~petdance/HTML-Tree-3.1901/lib/HTML/E lement.pm


~literal pseudo-elements

These objects are not currently produced by HTML::TreeBuilder, but can be
used to represent a "super-literal" -- i.e., a literal you want to be immun=
e
from escaping. (Yes, I just made that term up.)

That is, this is useful if you want to insert code into a tree that you pla=
n
to dump out with as_HTML, where you want, for some reason, to suppress
as_HTML's normal behavior of amp-quoting text segments.

For expample, this:
^^^^^^ - mis-spelling

------=_Part_21381_2975357.1132490785612--

Re: HTML::Tree - doctype bug, documentation update, HTML::Element documentation bug

am 20.11.2005 20:14:41 von Andy

On Sun, Nov 20, 2005 at 04:46:25AM -0800, Terrence Brannon (metaperl@gmail.com) wrote:
> This program shows that HTML::TreeBuilder renders a document with the
> DOCTYPE declaration in the wrong place. In the docs, Sean says that
> DOCTYPE decl is not important. It wasn't when he wrote TreeBuilder but it is
> becoming more important these days.

I've updated your changes in the Subversion repository at
http://svn.perl.org/modules/HTML-Tree/trunk

There's a test case in t/doctype.t. Remove the SKIP block, and it'll
fail. That's the way we know we've fixed it, when that happens.

xoxo,
Andy

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance