[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Title with subtitle as olink generated text
|
Hi,
This is actually pretty easy. The olink mechanism shares many templates with the xref
system. The text that is generated for either link is generated by using
apply-templates mode="xref-to". By using a mode, different templates can
be applied to each target element type. So to add a subtitle for your
books, you could add this to your customization layer:
<xsl:template match="book"
mode="xref-to">
<xsl:param name="referrer"/> <xsl:param name="xrefstyle"/> <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="."
mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/> <xsl:with-param name="xrefstyle" select="$xrefstyle"/> <xsl:with-param name="referrer" select="$referrer"/> <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> <xsl:text> </xsl:text> <xsl:apply-templates select="." mode="object.subtitle.markup"/> </xsl:template>
I just copied the original from fo/xref.xsl and
added two lines for a space separator and subtitle processing. When you
generate your target.db file, you should see in the <xreftext> element for
book both the title and subtitle.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]