Re: Generic LIST Element

Joe English (
Thu, 03 Aug 1995 16:52:31 -0700

Message-Id: <>
Subject: Re: Generic LIST Element 
In-Reply-To: <> 
Date: Thu, 03 Aug 1995 16:52:31 -0700
From: Joe English <>

While we're on the subject, how does this content 
model look?

    <!ELEMENT (UL|OL) 	- - (LI+)>
    <!ELEMENT LI	- O (LIH, (%block;)*) >
    <!ELEMENT LIH	O O (%text;)* >

For reference, the current definition is:

    <!ELEMENT (OL|UL) - -  (LI)+>
    <!ELEMENT LI    - O %flow>
    <!ENTITY % flow "(%text|%block)*">

Currently, <LI> can contain block-level and phrase-level
elements (and #PCDATA) freely intermixed.  The new model 
would only allow an initial sequence of phrase-level text
(wrapped in an LIH); "free-floating" character data would
not be allowed after the first block element.

Since the LIH is contextually required, the start-tag can be 
omitted, so existing markup like:

    <li>Short items.
       <p>Longer items....
	    <li>Nested lists
    <li>Nested lists with headers:

would still be conformant.

There are some subtle changes, but nothing that should affect
current browsers: the internal element structure would change,
and <LI> would no longer have mixed content so spurious whitespace
between block-level elements would disappear.  (This is a desirable
change, IMHO.)  The LIH element would facilitate collapsible 
outlines (as discussed earlier), and would in many cases
require no change to current documents.
Something similar could be done for <DD> and other elements
of that nature.

--Joe English