OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] customizing section titles

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

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

----- Original Message ----- 
From: "Stefan Seefeld" <stefan@seefeld.name>
To: "DocBook Apps Mailing List" <docbook-apps@lists.oasis-open.org>
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: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]