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
    >
    >
    >----- Original Message -----
    >From: "Schramm, Martin" <MSchramm@harmanbecker.com>
    >To: <docbook-apps@lists.oasis-open.org>
    >Sent: Wednesday, June 25, 2008 8:58 AM
    >Subject: [docbook-apps] print customization without title page?
    >
    >
    >Dear list,
    >one of our projects has requested a feature, for which I could
    >not find a
    >solution and therefore ask for your support:
    >
    >My colleagues want to have one customization layer for
    >displaying the whole
    >documents content and another customization producing an
    >FO/PDF output with
    >a very condensed content. The condensed output should not have
    >a title page.
    >
    >I have tried to adjust the "mytitlepage.spec.xml" (gets transformed to
    >"mytitlepages.xsl") in the following way:
    >
    >
    >
    >
    >
    >
    >
    > <t:titlepage t:element="book" t:wrapper="fo:block">
    >
    > <t:titlepage-content t:side="recto">
    >
    > </t:titlepage-content>
    >
    > <t:titlepage-content t:side="verso">
    >
    > </t:titlepage-content>
    >
    > <t:titlepage-separator>
    >
    > </t:titlepage-separator>
    >
    > <t:titlepage-before t:side="recto" />
    >
    > <t:titlepage-before t:side="verso">
    >
    > </t:titlepage-before>
    > </t:titlepage>
    >
    >
    >So with that, I get one single blank title page before the documents
    >content. But I do not want a title page at all. Could you
    >please give me a
    >hint.
    >
    >Thanks, Martin
    >
    >The customization layer includes the mytitlepages.xsl with the
    >following
    >line:
    ><xsl:include href="../docbook/stylesheet/mytitlepages.xsl"/>
    >
    >Root element: book
    >We use: DocBook XML V4.5, XSTLProc, Antenna House V 4.2
    >
    >
    >-------
    >Harman/Becker Automotive Systems (Becker Division) GmbH
    >Becker-Göring-Straße 16 D-76307 Karlsbad - Germany
    >
    >Martin Schramm
    >
    >Technical Documentation
    >ES-P Quality & Tools
    >
    >*******************************************
    >Harman Becker Automotive Systems GmbH
    >Geschaeftsfuehrung: Dr. Wolfgang Ptacek - Michael Mauser -
    > Regis Baudot
    >Sitz der Gesellschaft: Karlsbad - Registergericht: Mannheim HRB 361395
    >
    >*******************************************
    >Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
    >Informationen. Wenn Sie nicht der richtige Adressat sind oder
    >diese E-Mail
    >irrtuemlich erhalten haben, informieren Sie bitte sofort den
    >Absender und
    >loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
    >Weitergabe dieser Mail ist nicht gestattet.
    >This e-mail may contain confidential and/or privileged
    >information. If you
    >are not the intended recipient (or have received this e-mail in error)
    >please notify the sender immediately and delete this e-mail. Any
    >unauthorized copying, disclosure or distribution of the
    >contents in this
    >e-mail is strictly forbidden.
    >*******************************************
    >
    >---------------------------------------------------------------------
    >To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    >For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >
    >
    >