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] page-specific footer for chunked output

----- Original Message ----- 
From: "Sam Steingold" <sds@gnu.org>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, February 02, 2005 1:32 PM
Subject: [docbook-apps] page-specific footer for chunked output

> I have a customization layer for chunked output:
> <xsl:import href="/usr/share/docbook-xsl/xhtml/chunk.xsl"/>
> <xsl:param name="chunk.first.sections" select="1"/>
> and I want each output html page to have a footer, so I have a
> <xsl:template name="user.footer.content">.
> 1. I want the same text in each output html page, which is based on the
>    bookinfo element in the XML source file. specifically, I have
> <xsl:template name="user.footer.content">
>  ...
>  <xsl:if test="bookinfo"><div class="bookinfo">
>    <hr width="100%"/><table width="100%">
>     <th><td align="left"><xsl:value-of select="bookinfo/subtitle"/></td>
>      <td align="right"><xsl:value-of select="bookinfo/date"/></td></th>
>  </table></div></xsl:if>
>  ....
> </xsl:template>
>    this does not work: this footer is never output - except for the TOC
>    page (whose source contains the bookinfo element).
>    what am I doing wrong?

Your "bookinfo/subtitle" path is taken relative to the current context node,
which is the current chunk being processed.  That should probably be

> 2. I want a text specific to the output html page in the footer.
>    E.g., a "<section id='foo'>...." will be turned into a file named
>    foo.html and I want it (foo.html) to contain this:
> <img src="......./?foo?..." .../>
>    how do I do that?

In user.footer.content, you should be able to use something like this:

  <xsl:attribute name="src">
    <xsl:value-of select="@id"/>

> 3. The index page is named "impnotes-top.html" because that's the ID
>    attribute of the <book> element is "impnotes-top".
>    All the standard navigation footers refer to it as "index.html":
>    first, as
> <link rel="start" href="index.html" title="Implementation Notes for GNU
CLISP." />
>    in <head> and then as
> <a accesskey="h" href="index.html">Home</a>
>    in the body footer.
>    why?

Normally the index page is named "index.html" if book is the root element.
The template named "recursive-chunk-filename" in chunk-common.xsl selects
the filename.  It can be changed with a dbhtml filename processing
instruction, or by changing the value of the root.filename parameter whose
default value is "index".   But if book is the root element, it should not
get the id value.  Is the book inside a set, by any chance?  If not, I
wonder how the file is being named for the id.

The template that generates the chunk file and the template that generates
the link to it should both use the same recursive-chunk-filename template to
get the name.  Is there some customization of chunk file naming being used?
Do you get the same results with the stock DocBook html stylesheet?

Bob Stayton
Sagehill Enterprises
DocBook Consulting

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