What is the proper string to use in my XSLT to make FOP print the title of the book in the header? I haven't been able to find this anywhere, and any help is appreciated!

Edit:

So,

<xsl:when test="$sequence = 'even' and $position = 'right'">
        <xsl:apply-templates select="." mode="titleabbrev.markup"/> 
      </xsl:when>

will print abbreviated section/chapter name. I want to do the same, but for the title of the book.

link|improve this question
just to clarify things: you have a text in docbook format and are now developing the .xsl file to transform it via fop to xyz? – akira Jun 3 '10 at 4:06
yes. i've imported the default docbook 5 xslt to my sheet and i'm over riding the defaults. I've seen strings for printing the section or chapter name, but nothing about the book name or title. – Mica Jun 3 '10 at 16:09
provide that snippet in your question, where you "fop" the header of the page ... – akira Jun 3 '10 at 20:54
feedback

3 Answers

http://www.sagehill.net/docbookxsl/PrintHeaders.html might help. provide the snippet and maybe i can help more.

link|improve this answer
feedback

A header could bee displayed in what defines the top region of a page.

I can see in your example that you test for 'even'. I gees that you only need this title on even pages. You can do this by defining different page masters (<fo:simple-page-master master-name="even">) – look for <fo:page-sequence-master> and <fo:conditional-page-master-reference> to have odd/even pages. In this page master you define the different regions of the page.

link|improve this answer
feedback

A bit late but I came across your question while I was looking for a wat to do this.

After some searching I ended up with :

in the <xsl:template name="header.content"> section:

<xsl:when test="$position = 'left'">
   <xsl:value-of select="//d:book/d:title"/>, 
   <xsl:value-of select="//d:book/d:subtitle"/>
</xsl:when>

When the title does not fit in the left part of the header you can make the left part wider (100% in this example) by using :

<xsl:param name="header.column.widths">1 0 0</xsl:param>

somewhere in you config xslt.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.