Re: lwp-0.04 released

Andreas Koenig (k@anna.mind.de)
Sat, 9 Sep 1995 18:07:14 +0200


  >From: Gisle Aas <aas@oslonett.no>
  >
  >> (2)
  >> The second problem has an easier fix. <LI> doesn't deserve an implicit
  >> <P>, does it?
  >
  >Sometimes.  Consider this:
  >
  >  <ul> <li>  Para1 <p> Para2 <p> Para3 <li> Item2 </ul>
  >
  >This text is currently parsed (perl -e 'use HTML::Parse; 
  >parse_htmlfile("li.html")->dump) as:
  >
  ><HTML>
  >  <BODY>
  >    <UL>
  >      <LI>
  >        <P>

This is the <P> I dislike.

  >          " Para1 "
  >        <P>
  >          " Para2 "
  >        <P>
  >          " Para3 "
  >      <LI>
  >        <P>
  >          " Item2 "
  >
  >If the list item contains multiple paragraphs, then you would (at least I do) 
  >want the <p>.

Not as an implicit tag. There should be a <P> allowed, but not
enforced, imhhho.

  >               The DTD I have (draft-ietf-html-spec-03.txt) says:
  >
  >  <!ELEMENT LI    - O %flow>
  >  <!ENTITY % flow "(%text|%block)*">
  >  <!ENTITY % block "P | %list | DL
  >            | %preformatted
  >            | %block.forms">
  >  <!ENTITY % text "#PCDATA | A | IMG | BR | %phrase | %font">
  >  <!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE ">
  >  <!ENTITY % font " TT | B | I ">
  >

This hasn't changed in the 05 draft that I have here. But in HTML 3.0
there is an interesting comment:

<![ %HTML.Recommended [
    <!ENTITY % flow "(%block)*">
]]>

Anticipating future needs I'm happy if we interprete as %block.

  >It is a matter of parsing it as "%text" or as a "%block".  Perhaps we could  
  >delay creation of the first <p> until we find another one within the same list 
  >item.  Or perhaps we just do as you suggest.  The same agument goes for <dd> 
  >(and perhaps <dt>) I guess.  We could also try to eliminate the tag when 
  >creating HTML from the syntax tree. Are there any other problems with the <p>?

The only problem I see is the <P> that you suggest between <LI> and
the following block. I don't think, the specs really demand for it
although the DTD can easily be misinterpreted in this direction. I
think, the beginning of the first paragraph of a list item *is* the
bullet (or whatever symbol inserted by the front end), and the
vertical space above it *is* the paragraph seperator. Otherwise there
would be no way (at least I don't see it) to render such an example,
which I have stolen from the 3.0 specs:

       <UL>
         <LH>Table Fruit</LH>
         <LI>apples
         <LI>oranges
         <LI>bananas
       </UL>

Which could be rendered as: 

       Table Fruit

	  *   apples 

	  *   oranges 

	  *   bananas 

You see, what I mean? I didn't find a word in the specs that supports
my view, but maybe because it is so obvious ;-)


  >> Thank you, Gisle, (BTW, can you tell us how your name is pronounced?)
  >
  >Just as it is written!!  "Gi" as in "give", "s" is just an "s", and "le" as in 
  >"let".  You got it? or do I have to provide some basic/audio?  I would not 
  >believe that germans should have any trouble with this.  It is just like 
  >"Gisela", you just remove the "a" and transponse a few chars to give it a 
  >masculine touch  :-)

Well, the obvious sometimes isn't the first thing our brains try to
see. Cheers, Gisle!

  >
  >--Gisle
  >

andreas