This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Re: [docbook] How can I add another chunk navigation link?
- From: Sheldon Plankton <sheldonplankton at yahoo dot com>
- To: Bob Stayton <bobs at sagehill dot net>, DocBook Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 24 Aug 2004 12:57:51 -0700 (PDT)
- Subject: Re: [docbook-apps] Re: [docbook] How can I add another chunk navigation link?
Thanks Bob and Paul!
That's what I was looking for. I have no problem
getting a link in the "user.footer.navigation"
template. I have this in my local stylesheet ...
<xsl:template name="user.footer.navigation">
<BR/>
<a>
<xsl:attribute name="href">
<xsl:call-template name="pdfdoc_link"/>
</xsl:attribute>
PDF</a><BR/>
</xsl:template>
... but now I want to have the link appear in the
"Chunk Navigation" ... you know something that
produces this HTML ...
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"> <a
accesskey="p" href="index.html"><img
src="../images/prev.gif" alt="Prev"></a> </td>
<td width="20%" align="center"><a
accesskey="u" href="index.html"><img
src="../images/up.gif" alt="Up"></a></td>
<td width="40%" align="right"> <a
accesskey="n" href="ar01s03.html"><img
src="../images/next.gif" alt="Next"></a></td>
</tr>
<tr>
<td width="40%" align="left"
valign="top">Tripwire Configure on RH9 </td>
<td width="20%" align="center">
<a accesskey="h"
href="index.html"><img src="../images/home.gif"
alt="Home"></a><BR>
<FONT SIZE=-2>
[<a
href='ar01s02.ps/'>PS</a>]
[<a
href='ar01s02.pdf'>PDF</a>]
[<a
href='ar01s02.rtf'>RTF</a>]
</FONT>
</td>
<td width="40%" align="right"
valign="top"> References</td>
</tr>
</table>
</div>
... I hope I am not asking for too much. But I am
afraid I am in over my head. I think that I'll have
to
rewrite the template "footer.navigation" and
"header.nagivation" in chunk-common.xsl. I was just
hoping for an easier solution :)
--- Bob Stayton <bobs@sagehill.net> wrote:
> [I'm moving this over to docbook-apps since it deals
> with stylesheets]
>
> One way to do what you want is to put the call to
> 'href.target' inside a
> variable, then use substring-before() to clip off
> the '.html', and then
> append the '.pdf'. This assumes the PDF is always
> in the same place as the
> HTML, of course.
>
> <xsl:variable name="href.orig">
> <xsl:call-template name="href.target">
> <xsl:with-param name="object" select="."/>
> </xsl:call-template>
> </xsl:variable>
>
> <xsl:value-of select="substring-before($href.orig,
> '.html')"/>
> <xsl:text>.pdf</xsl:text>
>
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "Sheldon Plankton" <sheldonplankton@yahoo.com>
> To: <docbook@lists.oasis-open.org>
> Sent: Monday, August 23, 2004 1:14 PM
> Subject: [docbook] How can I add another chunk
> navigation link?
>
>
> > I would like to add one more link to the chunk
> > navigation. This link
> > would link to a PDF version of the current page.
> > Here's what I have
> > in my local stylesheet
> >
> > <?xml version='1.0'?>
> > <xsl:stylesheet
> >
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > version="1.0">
> >
> > <xsl:import
> >
>
href="/usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl"/>
> >
> >
> >
> >
> > ...
> > <xsl:template name="user.footer.navigation">
> > <a accesskey="n">
> > <xsl:attribute name="href">
> > <xsl:call-template
> > name="href.target">
> > <xsl:with-param
> name="object"
> > select="."/>
> > </xsl:call-template>
> > </xsl:attribute>
> > <xsl:call-template
> > name="navig.content">
> > <xsl:with-param
> name="direction"
> > select="'PDF'"/>
> > </xsl:call-template>
> > </a><BR/>
> > </xsl:template>
> >
> >
> >
> >
> > </xsl:stylesheet>
> >
> > This results in this HTML ...
> >
> > <a accesskey="n" href="index.html"><img
> > src="../images/PDF.gif" alt="xxx">
> >
> > ... which is fine expect that I can't figure out
> how
> > to get the HTML to look like this ...
> >
> > <a accesskey="n" href="index.pdf"><img
> > src="../images/PDF.gif" alt="xxx">
> >
> > Thanks!
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> >
> >
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail