Re: Correct syntax of <LI> tags

Murray Maloney (murray@sco.com)
Wed, 21 Jun 1995 13:20:00 -0400 (EDT)


Subject: Re: Correct syntax of <LI> tags
To: "Daniel W. Connolly" <connolly@beach.w3.org>
Date: Wed, 21 Jun 1995 13:20:00 -0400 (EDT)
From: Murray Maloney <murray@sco.com>
Cc: ccaamwd@ucl.ac.uk, www-html@www10.w3.org, html-wg@oclc.org
In-Reply-To: <199506211642.MAA05307@beach.w3.org> from "Daniel W. Connolly" at Jun 21, 95 12:42:38 pm
Message-Id:  <9506211320.aa10860@dali.scocan.sco.COM>

Daniel W. Connolly writes:
> In message <9506211217.aa10508@dali.scocan.sco.COM>, Murray Maloney writes:
> >
> >For what it's worth, my reading of the spec and 
> >experience with browsers is that a space following
> >an <LI> should be presented by the browser.
> 
> Hmmm... yet more feedback that the spec isn't quite clear.
> I think the spec says it shouldn't be presented (see below).
> 
> >Having said that, I will also say that the HTML spec does
> >not serve as a specification for browsers, but for the 
> >language.  While it does provide numerous suggestions 
> >to browser developers, there is no spec for HTML user agents.
> >At least not yet.
> 
> I have to disagree here. And I think the spec is quite clear:

Oh, Oh!  I seem to have stepped in it....  :-)
> 
> Hypertext Markup Language - 2.0 - Introduction
> http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_1.html#SEC6
> Fri Jun 16 19:56:20 1995
> 
> |Conformance
> |
> |This specification governs the syntax of HTML documents and aspects of
> |the behavior of HTML user agents.
> ...
> |User Agents
> |
> |An HTML user agent conforms to this specification if: 
> |
> ...

OK, I agree that there are some aspects of UA behavior that 
is stipulated in the spec.  But I think that you will agree
that the spec does not attempt to specify UA behavior or
presentation for each and every tag/attribute combination.

My assertion was a bit too strong.  I take it back.

> On the particular issue of whitespace an <LI>, the spec is not
> quite as clear. My intent was that both Netscape and Mosaic are
> conforming user agents (and that in general, information providers
> can't rely on how whitespace like this will be handled), but
> the browsers that throw out the whitespace before and after
> all the words in a block structuring element are preferred.

Yes, they are both conforming browsers on the basis that 
we are attempting to specify current usage as of mid-1994.
> 
> Hypertext Markup Language - 2.0 - Characters, Words, and Paragraphs
> http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_6.html#SEC63
> Fri Jun 16 19:56:22 1995
> 
> |An HTML user agent should present the body of an HTML document as a
> |collection of typeset paragraphs and preformatted text. Except for
> |preformatted elements (PRE, XMP, LISTING, TEXTAREA), each block
> |structuring element is regarded as a paragraph by taking the data
> |characters in its content and the content of its descendant elements,
> |concatenating them, and splitting the result into words, separated by
> |space, tab, or record end characters (and perhaps hyphen
> |characters). The sequence of words is typeset as a paragraph by
> |breaking it into lines.

By all means, if we want to be explicit about this -- and don't
mind that some existing browsers will be non-conforming as a
result -- then the spec might also say something like:

	Whitespace (spaces and tabs) between tags and data characters
	should be discarded and and multiple spaces collapsed 
	into a single space during this process.
> 
> >Getting back to the language though, HTML as an SGML application
> >should respect white space between the <LI> tag and subsequent
> >text.
> 
> I don't quite follow. Could you cite your evidence for this
> conclusion? A conforming SGML parser will in fact report the space as
> part of the content of the LI element. But HTML, as an SGML
> application, is free to prescribe whatever sort of processing it dang
> well pleases with that space, no?
> 
Sorry, I can't.  I am writing from memory, as I don't have 
a copy of 8879 or the Handbook with me at the moment.

Anyway, yes I agree that an HTML-conforming application
is free to prescribe the processing.  I was thinking more
about what the parser should do with the white space
in the absence of explicit specification to the contrary
and given that existing HTML UAs agree with this assertion.

Murray