OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Header


Hi,
I'd like to suggest one improvement to your breadcrumbs customization. The 
chunk-filename mode won't always produce a valid href if dbhtml dir 
processing instructions are used.  I would suggest the template named 
href.target, which will always find the link between two output nodes:

      <xsl:attribute name="href">
        <xsl:call-template name="href.target">
          <xsl:with-param name="object" select="."/>
          <xsl:with-param name="context" select="$current.node"/>
        </xsl:call-template>
      </xsl:attribute>

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Thomas Schraitle" <tom_schr@web.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, December 31, 2006 7:38 AM
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> &#187; </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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]