This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Using "role" attribute in Chunked Section Titles andSubTitles
- From: martin dot gautier at myrnham dot co dot uk
- To: docbook-apps at lists dot oasis-open dot org
- Date: Sun, 4 Jul 2004 20:22:23 +0100
- 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
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.