[whatwg] WA1 - The Section Header Problem

On Nov 18, 2004, at 17:06, Matthew Raymond wrote:
> Henri Sivonen wrote:
>> On Nov 17, 2004, at 20:13, Matthew Raymond wrote:
>>> a outline based on semantic document structure would yield #1, 
>>> whereas an outline based on importance would yield #2
>> Doesn't look good.
>    Could you be more specific?

You can come up with two different outlines for the same markup. 
Therefore, the suggested markup is inherently ambiguous and the 
inherent ambiguity needs to be explicitly disambiguated in the spec. 
Starting with something that is inherently ambiguous and needs some 
significant disambiguation prose and examples is a bad idea, IMO.

>> How should a CMS combine documents some of which used <h1>...<h6> and 
>> others <h> & <section>?
>    The header elements (<h>, <h1>-<h6>) contain header information and 
> importance. The <section> element establishes semantic document 
> structure. They can be combined directly.


Let's suppose I have this document template that contains a top-level 
heading "Blog Posts". Then I have two documents. One has a top-level 
heading "Post 1" and the other has a top-level heading "Post 2". Post 1 
has subheadings a and b and post 2 has subheadings A and B.

Now let's suppose the template and post 1 use the h-section scheme but 
post 2 was written using a legacy editor and uses h1 and h2.

What should the CMS do in order to include the posts in the template in 
such a way that the outline would be
Blog Posts
    Post 1
    Post 2

"Post 1" and "Post 2" should have the same style. "a", "b", "A" and "B" 
should all have the same style. What would the CSS selectors look like?

> It's only a question of whether the user agent vendors choose to use 
> the importance level to add further structure to the outline. Here's 
> an example:
> | <h1>Heading 1</h1>
> | <h3>Heading 2</h3>
>    This markup can be easily rewritten

The word "easily" makes me suspicious--at least until I see the your 
easy DOM heading rewriting code.

> using <section> elements to add semantic structure:

Why does "semantic structure" need to be added? Doesn't h1...h6 form a 
"semantic structure"?

> | <section><h>Heading 1</h>
> |  <section><h3>Heading 2</h3></section>

Why not

<section><h>Heading 1</h><!-- first level -->
   <section><!-- second level but there was no h2 -->
     <section><h>Heading 2</h></section><!-- third level -->

Henri Sivonen
hsivonen at iki.fi

Received on Thursday, 18 November 2004 14:30:17 UTC