docbook-apps

AW: [docbook-apps] print customization without title page?

  • 1.  AW: [docbook-apps] print customization without title page?

    Posted 07-28-2008 15:33
    Hi Bob,
    thank you very much for your help. Now it works!

    I copied the content of the fo/division.xsl file into my customization.
    Then, I commented out the following sequence :



    Then by tranforming it with XSLTProc and Antenna House, the title pages were omitted, as I wanted them to.

    >So I would suggest that you copy this template to your
    >customization layer, and define a new stylesheet parameter to
    >control this page-sequence, rather than using the "preamble"
    >variable. Then you don't need to modify the titlepage spec
    >file at all. You can turn the titlepages on or off with the parameter.

    This sounds very smart. I haven't managed yet to realize that. If you could give me some more details, that would help.
    But for the moment, I am very pleased and thankful, that your help solved that high prio problem above. The on/off feature with the parameter would be a bonus feature to impress them :) .

    Regards, Martin




    >-----Ursprüngliche Nachricht-----
    >Von: Bob Stayton [mailto:bobs@sagehill.net]
    >Gesendet: Montag, 30. Juni 2008 00:28
    >An: Schramm, Martin; docbook-apps@lists.oasis-open.org
    >Betreff: Re: [docbook-apps] print customization without title page?
    >
    >This problem is caused by the template with match="book" in
    >fo/division.xsl:
    >
    ><xsl:template match="book">
    > <xsl:variable name="id">
    > <xsl:call-template name="object.id"/>
    > </xsl:variable>
    >
    > <xsl:variable name="preamble"
    > select="title|subtitle|titleabbrev|bookinfo|info"/>
    >
    > <xsl:variable name="content"
    > select="node()[not(self::title or self::subtitle
    > or self::titleabbrev
    > or self::info
    > or self::bookinfo)]"/>
    >
    > <xsl:variable name="titlepage-master-reference">
    > <xsl:call-template name="select.pagemaster">
    > <xsl:with-param name="pageclass" select="'titlepage'"/>
    > </xsl:call-template>
    > </xsl:variable>
    >
    > <xsl:call-template name="front.cover"/>
    >
    > <xsl:if test="$preamble">
    > <xsl:call-template name="page.sequence">
    > <xsl:with-param name="master-reference"
    > select="$titlepage-master-reference"/>
    > <xsl:with-param name="content">
    > <fo:block id="{$id}">
    > <xsl:call-template name="book.titlepage"/>
    > </fo:block>
    > </xsl:with-param>
    > </xsl:call-template>
    > </xsl:if>
    >
    > <xsl:apply-templates select="dedication" mode="dedication"/>
    >
    > <xsl:call-template name="make.book.tocs"/>
    >
    > <xsl:apply-templates select="$content"/>
    >
    > <xsl:call-template name="back.cover"/>
    >
    ></xsl:template>
    >
    >The template creates a variable named "preamble" that tests
    >for the existance of any elements that would appear on a title
    >page. If there are such elements, it makes a page-sequence
    >and processes them.
    >
    >However, with your customization, the "book.titlepage"
    >template outputs nothing, resulting in this FO output:
    >
    > <fo:flow flow-name="xsl-region-body">
    > <fo:block id="bobsbook"/>
    > </fo:flow>
    >
    >In Antenna House, this empty block is enough to generate the
    >empty page (not so in XEP).
    >
    >So I would suggest that you copy this template to your
    >customization layer, and define a new stylesheet parameter to
    >control this page-sequence, rather than using the "preamble"
    >variable. Then you don't need to modify the titlepage spec
    >file at all. You can turn the titlepages on or off with the parameter.
    >
    >Bob Stayton
    >Sagehill Enterprises
    >bobs@sagehill.net
    >
    >
    >