Re: Error recovery spec

Michael Sokolov scripsit:

>  Would that have the effect that:
> 
> <b>bold<p>para</p>text</b>
> 
> becomes
> 
> <b>bold</b><p>para</p><b>text</b>
> 
> since p would not be allowed as a child of b?

With the algorithm as given, yes.  TagSoup knows that character data is
a PossibleChild of b, so the result would be the somewhat better:

<b>bold</b><p><b>para</b></p><b>text</b>

wherein the "b" element is enqueued and dequeued twice.

Bugs in this part of the algorithm delayed TagSoup 1.0 for a year before
I realized that in this situation "b" was not being properly dequeued,
resulting in a vast pileup of </b></b></b> ... at or near EOF.

-- 
John Cowan   cowan@ccil.org   http://ccil.org/~cowan
I must confess that I have very little notion of what [s. 4 of the British
Trade Marks Act, 1938] is intended to convey, and particularly the sentence
of 253 words, as I make them, which constitutes sub-section 1.  I doubt if
the entire statute book could be successfully searched for a sentence of
equal length which is of more fuliginous obscurity. --MacKinnon LJ, 1940

Received on Monday, 17 December 2012 16:12:39 UTC