Re: Netsted lists in W3C's Validation Service (http://validator.w3.org/)

by "apathetic" <tmbkr(at)apatheticgenius.com>

 Date:  Sun, 23 Dec 2001 14:19:52 -0000
 To:  "Yuri Demchenko" <demch(at)terena.nl>
 Cc:  <hwg-techniques(at)hwg.org>
 References:  terena tim terena2 tim2 terena3
  todo: View Thread, Original
Your second example, I believe, is what should be used.  It's logical, if
you think what you are actually doing with a nested list.

Tim



www.ApatheticGenius.com

----- Original Message -----
From: "Yuri Demchenko" <demch(at)terena.nl>
To: "apathetic" <tmbkr(at)apatheticgenius.com>
Cc: <hwg-techniques(at)hwg.org>
Sent: Saturday, December 22, 2001 9:15 PM
Subject: Re: Netsted lists in W3C's Validation Service
(http://validator.w3.org/)


> apathetic wrote:
> >
> > > <!ELEMENT UL - - (LI)+                 -- unordered list -->
> > > <!ELEMENT OL - - (LI)+                 -- ordered list -->
> > > <!ELEMENT LI - O (%flow;)*             -- list item -->
> > >
> > > But still HTML 4.01 specification doesn't tell me that nested list
> > > should be included into previous <li> element.
> >
> > It looks to me like UL and OL may only contain LI elements.  This means
that
> > everything else, including other UL or OL elements, must be within the
LI.
> >
> Tim,
>
> Earlier I pointed out that <li> definition in specification/DTD is
> different from what I've seen in validator.
>
> I agree with you and can write according to the specification:
>
> 01  <ul>
> 02      <li> . . . </li>
> 03      <li> . . . </li>
> 03a     <li>                    #opening <li> element for nested list
>        ^^^^^^
> 04          <ul>
> 05              <li> . . . </li>
> 06              <li> . . . </li>
> 07          </ul>
> 08      </li>                   #closing <li> element for nested list
> 09      <li> . . . </li>
> 10  </ul>
>
> But validator wants:
>
> 01  <ul>
> 02      <li> . . . </li>
> 03      <li> . . .            #nested list included into previous <li>
>
> 04          <ul>
> 05              <li> . . . </li>
> 06              <li> . . . </li>
> 07          </ul>
> 08      </li>
> 09      <li> . . . </li>
> 10  </ul>
>
>
>
> I checked with HTML 4.01 DTD http://www.w3.org/TR/html401/sgml/dtd.html
>
> <!ENTITY % inline
>       "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
>
> <!ENTITY % block
>       "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
>        BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
>
> <!ENTITY % flow "%block; | %inline;">
>
> Yuri

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA