On Thu, 07 Feb 2008 18:33:26 +0200, AlChuck <[EMAIL PROTECTED]> wrote:

There is a way, it's described in Bob Stayton's DocBook XSL - The Complete Guide:

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

I've read this. I looked at it again, and I still could not figure out a way to use background images short of using custom page masters. It seems like a lot of hassle just to get the background image in (but I guess that's what I'll have to do).

If I missed something and it's easier than this, please prove me wrong and you'll have my gratitude. = )


I haven't tried it yet for the body part of the page masters but it should
work the same as with the area-before and area-after sections.

I'm curious, if you didn't do the header and footer background images as
described in this chapter, how did you do it?

I did follow the instructions in http://www.sagehill.net/docbookxsl/PrintHeaders.html


I would like the page background images be as modularly overrideable as headers and footers are. For example, if in fo/pagesetup.xsl every page master had a call to user overridable template (that is by default empty) this would be easy. E.g.



    <fo:simple-page-master master-name="blank"
                           page-width="{$page.width}"
                           page-height="{$page.height}"
                           margin-top="{$page.margin.top}"
                           margin-bottom="{$page.margin.bottom}"
                           margin-left="{$margin.left.outer}"
                           margin-right="{$page.margin.inner}">
      <xsl:if test="$axf.extensions != 0">
        <xsl:call-template name="axf-page-master-properties">
          <xsl:with-param name="page.master">blank</xsl:with-param>
        </xsl:call-template>
      </xsl:if>
      <fo:region-body display-align="center"
                      margin-bottom="{$body.margin.bottom}"
                      margin-top="{$body.margin.top}">
        <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0">
          <xsl:attribute name="region-name">blank-body</xsl:attribute>
        </xsl:if>

<!-- if this was actually here it would be easy to insert background images: --> <!-- The same call would naturally be made in region-before and region-after -->
<xsl:call-template name="user.page.region">
  <xsl:with-param name="master-name" select="'blank'"/>
  <xsl:with-param name="location" select="'region-body'"/>
</xsl:call-template>
<!-- end my insertion -->

      </fo:region-body>
      <fo:region-before region-name="xsl-region-before-blank"
                        extent="{$region.before.extent}"
                        display-align="before"/>
      <fo:region-after region-name="xsl-region-after-blank"
                       extent="{$region.after.extent}"
                        display-align="after"/>
    </fo:simple-page-master>

...
<!-- default implementation of this template -->
<xsl:template name="user.page.region"/>


Of course I can modify fo/pagesetup.xsl myself, but that does not sound like such a good idea from maintenance point of view...



          .::AK::.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to