Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
On Mon, 26 Mar 2012, Hugh Guiney wrote: I am confused by the current definition of outline depth ( http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#outline-depth), which, if I understand it correctly, states that the depth resets with each sub-outline. So, in the following: body h1Document Title/h1 section h2Section Title/h2 section h3Subsection Title/h3 /section /section /body �each heading would have an outline depth of 1, yet for: body h1Document Title/h1 h2Section Title/h2 h3Subsection Title/h3 /body �which is, according to the spec, semantically identical to the previous example, each heading would instead have an outline depth of 1, 2, and 3 respectively. At least, that is how this implementation ( https://github.com/hoyois/html5outliner) behaves; I raised this issue with the implementor and he seems to think it is the correct behavior�if so, why? Wouldn't it make more sense to have the depths be 1, 2, and 3, whether explicit sections are used or not? The spec was indeed confusing here. I've clarified the definition of outline depth to make it say that it is the depth in the _outermost_ outline that matters (since the h3 element above is really in three outlines -- that of the body, and that of each section -- but the depth that matters is just that of the body). HTH, -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
[whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
I am confused by the current definition of outline depth ( http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#outline-depth), which, if I understand it correctly, states that the depth resets with each sub-outline. So, in the following: body h1Document Title/h1 section h2Section Title/h2 section h3Subsection Title/h3 /section /section /body …each heading would have an outline depth of 1, yet for: body h1Document Title/h1 h2Section Title/h2 h3Subsection Title/h3 /body …which is, according to the spec, semantically identical to the previous example, each heading would instead have an outline depth of 1, 2, and 3 respectively. At least, that is how this implementation ( https://github.com/hoyois/html5outliner) behaves; I raised this issue with the implementor and he seems to think it is the correct behavior—if so, why? Wouldn't it make more sense to have the depths be 1, 2, and 3, whether explicit sections are used or not?
Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
On Mon, Mar 26, 2012 at 5:02 PM, Hugh Guiney hugh.gui...@gmail.com wrote: I am confused by the current definition of outline depth ( http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#outline-depth), which, if I understand it correctly, states that the depth resets with each sub-outline. So, in the following: body h1Document Title/h1 section h2Section Title/h2 section h3Subsection Title/h3 /section /section /body …each heading would have an outline depth of 1, yet for: body h1Document Title/h1 h2Section Title/h2 h3Subsection Title/h3 /body …which is, according to the spec, semantically identical to the previous example, each heading would instead have an outline depth of 1, 2, and 3 respectively. At least, that is how this implementation ( https://github.com/hoyois/html5outliner) behaves; I raised this issue with the implementor and he seems to think it is the correct behavior—if so, why? Wouldn't it make more sense to have the depths be 1, 2, and 3, whether explicit sections are used or not? I don't understand. The relevant spec text is: The outline depth of a heading content element associated with a section section is the number of sections that are ancestors of section in the outline that section finds itself in when the outlines of its Document's elements are created, plus 1. The outline depth of a heading content element not associated with a section is 1. This seems pretty clear - the outline depths of the headings in the first snippet are, respectively, 1, 2, and 3, since that's how many sections (plus 1) are the ancestors of each. The same applies to the second snippet, since the implied sections generated by the headings produce the same virtual structure as the first snippet. What text are you looking at that implies the outline depths of the headings in the first snippet are all 1? ~TJ
Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
On Mon, Mar 26, 2012 at 8:08 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: What text are you looking at that implies the outline depths of the headings in the first snippet are all 1? I could not find anything, but the person who wrote that JavaScript implementation seemed pretty convinced that this was the case (https://github.com/hoyois/html5outliner/issues/1#issuecomment-4653452). I figured that having written an implementation he had studied the relevant sections in considerably more depth than I had and second-guessed myself. Looks like it is in fact a bug in the program and not the spec. Thanks for clearing that up!
Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
On Mon, Mar 26, 2012 at 5:20 PM, Hugh Guiney hugh.gui...@gmail.com wrote: On Mon, Mar 26, 2012 at 8:08 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: What text are you looking at that implies the outline depths of the headings in the first snippet are all 1? I could not find anything, but the person who wrote that JavaScript implementation seemed pretty convinced that this was the case (https://github.com/hoyois/html5outliner/issues/1#issuecomment-4653452). I figured that having written an implementation he had studied the relevant sections in considerably more depth than I had and second-guessed myself. Looks like it is in fact a bug in the program and not the spec. Thanks for clearing that up! It's possible they'd gotten confused by the fact that the first heading in a section, no matter what rank it is, is more-or-less equivalent to a h1 as far as the outlining algorithm is concerned. ~TJ
Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?
On Mon, Mar 26, 2012 at 8:30 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: It's possible they'd gotten confused by the fact that the first heading in a section, no matter what rank it is, is more-or-less equivalent to a h1 as far as the outlining algorithm is concerned. Actually his stated reason was that the spec says the outline that s finds itself in which he interpreted as the current outlinee. Perhaps this should be rephrased to the document outline that s finds itself in, or similar, so it isn't confused as a sub-outline.