la mouton <[EMAIL PROTECTED]> writes:

> > In other words, HTML::Parser should parse not HTML, but what some browsers
> > think HTML is.
> 
> exactly.  Any resolution with this patch?  I can perhaps make another
> patch integrating this change into $parser->strict_comment(0), or perhaps
> make another option such as $parser->act_as_browser() or somesuch....

Another approach to this is to make the declaration mode only trigger
if the first word right after "<!" is known.  HTML::Parser would then
maintain a list of words (or a hash) and then look the name up before
it proceeds in parse_decl().

The inital/default declaration list should be set up to include
"DOCTYPE", "ENTITY", "ELEMENT", and "ATTLIST".

-- 
Gisle Aas

Reply via email to