W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Re: Outline algorithm

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 17 Jun 2008 22:43:15 +0000 (UTC)
To: James Graham <jg307@cam.ac.uk>
Cc: "public-html@w3.org Tracking WG" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0806172214090.17498@hixie.dreamhostps.com>

On Thu, 6 Mar 2008, James Graham wrote:
> 
> The section that starts
> 
> Otherwise, if the element being entered has a rank equal to or greater 
> than the heading of the current section, then create a new section and 
> append it to the outline of the current outlinee element
> 
> Doesn't seem to work well for documents like <h1><h2><h3><h2>; the last 
> <h2> becomes a sibling of the <h1> (which is the last section of the 
> current outline element).
>
> [...]
> 
> I'm also slightly confused about the next section down, which starts 
> "Otherwise, run these substeps". This seems to be invoked only if the 
> rank of the element is less than the rank of current section's heading, 
> so the step that starts "If the element being entered has a rank lower 
> than the rank of the heading of the candidate section" will always be 
> true on the first iteration.

Fixed. The first "otherwise" section was too aggressive, which, as you 
point out, prevented the second "otherwise" clause from affecting the 
bits it was supposed to.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 17 June 2008 22:44:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:18 GMT