[whatwg] [WA1] INS/DEL and omitted </p> tags

On Fri, 25 Nov 2005, Anne van Kesteren wrote:
>
> Quoting Mikko Rantalainen <mikko.rantalainen at peda.net>:
> > The Opera behavior cannot be implemented without having the knowledge that
> > an ins element cannot contain a p element.
> 
> It can contain a 'p' element. Only not when its parent is a 'p' element.

Well, per HTML4 there's no rule, since it would be invalid content.


On Fri, 25 Nov 2005, Lachlan Hunt wrote:
> > >
> > > How should a UA parse the following markup snippet?
> > > 
> > > <p>foo<ins><p>bar</ins>
> > 
> > It should be parsed as:
> > 
> >   <p>
> >     foo
> >     <ins>
> >     </ins>
> >   </p>
> >   <p>
> >     bar
> >   </p>
> 
> That seems insane, the second p element is clearly intended to be within 
> the ins element, and thus Mozilla's parsing makes much more sense (it 
> also happens to match what an SGML parser would produce for HTML4).

I don't think it is "clearly indended" to be within the <ins> element.

Consider this (identical, from a parsing perspective) snippet:

   <p>foo<em>foo
   <p>barbar

What do you think should happen for that?


> Although, that is error handling behaviour, neither parsing method is 
> likely to be what the author actually intended.  It's more likely that 
> the author intended something like the following, but didn't realise the 
> end-tag for the first <p> element would be required in this case for it 
> to work:
> 
> <p>foo</p>
> <ins><p>bar</p></ins>
>
> Doing that, however, might be more difficult to implement and I know of 
> no existing implementations that do.

Yeah, that would be ideal, but I don't know how to do it.

> > Basically, when the parsing section gets written, it'll be written to 
> > match the behaviour that the most browsers do.
> 
> Generally, for interoperability reasons, I'd agree to just specify what 
> browsers actually implement, but I think this is one where sanity should 
> win over pre-existing interoperability and I suggest you go with 
> Mozilla's behaviour.

This is one case where Mozilla's behaviour really isn't compatible with 
other browsers.


On Fri, 25 Nov 2005, [ISO-8859-1] David H?s?ther wrote:
> > 
> > Basically, when the parsing section gets written, it'll be written to 
> > match the behaviour that the most browsers do.
> 
> Why not require end-tags for all non-empty elements?

How would that help?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 10 March 2006 17:07:51 UTC