Re: Contexts in which <menu> is allowed

On Sat, 12 Jan 2008, Henri Sivonen wrote:
> 
> From the draft:
> > 3.18.4. The menu element
> > 
> > Categories
> >     Prose content.
> >     If there is a menu element ancestor: phrasing content.
> 
> Is there a reason why the latter case isn't phrased as:
>      As the only child of a li element whose parent is a menu element.
> OR
>      As a child of a li element whose parent is a menu element.
> ?
> 
> On the surface, either of those would yield more sensible trees than the 
> current spec text. (Also, either of those would be significantly simpler 
> to implement in RELAX NG...)

I've simplified it a lot (allowing both <menu> and <menu><li> to just 
contain arbitary flow content).

You might want to add a warning to the validator for the case where a 
<menu> or <menu><li> where the <menu> is type=context or type=toolbar 
contains a descendant element that defines a command or is an <hr>, 
<menu>, or <select>, but is not a child of a <menu>.

e.g.:

   <menu type="context"><p><a href="x">x</a></p></menu>

...should probably trigger a warning, since the context menu will be 
empty in that case (it wouldn't be if the <p> tags were removed).

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

Received on Tuesday, 18 November 2008 07:45:35 UTC