Hi,
In the HTML stylesheet, he 'section' parameter is set in the template named 'section.title' in html/sections.xsl, where the context node is the section's title element. It computes the section parent using this variable:

 <xsl:variable name="section" select="(ancestor::section
                                       |ancestor::simplesect
                                       |ancestor::sect1
                                       |ancestor::sect2
                                       |ancestor::sect3
                                       |ancestor::sect4
                                       |ancestor::sect5)[last()]"/>

The 'section.heading' template in fo/sections.xsl also has the section title as the context element, so you could copy the same selection in your customization to establish the section variable there.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Stefan Seefeld" <[email protected]>
To: "DocBook Apps Mailing List" <[email protected]>
Sent: Monday, May 09, 2011 5:58 AM
Subject: [docbook-apps] customizing section titles


Hello,

I'd like to customize the section title formatting for HTML and PDF. I think I have found a good solution for HTML, where I customize the 'section.heading' template to generate the desired content. However, trying to do the same with the FO stylesheets doesn't work:

I use a "titleabbrev" element for formal section names, and would like the title line to look like this:

1.2.3 The section title            [section.name]

(with the [...] content coming from the titleabbrev). However, while the HTML stylesheet passes the $section variable down to the 'section.heading' template, the FO stylesheet does not, so I can't access the 'titleabbrev' content there (or any other context info, for that matter.)

Any ideas how I could approach this ? Or is there an entirely different approach ? (I figure there must be other authors who have written formal specifications in DocBook where such section headings are common.)

Thanks,
        Stefan

--

      ...ich hab' noch einen Koffer in Berlin...


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to