Thanks, Bob!
On Tue, Jul 16, 2013 at 1:11 PM, Bob Stayton <[email protected]> wrote: > ** > Hi Alan, > Article titles are handled by the template named 'component.title' in the > component.xsl stylesheet file. There is an xsl:choose statement in there > that sets the "section level", to which 1 is added to get the <h> level. > That template does not properly handle article titles, which should get a > section level of zero. But it is a short template and you can customize it. > > Bob Stayton > Sagehill Enterprises > [email protected] > > *From:* Alan Oehler <[email protected]> > *Sent:* Tuesday, July 16, 2013 11:11 AM > *To:* docbook-apps <[email protected]> > *Subject:* [docbook-apps] HTML heading tags issue with article > > I'm puzzled by some behavior I observed generating some HTML documents. > The source files are articles. The article section titles seem to be coming > out as I would expect - sect1 title is tagged as an h2, sect2 as an h3, > etc. But the article's title itself, which the documentation clearly says > should be output as an h1, is coming out as an h2. Looking at the file > html/titlepage.xsl, it clearly is inserting an h1. > > I had a custom spec file which doesn't do much except not show some of the > things that are usually output by default: > <t:titlepage t:element="article" t:wrapper="div" class="titlepage"> > <t:titlepage-content t:side="recto"> > <title/> > <subtitle/> > </t:titlepage-content> > ... > > I merely removed the usual set of elements inside the t:titlepage-content > element, leaving just the title and subtitle, then generated my titlepage > XSL from it. > > My grasp of XSLT is tenuous at best, and the complexity of the cover page > customization is such that my head is swimming trying to see where the h2 > is coming from. > > Here's what the rendered article title looks like in the output. (It also > strikes me as odd that there are so many divs in there...) > ... > <body> > <div class="article" id="idp8939920"> > <div class="titlepage"> > <div> > <div> > <h2 class="title">My article title</h2> > </div> > </div> > </div> > ... > > Any hints about how I can attack this - other than do something kludgey > like give the article title a role attribute like, say,"realtitle" and use > CSS to style a h2 of class"realtitle" to be a bit bigger? > > Thanks! > > -- > Alan C. Oehler > Senior Technical Writer | Instart Logic > M: 650.504.7003 > www.instartlogic.com > -- Alan C. Oehler Senior Technical Writer | Instart Logic M: 650.504.7003 www.instartlogic.com
