Re: "Outline" algorithm

On Mon, 25 May 2009, Larry Masinter wrote:
>
> I picked another page of the HTML spec at random to investigate the 
> question
> 
> Next pick was across Secton 4.1.11.1 "Creating an outline"
> 
> which contains a lengthy description of an algorithm for computing an 
> "outline".  Now, is there any precedent, common practice, or "cowpath" 
> for outlines?

Outlines are very commonly used in word processing. I'm not sure what it 
would mean for there to be a cowpath for outlines, per se.


> Is there any reason why authors would care exactly about the computation 
> of the "outline"?

HTML4 is very vague about the semantics of headers, this section is just 
trying to define what the semantics of HTML5's heading elements are, in 
precise detail to avoid ambiguity about, e.g., which heading applies to 
which element.

The use of the "outline" concept to define this is mostly an artefact of 
needing a term to define the model; it could probably be done more 
implicitly (just defining the relationship of elements to headings 
recursively).


> If a browser wants to implement an "outline" algorithm, why would they 
> use this one?

It's somewhat important that there be an unambiguous definition of what 
outline an outlining algorithm would result in -- I mean, you wouldn't 
want two outlining algorithms to disagree on what the headings in a 
document are, for instance.

As with all algorithms in the spec though, and as noted in the conformance 
section, implementations can use whatever black-box implementation they 
want so long as it results in the same output.


> So the whole section doesn't seem to make a lot of sense. A lot of 
> normative requirements for a complex implementation for computing an 
> outline with no applications?

The important part here is the definition of what headings apply to each 
node in the DOM. I would be happy to redefine this in more declarative 
terms if someone can come up with a formulation that has the same result 
but without using an algorithm. I couldn't work out how to do it, which 
is why I ended up with the algorithm instead.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 26 May 2009 05:31:02 UTC