W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Re: DogFood (and inline/block constraints)

From: Adam van den Hoven <adam.vandenhoven@gmail.com>
Date: Wed, 12 Dec 2007 09:40:47 -0800
Message-Id: <D4C72B97-9C64-4458-9F66-AD962ACE1142@gmail.com>
To: "public-html@w3.org Tracking WG" <public-html@w3.org>

> On 12-Dec-07, at 7:26 AM, David Carlisle wrote:
> Ian
>> However, this is far from a resolved issue. What would be especially
>> useful is a study of use cases -- occurances where people mix  
>> inlines and
>> blocks, and why unmixed alternatives don't really address the needs  
>> of the
>> author. (Your blog would be a great start to look for such cases.)
> HTML has always stood out amongst marked up document formats in  
> having a
> very restricted content model for paragraphs that doesn't allow block
> level markup. I always viewed div as "p with a fixed content model"
> (which isn't really the intention of div, but a very plausible way of
> using it.)

I don't think that its correct to allow paragraphs to have just any  
block level elements (what is the meaning of a paragraph within a  
paragraph?). I think, rather, that it might be worth creating a third  
categorization of elements, ones that are both block and inline  
elements, perhaps with marginally different semantics in each case.

> docbook, TEI, the W3C's xmlspec markup all allow block level markup in
> paragraphs, as does (La)TeX.
> Consider the following two paragraphs:
> The subject of this paragraph is the equation
>  E=mc^2
> where c denotes the speed of light.

This is a faulty example as you have confused rendering with  
semantics. I found the following markup at http://www.w3.org/Math/XSL/pmathml2.xml

<p xmlns="http://www.w3.org/1999/xhtml">some text, some text,
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
       <mml:mfenced open="[" close="]">
       <mml:mfenced open="{" close="}">
  some text.</p>

So, using semantics which are not defined in HTML (like MathML) solves  
your problem adequately.

> I have a list of three things
> 1, the first thing,
> 2, the second thing and
> 3, the third thing.
> This list is not very interesting.

IANAET (I Am Not An English Teacher) but, is this even grammatically  
correct? Its all well and good to want to render something that way  
but that doesn't make it a good reason to change things. I believe  
that its just as meaningful (and closer to what I remember learning)  
to write:

	I have a list of three things: the first thing, the second thing and  
the third thing. This is not a very interesting list.

Regardless, its worth indicating that something is a list, so the  
markup would probably be:

	<p> I have a list of three things: <ol><li>the first thing</li>  
<li>the second thing</li> <li>the third thing</li></ol>. This is not a  
very interesting list</p>

where the commas and the "and" are inserted using CSS (as they are not  
really part of the items themselves but separators). Its the same  
reasoning why you would have <q>My quote</q> and not <q>"My quote"</q>  
or "<q>My Quote</q>". However, if you feel that the source should  
include these characters then the correct markup should be:

	<p> I have a list of three things: <ol><li>the first thing</li>,  
<li>the second thing</li> and <li>the third thing</li></ol>. This is  
not a very interesting list</p>

This is why there would need to be one set of rules for lists as block  
elements and one set for lists as inline elements.

> In the first case the paragraph consists of a single sentence: the
> "where..." is not a new paragraph it doesn't want to be marked up as
> <p class="no-indentation">..
> It is just the end of the sentence and the end of the paragraph, so
> should be  in the same block as the start of the sentence:
> <p>The subject...
> The second case with a list is similar, although there at least the  
> text
> following the list is a different sentence.
> Apart from forcing the users to mark up the text in a way that is at
> variance with the intended meaning (you can't have a sentence that  
> spans
> two paragraphs, even if that sentence contains a quotation that itself
> has block structure) this restricted content model causes many  
> problems
> when mapping from other markup languages to HTML  (If html p is used  
> to
> model paragraphs.

Again, I think that the idea of having a sentence that includes a  
multi paragraph quote is not something that makes for correct grammar.  
Someone who is a grammar expert should weigh in on this because I  
don't think that we need to support grammatically incorrect semantics.  
Specifically we need to know more about grammar rules in multiple  

I'm not saying that there aren't elements that are defined as block  
elements that shouldn't be allowed, for example, in paragraphs. I just  
don't think that if we're going to do it we need to be picky about  
what things we want to allow and why. "I want to render something this  
way," is not a justification. We should be saying, "the meaning of  
this requires a list" or something simiilar.
Received on Wednesday, 12 December 2007 17:45:00 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:29 UTC