[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Header
Hi,
On Sunday 31 December 2006 15:47, Thomas Schraitle wrote:
> On Sunday 31 December 2006 14:24, Mauritz Jeanson wrote:
> > > -----Original Message-----
> > > From: Huber Evelyne
> > > I'm trying to change the header on the html. I'm aiming for
> > > something like part>chapter>section to be displayed in the
> > > header to easy navigation and show the current position. and
> > > where the words part, chapter, section are links.
> > > can anyone help me and show me how the xsl need to look like.
> >
> > You are looking for "breadcrumbs". See this page:
> > http://techwriter.dk/tools/docbook/breadcrumb.html
Sorry, I posted the wrong version, this works:
<xsl:template name="tw.generate.breadcrumb"
xmlns:d="http://docbook.org/ns/docbook">
<xsl:param name="current.node" select="."/>
<xsl:for-each select="ancestor::*">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="chunk-filename"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="title">
<xsl:value-of select="normalize-space(title)"/>
</xsl:when>
<xsl:when test="d:info/d:title">
<xsl:value-of select="normalize-space(d:info/d:title)"/>
</xsl:when>
</xsl:choose>
</xsl:element>
<xsl:text> » </xsl:text>
</xsl:for-each>
<!--
We don't want to make the current page an active link
-->
<xsl:if test="$current.node != /*">
<strong>
<xsl:choose>
<xsl:when test="title">
<xsl:value-of select="normalize-space(title)"/>
</xsl:when>
<xsl:when test="d:info/d:title">
<xsl:value-of select="normalize-space(d:info/d:title)"/>
</xsl:when>
</xsl:choose>
</strong>
</xsl:if>
</xsl:template>
Tom
--
Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]