Re: Error recovery spec

On 12/17/2012 10:11 AM, John Cowan wrote:
> Michael Sokolov scripsit:
>
>> John - for those of us not fully steeped in the mysteries of tag
>> soup, would you mind providing an example where the ReStartable
>> property is useful?
> Sure.  For example, the HTML "i" and "b" elements are ReStartable.
> If they were not, then the sequence <i>italic<b>bolditalic</i>bold</b>
> would be rectified as <i>italic<b>bolditalic</b></i>bold</b> which
> is well-formed but suboptimal: the text "bold" is not bold.  With
> ReStartability, the result is <i>italic<b>bolditalic</b></i><b>bold</b>
> because "b" is restarted as soon as the "i" element is closed.
>
I see - and then there is the wrinkle about restarting after a 
not-possible child, which is what I really didn't quite get.


3) When the start-tag of an element that is not a PossibleChild of the
currently open element is seen, an end-tag for the current element is
inserted and it is removed from the stack.  This is done recursively
until the start-tag is a PossibleChild, or all elements except the root
element have been closed.  If an element being closed has the ReStartable
property, its start-tag with all attributes is pushed on the front of
the queue.  Then the element is pushed on the stack.


  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?

-Mike

Received on Monday, 17 December 2012 15:25:14 UTC