This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] About different graphical headers on pages
- From: Costin Stroie <costinstroie at yahoo dot co dot uk>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 12 Apr 2005 00:12:57 +0300 (EEST)
- Subject: [docbook-apps] About different graphical headers on pages
- Reply-to: Costin Stroie <costinstroie at yahoo dot co dot uk>
I'm in charge of writing an User Guide for a commercial product and I
choose DocBook to write it. Most of the customization was made starting
from the book "DocBook XSL: The Complete Guide", which is wonderful. I've
learned how to put graphical headers on pages, but I have a problem I
cannot solve.
How can I put graphical headers different for each part or chapter? The
image will contain the part or chapter name and number over some artwork.
Therefore these graphics have to change from part to part (or chapter).
I think one solution is to watch for the part number in the customization
layer and use a different graphic file as external resource. But how can I
find the part number?
Another idea would be to use processing instructions inserted in each
partinfo or chapterinfo pointing to some file and to use this attribute as
variable in the customization layer. I have tried it and no results.
The PI would be:
<?dbfo headerimg="'../images/graphics/header_odd_p1.png'"?>
And the xsl code is:
<xsl:variable name="header.image.odd">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis"
select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'headerimg'"/>
</xsl:call-template>
</xsl:variable>
And so, the variable is header.image.odd but when I tried to use it as:
<fo:external-graphic content-height="15mm" text-align="center">
<xsl:attribute name="src">
<xsl:call-template name="fo-external-image">
<xsl:with-param name="filename" select="$header.image.odd"/>
</xsl:call-template>
</xsl:attribute>
<fo:external-graphic>
all I got in the fo file was:
<fo:external-graphic content-height="15mm" text-align="center" src=""/>
As I have no more solutions for this problem, I have chosen to write to
Mr. Bob Stayton, who istructed me to join the list, and ask for help.
--
Costin Stroie (icq: 157008123)