docbook-apps

  • 1.  Re: [docbook-apps] Titlepage customization

    Posted 01-31-2012 22:39
    Hi,
    I would suggest that since your article titlepage plays out like a book's titlepage
    that you look at the specifications for the book's titlepage in that file as a model.
    There you will see two instances of page breaking with this:

    <fo:block break-after="page"/>

    I presume you have seen this documentation on the subject:

    http://www.sagehill.net/docbookxsl/HTMLTitlePage.html#TitlePageElems

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: "danmauer" <dan.mauer@gmail.com>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Tuesday, January 31, 2012 11:47 AM
    Subject: [docbook-apps] Titlepage customization


    >
    > So I'm having a hard time comprehending how to properly build a custom
    > titlepage specification XML file.
    >
    > I've got the process down -- create the specification XML, transform it
    > using the template/titlepage.xsl stylesheet to generate a custom XSL
    > titlepage stylesheet, then import that into my regular customization
    > stylesheet.
    >
    > What I can't figure out is how to actually write the template. My document
    > is an
    , and in print format I want it to start out with a single
    > front title page, including the title, subtitle, a couple of PNG images, and
    > a date. Then a second page containing the revision history, and finally a
    > third page with the table of contents.
    >
    > I've based my titlepage spec file on the <t:titlepage t:element="article"
    > t:wrapper="fo:block"
    > font-family="{$title.fontset}">...</t:titlepage> section of the
    > titlepage.templates.xml file, I have no transformation errors and it's
    > definitely using the custom template, as if I (for example) remove the
    > revhistory section from the spec file, it disappears from my final document.
    >
    > However, nothing I've tried seems to generate a page break, and I'm not
    > quite grasping how to embed and position the graphics either.
    >
    > Any help would be much appreciated.
    >
    > Thanks!
    > -Dan
    > --
    > View this message in context:
    > http://old.nabble.com/Titlepage-customization-tp33238812p33238812.html
    > Sent from the docbook apps mailing list archive at Nabble.com.
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >




  • 2.  Re: [docbook-apps] Titlepage customization

    Posted 02-01-2012 15:48

    Thanks for responding. I feel like I must be missing some basic concept
    here. I've looked at the documentation, most of which I think I understand,
    but when I use my custom titlepage xml spec file to generate the xsl for the
    title page, and then import that into my main style sheet, I still wind up
    with the title, revision history and table of contents all butting right up
    against each other with no page separation whatsoever. Here's my titlepage
    spec file in its entirety -- maybe where I'm going wrong will become clear
    this way.














    ]>

    <t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
    xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <t:titlepage t:element="article" t:wrapper="fo:block"
    font-family="{$title.fontset}">

    <t:titlepage-content t:side="recto"
    start-indent="0pt"
    text-align="center">



  • 3.  Re: [docbook-apps] Titlepage customization

    Posted 02-01-2012 16:52
    Hi Dan,

    I am actually using a custom styesheet:

    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:doc="http://docbook.org/ns/docbook"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:d="http://docbook.org/ns/docbook"
    version="1.1">


    <xsl:import
    href="/Users/cejohnsonlouisville/Documents/docbook-xsl-ns-1.76.1/fo/docbook.xsl"/>



    <xsl:template match="d:article">
    <xsl:variable name="id">
    <xsl:call-template name="object.id"/>
    </xsl:variable>

    <xsl:call-template name="page.sequence">
    <xsl:with-param name="master-reference">titlepage</xsl:with-param>
    <xsl:with-param name="content">
    <fo:block id="{$id}"
    xsl:use-attribute-sets="component.titlepage.properties">

    </fo:block>
    <fo:block break-after="page"/>
    </xsl:with-param>
    </xsl:call-template>

    Does that make sense? Call each stylesheet as you want it, and put in the
    content you want.

    For example, the following inserts a graphic:

    <xsl:call-template name="page.sequence">
    <xsl:with-param name="master-reference">titlepage</xsl:with-param>
    <xsl:with-param name="content">
    <fo:block id="{$id}"
    xsl:use-attribute-sets="component.titlepage.properties">
    <fo:block start-indent="0in">
    <fo:external-graphic src="charts/problem_solve_2010_2011_r.png"
    content-width="5in"/>
    </fo:block>

    </fo:block>
    <fo:block break-after="page"/>
    </xsl:with-param>
    </xsl:call-template>

    Paul

    On Wed, Feb 1, 2012 at 10:47 AM, danmauer <dan.mauer@gmail.com> wrote:

    >
    > Thanks for responding. I feel like I must be missing some basic concept
    > here. I've looked at the documentation, most of which I think I
    > understand,
    > but when I use my custom titlepage xml spec file to generate the xsl for
    > the
    > title page, and then import that into my main style sheet, I still wind up
    > with the title, revision history and table of contents all butting right up
    > against each other with no page separation whatsoever. Here's my titlepage
    > spec file in its entirety -- maybe where I'm going wrong will become clear
    > this way.
    >
    >
    > >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > ]>
    >
    > <t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
    > xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
    > xmlns:fo="http://www.w3.org/1999/XSL/Format"
    > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    >
    > <t:titlepage t:element="article" t:wrapper="fo:block"
    > font-family="{$title.fontset}">
    >
    > <t:titlepage-content t:side="recto"
    > start-indent="0pt"
    > text-align="center">
    >
    >