> Date: Mon, 18 May 2015 10:21:03 +0200 > Subject: Re: headers > From: j...@apache.org > To: dev@corinthia.incubator.apache.org > > On 18 May 2015 at 01:51, Gabriela Gibson <gabriela.gib...@gmail.com> wrote: > >> Peter said about the value of the H(n) tag: >> >> " In ODF, we can’t rely on style names to determine the heading level, >> because it’s perfectly legal to call them something other than >> Heading_20_n, which is what OpenOffice seems to do by default. The >> text:h element has an outline-level attribute; this indicates the >> level of the heading. So you should get the value of the >> TEXT_OUTLINE_LEVEL attribute and use that to determine which HTML >> heading tag to use. >> " >> >> That is a solid value thoughout tho(being an enum), and does not >> help me to determine if it's H1 or H6. I can get it with >> odfNode->attrs->value for now, but it's a char* and so will take some >> ASCII value mangling TLC. It probably would be an idea to have a >> translation function for this, just for reading clarity. >> >> Regard H(n)> 6 I think it's probably better to keep it H6 >> because the user will be expecting some kind of header (which h6 >> is) and not a paragraph. In the end they'll make it a paragraph >> probably, but in the meanwhile, they did ask for something of the >> shape of >> > > Could it be you too talk in east and west....sounds a little bit like it. > > H1 - H6 are builtin style names, but most users (and office packages) use > all > kind of names for header styles. E.x. in my standard style sheet, they are > called header1 - header6. > > There is no way we can trust style names to be anything specific. But the > TEXT_OUTLINE_LEVEL is an attribute within the style (part of the style > definition) and should be used. > > If will get even more fun, with you look at style names for bullets and > numbering, > they are completely random. >
Outline level is implemented in DOCX in the same way. We can consider to implement the same logic in DOCX. I mean a regular paragraph with Outline level should be consider as H1,H2, etc > > >> >> <header> >> <their text to be headed> >> >> so I think we should give that to them, even if imperfect. >> >> Alternative ideas (to be explored later) are to press a list (of lists >> (of lists (...)) into service. (bullets? numbered?) >> >> Finally: Do we have a notifying mechanism that kicks in if we cannot >> translate from A to B? >> >> If not, should we? >> > that sounds like a good idea. in HTML 5 a <header> must contain a <H1> tag http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_header franz > > rgds > jan I. >