[xep-support] Newbie questions about setting up headers.

Bob Stayton bobs at sagehill.net
Fri Jul 21 02:32:58 PDT 2006


If you are using the DocBook stylesheets, then this documentation should 
help:

http://www.sagehill.net/docbookxsl/PrintHeaders.html

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs at sagehill.net


----- Original Message ----- 
From: "David Prokopetz" <dave at penguinking.com>
To: <xep-support at renderx.com>
Sent: Friday, July 21, 2006 12:14 AM
Subject: Re: [xep-support] Newbie questions about setting up headers.


> Interesting.  I'm not quite sure how to integrate what you're suggesting
> with the standard DocBook templates, tho'.
>
> Hmmm.  I neglected to specify that I'm working with DocBook documents,
> didn't I?  I knew I was forgetting something important.
>
>  - David PRokopetz.
>
> Kees de Grauw wrote:
>> David,
>>
>> There are better ways to do this.
>> Have al look at the examples in the folder XEP\examples\pagination.
>> There you'll find examples of the regular methods to handle this.
>>
>> In "franklin_2pageseqs.fo" left and right (and center) pages are defined
>> with:
>>     <fo:page-sequence-master master-name="run2">
>>       <fo:repeatable-page-master-alternatives>
>>         <fo:conditional-page-master-reference
>>           master-reference="headers_center"
>>           page-position="first" />
>>         <fo:conditional-page-master-reference
>>           master-reference="headers_right"
>>           odd-or-even="odd" />
>>         <fo:conditional-page-master-reference
>>           master-reference="headers_left"
>>           odd-or-even="even" />
>>       </fo:repeatable-page-master-alternatives>
>>     </fo:page-sequence-master>
>>   </fo:layout-master-set>
>>
>>
>> In "basic2.fo" headers are defined with:
>>   <fo:static-content flow-name="xsl-region-before">
>>
>> Hopes this helps, Kees
>>
>>
>> -----Original Message-----
>> From: owner-xep-support at renderx.com
>> [mailto:owner-xep-support at renderx.com]On Behalf Of David Prokopetz
>> Sent: Friday, 21 July 2006 05:05
>> To: xep-support at renderx.com
>> Subject: [xep-support] Newbie questions about setting up headers.
>>
>>
>> Hi.
>>
>> I'm a complete newbie - I just started learning XSL two days ago - so
>> please bear with me if these are really obvious questions...
>>
>> 1. I'm trying to create a header that puts the title of the book on the
>> left side of even pages, and the title of the current chapter on the
>> right side of odd pages.  The following *appears* to work, but I have no
>> idea if this is the proper or accepted way to do it, or if it's going to
>> create weird side-effects down the road.  Does this look right?
>>
>> <xsl:template name="header.content">
>>    <xsl:param name="pageclass" select="''" />
>>    <xsl:param name="sequence" select="''" />
>>    <xsl:param name="position" select="''" />
>>    <xsl:param name="gentext-key" select="''" />
>>    <fo:block>
>>      <xsl:choose>
>>        <xsl:when test="$pageclass = 'titlepage'">
>>          <!--no header on title pages-->
>>        </xsl:when>
>>        <xsl:when test="$position = 'left' and
>>                        ($sequence = 'even' or $sequence = 'blank')">
>>          <xsl:apply-templates select="ancestor-or-self::book"
>>                               mode="object.title.markup" />
>>        </xsl:when>
>>        <xsl:when test="$position = 'right' and
>>                        ($sequence = 'odd' or $sequence = 'first')">
>>          <xsl:apply-templates select="ancestor-or-self::chapter"
>>                               mode="object.title.markup" />
>>        </xsl:when>
>>        <xsl:otherwise>
>>          <!-- no header -->
>>        </xsl:otherwise>
>>      </xsl:choose>
>>    </fo:block>
>> </xsl:template>
>>
>> 2. Is there any way to apply a background image to headers and footers?
>>   There's a running pattern I want to apply behind the header and footer
>> text, going right up to the edges of the page; I've figured out how to
>> insert individual graphics - like logos and such - into headers, but I'm
>> stumped as to how to get them to run behind the text.
>>
>> Thanks,
>>
>>   - David Prokopetz.
>> -------------------
>> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>> in the body of the message to majordomo at renderx.com from the address
>> you are subscribed from.
>> (*) By using the Service, you expressly agree to these Terms of Service
>> http://www.renderx.com/terms-of-service.html
>>
>> -------------------
>> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>> in the body of the message to majordomo at renderx.com from the address
>> you are subscribed from.
>> (*) By using the Service, you expressly agree to these Terms of Service 
>> http://www.renderx.com/terms-of-service.html
>
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo at renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service 
> http://www.renderx.com/terms-of-service.html
>
> 


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list