[imps] td fragments

Henri Sivonen hsivonen at iki.fi
Thu Apr 3 07:32:06 PDT 2008


On Apr 3, 2008, at 03:50, Ian Hickson wrote:
> On Wed, 2 Apr 2008, Henri Sivonen wrote:
>>
>> Can someone, please, explain to me, what part of the spec makes the
>> insertion mode "in body" when the context is "td" or "th" in the
>> fragment case?
>
> None. It's "in cell".

Why? That is, based on what normative statements in the spec?

"3 If node is the first node in the stack of open elements, then set  
last to true; if, in addition, the context element of the HTML  
fragment parsing algorithm is neither a td element nor a th  element,  
then set node to the context element. (fragment case)"

Now /node/ is "html"--not "td".

"5 If node is a td or th element, then switch the insertion mode to  
"in cell" and abort these steps. "

This doesn't match, since it is "html"--not "td".

>> Specifically, this test case doesn't pass when I implement "reset the
>> insertion mode" rigorously per spec as far as I can see.
>>
>>   1048  ryansking #data
>>   1048  ryansking </table></tbody></tfoot></thead></tr><div>
>>   1048  ryansking #errors
>>   1062  ryansking Line: 1 Col: 8 Unexpected end tag (table). Ignored.
>>   1062  ryansking Line: 1 Col: 16 Unexpected end tag (tbody).  
>> Ignored.
>>   1062  ryansking Line: 1 Col: 24 Unexpected end tag (tfoot).  
>> Ignored.
>>   1062  ryansking Line: 1 Col: 32 Unexpected end tag (thead).  
>> Ignored.
>>   1062  ryansking Line: 1 Col: 37 Unexpected end tag (tr). Ignored.
>>   1062  ryansking Line: 1 Col: 42 Expected closing tag. Unexpected
>> end of file.
>>   1114   hsivonen #document-fragment
>>   1114   hsivonen td
>>   1052  ryansking #document
>>   1052  ryansking | <div>
>
> What part doesn't pass? (i.e. what do you get?)

| <head>
| <body>
|   <div>

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the Implementors mailing list