Re: [xml] HTMLparser: SGML comments




Hi Daniel,

  I would just use the existing HTML_PARSE_RECOVER mode flag for this, though
in a sense I would have preferred the default behaviour to be maintained.

This flag is passed in by the caller and instructs the parser to attempt
to keep parsing even after serious errors?

I really think that a wrong count number of '-' in comments is a frequent
mistake and even if SGML suggest it is not ended we should not miss the
start tag on the next element. This is a too benign error, and the effects
are too strong with the new code, this feels unbalanced especially as it
is a change from the current behaviour.

Perhaps if the comment appears to be unterminated according to SGML rules
it will be sufficient to fall back to the old parsing behaviour and just
look for the first closing "-->" sequence. I will take a look at this
behaviour and see if it is at all practical. (Introducing a new
quirks-mode is still possible, but it would be nice to avoid the extra
complexity if there is a simpler way).

Cheers,

Michael

-- 
Print XML with Prince!
http://www.princexml.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]