corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franz de Copenhague <>
Subject RE: Header level > 6
Date Mon, 22 Jun 2015 18:10:34 GMT

> Date: Mon, 22 Jun 2015 19:09:41 +0200
> Subject: Re: Header level > 6
> From:
> To:
> On 22 June 2015 at 18:53, Peter Kelly <> wrote:
> > My first instinct on hearing “heading level 7” is that perhaps the author
> > of such a document should reconsider their structure ;) I never go more
> > than three for normal documents. The designers HTML assumed 6 would be
> > enough, but Word allows up to 9 levels.
> >
> > Having >6 levels can be handy for outlining (in particular Word’s “outline
> > view” mode), and in that instance I can see it would be useful.
> >
> > Regardless of it’s merits or otherwise, I think we should support this,
> > but it will complicate things somewhat given that the existing logic
> > generally assumes only six levels. Any levels above that, in the Word
> > filter at least, are simply given their style name but otherwise considered
> > normal paragraphs.
> >
> > Having a <div style=“corinthia-level-X”> is a good first approach (and
> > suggest using the corinthia- prefix in places where we have our own special
> > behaviour; currently the prefix is uxwrite- in many places but that should
> > be changed). However, it’s possible in Word to have multiple heading styles
> > at the same outline level - for 1-6 this is fine, because we just give the
> > style name and can express the outline level in HTML based on the tag
> > number (h1 through h6). When we go to having <div> or <p> elements with
> > style name, there is no way to express the outline level as part of that,
> > at least none that is immediately obvious to me. I’m not sure what the best
> > solution here is for handling arbitrary depths.
> >
> > In theory we may also have file formats which support more than 9 outline
> > levels (not sure what ODF’s limit is, but it may be possible with other
> > formats). In that case we need to figure out how that would be expressed in
> > terms of a Word document.
> >
> > Another possible solution is to just use h6 for every header of level
> > greater than 6. While this “loses” information in the resulting HTML, I
> > view it as a reasonable compromise in the sense that it fits within the
> > semantics of HTML, and due to the use of bidirectional transformations, the
> > heading level could remain the same (that is, 7 or greater) during update
> > if the level has not been changed to < 6 during editing.
> >
> but if we convert from OOXML to ODF this way we loose information. It is no
> fun when the intermediary (in this case HTML) imposes the restrictions.
> I do not recommend to flatten the level at the height of H6.
> rgds
> jan i.

In ODT the outline is up to "Level 10", and DOCX is up to "Level 9". 
We are missing that any single paragraph with any style assigned, different to Heading 1,2,
3, can have the outline level property set.  I have attached 2 examples, that can illustrates
what I am saying. For example, in case of DOCX, The current GET conversion to HTML for the
paragraph with Strong style is:
<p class="Normal" id="word253">      <span class="Strong" id="word259">This is
a paragraph Strong with outline level 2</span> </p>In this link you can GET the
complete HTML generated for the DOCX example.

In this case, the outline level information doesn't appear in the converted HTML and certainly,
it will be lost in the PUT. 
So, we need to find the way to keep Strong style and outline level information. One possibility
could be:
<p class="Strong" id="word253" style="corinthia-outline-level:2">      <span id="word259">This
is a paragraph Strong with outline level 2</span> </p>
<p class="Strong" id="word253" data-corinthia-outline-level=2">      <span id="word259">This
is a paragraph Strong with outline level 2</span> </p>

View raw message