[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Using "role" attribute in Chunked Section Titles andSubTitles
Phil
Avoiding the debate over the fact that you probably don't want to put your
text inside a <section> if it naturally doesn't have a title to go with
it... (I'm sometimes in the same boat as you where I want to use <section>
to keep my content modular)...
If you use FOP to process your FO and produce a PDF containing bookmarks,
you can edit ../fo/fop.xsl to get what you want.
By wrapping an <xsl:if> statement around the main <xsl:choose> statement
you can skip those blank titles...
eg:
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="bookmark-label">
<xsl:apply-templates select="." mode="object.title.markup"/>
</xsl:variable>
<!-- Put the root element bookmark at the same level as its children -->
<!-- If the object is a set or book, generate a bookmark for the toc -->
<xsl:if test="$bookmark-label != ''">
<xsl:choose>
...
</xsl:choose>
</xsl:if>
</xsl:template>
Works for me anyway...
Mart
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]