Re: Proposed Feature for Future Work: <toc> Element

On Tue, 4 Sep 2007, David Woolley wrote:

> Lachlan Hunt wrote:
>> David Woolley wrote:
>> 
>> Could you elaborate on that?  What additional control would be needed and 
>> why?
>
> Hopefully none, but given things like table based layout, I think it is quite 
> likely that headings could come out in an illogical order (as this is the 
> result of styling, albeit not using style sheets, one could argue that it 
> should be fixed by styling the ToC).  There might also be weird cases - maybe 
> when one is giving examples of heading elements, although arguably they 
> should be block quoted.

Obviously, things inside a blockquote element (or something with similar 
defined semantics) should be exempted from much of the normal processing 
that could be based on element semantics. Nothing like this happens today 
(except perhaps in rendering via style sheets of course), and I don't 
expect it to happen, since in most situations, <blockquote> really means 
<indent>. That is, this is what the author or the authoring software has 
meant.

Even if <blockquote> were used correctly, it would not solve the problem 
of giving examples, which is a rare but not contrived case. If I wrote a 
document about using headings (actually, I have written many of them), I 
typically present examples that I invented, though often imitating 
reality. I am not quoting them from any source; they might appear for the 
first time in history in my document. So <blockquote> would be 
semantically wrong. This, together with many similar considerations, 
constitutes a case for <example> or <ex>, but I digress.

If we think about the ways that tables of content are regularly produced 
by software capable of doing such things, the basic control is by setting 
the levels of headings that will be included and by the visual appearance 
of the toc. These are styling issues. But there are other aspects, which 
might be handled by special marking of the headings or by manual editing 
of the generated toc, and _these_ might have counterparts in HTML markup, 
like

<h2 abbr="Text of the heading for use in the toc, typically
shorter than the actual heading">

(and abbr="" might be defined to mean that this element shall be excluded 
from the table of content)

and perhaps an attribute, applicable to all elements allowed inside the 
body, that specifies that the element be included into a table of content. 
After all, authors may wish to include elements other than headings, such 
as tables and figures into a toc.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 4 September 2007 07:06:33 UTC