This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] refentry section headings
- From: Brian McGurk <brian at corvil dot com>
- To: Bob Stayton <bobs at sco dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 05 Nov 2003 11:00:01 +0000
- Subject: Re: [docbook-apps] refentry section headings
>For example, if a refentry appears inside a sect1,
>then its NAME title should be format as section
>level 2, and any refsect1 should format as section
>level 3, etc. Does that sound right?
That's exactly what I would have expected/wanted. The problem applies
not just to the refsect* elements but also refnamediv and
refsynopsisdiv. It's present for the html transformation too (it
applies <h2> unconditionally), but it was esay to find what ot
override in that case.
For a work-around, it it possible, in fo/refentry.xsl, to use the
section.level template to find the level of the refentry's parent
element and add that to the level of the refentry/refsect1; something
like:
-----------------------------------------------------------------------
<xsl:template match="refsynopsisdiv/title
|refsection/title
|refsect1/title
|refsect2/title
|refsect3/title"
mode="titlepage.mode"
priority="2">
<!-- stuff -->
<xsl:variable name="parentlevel">
<xsl:call-template name="section.level">
<xsl:with-param name="node.PARENT????" select="$section"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="section.heading">
<xsl:with-param name="level" select="{$level + $parentlevel}"/>
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<!-- stuff -->
-----------------------------------------------------------------------
Brian McGurk
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.