MENU Content Model [was: HTML 3.2 Content Models ]

Daniel W. Connolly (
Fri, 10 May 1996 12:46:51 -0400

Message-Id: <>
Subject: MENU Content Model [was: HTML 3.2 Content Models ]
In-Reply-To: Your message of "Sat, 11 May 1996 02:08:30 +1000."
Date: Fri, 10 May 1996 12:46:51 -0400
From: "Daniel W. Connolly" <>

In message <>, "Dianne Gorman" writ
>2.  <!ELEMENT (DIR|MENU) - -  (LI)* -(%block)>
>How can you exclude %block from the LI element?  
>In, for example:
><!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
><!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">
>it is clear that the PRE element can contain all the elements in %text 
>except those in %pre.exclusion.
>But DIR and MENU can contain LI elements. There are no %block 
>elements to exclude, so (LI)* -(%block) is surely meaningless?

SGML inclusion and exceptions affect not just the children
of an element (e.g. DIR and MENU) but all descendents (see
section 11.2.5 of the SGML standard)

So the above content model for DIR|MENU excludes nested lists and
stuff like::

	<li>blah blah

The theory is that the oft-seen idiom:

	Products | Services | Search | Home


	* Products * Services * Search * Home

could be marked up as:


User agents would be sure that there are no block elements in
the LIs inside MENU/DIR, so they could use a very compact rendering.

Another theory is that dir/menu are deprecated, and this sort
of thing should be marked up as:

	<ul class=menu><li>Products ...

but the class attribute doesn't affect the content model of
the UL element, so there's no guarantee that <ul class=menu>
doesn't have nested lists and such.

Not that the DTD reliably provides such guarantees in practice... :-)