#595 In the example the default transformation TEI to HTML5 automatically generates headings even with "autoHead=false"

AMBER
closed
None
5(default)
2013-11-01
2013-08-18
No

According to the description of "tei-param.xsl" it should be possible to switch off the automatic generation of headings. This does not work for the provided example.

4 Attachments

Discussion

  • Dr. Eberhard von Kitzing

    P.S.: the example was run by the git master version 5008e39c5501ba202d99e493997a75992f1b662a dated 2013-08-09 23:49

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-08-31
    • status: open --> closed-fixed
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-08-31
    • assigned_to: Sebastian Rahtz
     
  • Dr. Eberhard von Kitzing

    Although an artificial heading is not created, nevertheless a heading number with no header is still added to the HTML and displayed: <div class="letter" id="index.xml-body.1_div.1_div.1"><h2><span class="headingNumber">1.1. </span></h2>. This number is useless and should not appear.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-09-08
    • status: closed-fixed --> open-accepted
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-09-08

    I am not entirely convinced. The idea in the stylesheets that the <div> hierarchy determines the numbering is rather well embedded. I could suppress the display of the number for these <div>s, but they would still be taken account of in the numbering. You could just turn off numbering, of course, and limit the depth to which numbering is done, to achieve the desired effect.

     
  • Dr. Eberhard von Kitzing

    I have no problems to fix this problem for my purpose, because I post-process the resulting HTML in any case. Therefore, I could easily skip headings containing only a heading number.

    But I would expect that adding a heading in the HTML which has no counterpart in the TEI XML and which, therefore, has no text, is not what a general user of TEI would expect. In most cases, those headings would disturb the output.

    Therefore, I have no problem if you decide to leave it as it is. But I found this behaviour rather rather unexpected.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-09-08

    but if you do any auto-generation of section numbers at all, it has to use the <div>, structure right? do you think it should simply skip sections which have no <head>?

     
  • Dr. Eberhard von Kitzing

    I don't think that the section number is the problem. A <div> with no <head> or similar structure in TEI XML should get no heading in HTML. Whether such an element should increase the section number might be discussed in a wider audience.

    However, your hint to set numberHeadings to false also removed the number from the HTML. Thank you for the tip. Therefore, I suggest to close the ticket again.

     
  • Lou Burnard

    Lou Burnard - 2013-09-08

    I think special casing <div>s with no child <head>' would be a very bad idea. If you want to make them invisible, use the @type attribute to indicate that they have some special status rather than relying on the absence of a child element, especially one which has content that might well be plausibly auito generated (e.g. as concat({@type},<xsl:number/>) vel sim.

     
    • Dr. Eberhard von Kitzing

      In the examples for letters with an <opener> in the TEI documentation I find several examples of a <div> element with no child <head> element. In my special case I use <div> to separate the letter text from the <opener> and the <closer>. Such structural elements help to process XML files.

       
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-09-08

    On 8 Sep 2013, at 21:43, "Dr. Eberhard von Kitzing" vkitzing@users.sf.net
    wrote:

    In the examples for letters with an <opener> in the TEI documentation I find several examples of a

    element with no child <head> element. In my special case I use
    to separate the letter text from the <opener> and the <closer>. Such structural elements help to process XML files.

    i am entirely happy with the idea of

    elements with no <head>; some of the examples have <opener> with <dateline>, which
    plainly acts as the equivalent. I just don't know how to process them in a generic way. Specifically, I don't know what to
    put in a table of contents, when it is generated from the
    structure.

    I'll keep trying

    Sebastian Rahtz
    Director (Research) of Academic IT
    University of Oxford IT Services
    13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-01
    • status: open-accepted --> closed
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-01

    I am closing this one. I dont think there is a right answer in general....

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks