Re: Subheadings desired in XHTML 2.0

At 18:50 2002-11-06 -0500, Etan Wexler wrote:
>How does XHTML 2.0 deal with subheadings?  How should XHTML deal with 
>subheadings?

By nesting heading/section.

>Do subheadings need a distinct element type?  Should subheadings be 
>children of headings rather than siblings of headings?

They should be children of sections, and nephews(?) of headings.

>Given an article with the main heading "Foo" and with the subheading 
>"Bar", given the possibility of an element type 'sh' for subheadings, and 
>assuming that the examples are valid, which of the following document 
>fragments is most appropriate?  Why is that?

None, really. You need a section element to differentiate the heading level.

><!-- begin 1 -->
><h>Foo
>    <sh>Bar</sh></h>
>
><!-- begin 2 -->
><h>Foo
>    <h>Bar</h></h>
>
><!-- begin 3 -->
><h>Foo</h>
><sh>Bar</sh>
>
><!-- begin 4 -->
><h>Foo</h>
><h>Bar</h>

IMO, the correct way to do this should be the same as for multilevel 
headings, as follows:
   <section>
     <h>
       Main heading
     </h>
     <section>
       <h>
         Subheading
       </h>
       <p>
         Content
       </p>
     </section>
   </section>


The top section element can be left out, though, since other elements (eg 
body, div) provide their containing block.

The reason I think this is the way of including subheadings, is that I 
think a subheading is really just a lower-level separate heading. It's 
semantically equivalent of a nested heading directly following the 
higher-level heading.

// Liorean

Received on Saturday, 9 November 2002 16:24:58 UTC