W3C home > Mailing lists > Public > www-html@w3.org > March 2001

Re: XHTML 2.0 -- A Chance to Improve Document Structure?

From: Dave Hodder <dmh@dmh.org.uk>
Date: Sun, 25 Mar 2001 14:01:41 +0000
To: www-html@w3.org
Message-ID: <20010325140141.A198@dmh.org.uk>
On Sun, Mar 25, 2001 at 04:24:31AM -0600, Frank Tobin wrote:
> Mjumbe Ukweli, at 20:58 -0500 on Sat, 24 Mar 2001, wrote:
> 
>     i just realised, however, that simplifying heading structure to nested
>     <sect> tags would make it a pain for developers reading the code to find out
>     at what level a tag is, especially in documents with a bajillion sections
>     (like a W3C REC).
> 
> IMO, this is a good thing, not a bad thing.  The writer shouldn't care
> what level the current text is at, but rather it is just a sub-section of
> the current level.  This allows for documents to be more neatly cut and
> paste into each other, since currently <hx> tags would have to be
> re-numbered to account for the parenting section. Sorta like lexical
> scoping, blockwise.  You don't care how deep your blocks are; you just
> care that the variable is local to the current level of nesting.

It's worth pointing out that DocBook supports both methods; the
<section> element was introduced with DocBook V3.1.  Whilst I think
supporting both within XHTML would be superfluous, either IMHO would do
a good job.

Here's a DocBook example using <sectN>:

    <sect1>
      <title>Some Heading</title>
      <sect2>
        <title>Some Subheading</title>
      </sect2>
    </sect1>

And again using recursive <section>s:

    <section>
      <title>Some Heading</title>
      <section>
        <title>Some Subheading</title>
      </section>
    </section>

In order to add free-floating section titles without a containing
section, DocBook supports something called a BridgeHead:

    <bridgehead renderas="sect2">Not a real sect2</bridgehead>

> Implementing a <section> element is better than <div> since <section> has
> semantic meaning (we should keep <div> as bland as possible, I think).

Agreed.

> In accordance with <section> we would allow the child-elements such as
> <secction-title> or whatever.

I think it would be best to expand the use of the XHTML <title> element,
whilst preserving it's use within the <head> element.

I'll now shut up about DocBook for a bit.  ;o)

Dave
Received on Sunday, 25 March 2001 08:02:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:45 GMT