docbook-apps

Re: [docbook-apps] generate-article-titlepage-on-separate-page

  • 1.  Re: [docbook-apps] generate-article-titlepage-on-separate-page

    Posted 10-08-2011 20:08
    "Bob Stayton" writes:

    > I'm not quite clear which you are asking for, as the subject line says
    > "titlepage-on-separate-page" and the body says TOC on its own page.

    Sorry. "titlepage-on-separate-page" refers to the old dssl definitions
    to convert a SGML file.

    > I'm also not clear if you mean FO output and separate physical pages,
    > or HTML output and separate chunk pages. In general, the more detail
    > you put in requests, the easier they are to answer.

    Again, sorry. Your guess is correct.

    > In the case of FO output, you can do it with a couple of utility
    > templates that the stylesheet provides. The first one creates a page
    > break after the title page, and the second one creates a page break
    > after the table of contents.
    >
    > <xsl:template name="article.titlepage.separator">
    > <fo:block break-after="page"/>
    > </xsl:template>
    >
    > <xsl:template name="component.toc.separator">
    > <fo:block break-after="page"/>
    > </xsl:template>

    I tried to put these lines in my ldp-print.xsl file. Runnling

    'xsltproc -o t.fo ~/xsl/ldp-print.xsl <xml-file-name', gave me the
    following output:

    /home/lrs/xsl/ldp-print.xsl:26: namespace error : Namespace prefix fo on
    block i
    s not defined
    <fo:block break-after="page"/>
    ^
    /home/lrs/xsl/ldp-print.xsl:30: namespace error : Namespace prefix fo on
    block i
    s not defined
    <fo:block break-after="page"/>
    ^
    Making portrait pages on A4 paper (210mmx297mm)

    What's the problem here?

    > An even simpler method uses the attribute-set named
    > toc.margin.properties' as described here:
    >
    > http://www.sagehill.net/docbookxsl/PrintToc.html#PageMargins
    >
    > although its section title would probably not have led you there.
    > These two attributes accomplish the same thing:
    >
    > <xsl:attribute-set name="toc.margin.properties">
    > <xsl:attribute name="break-before">page</xsl:attribute>
    > <xsl:attribute name="break-after">page</xsl:attribute>
    > </xsl:attribute-set>

    Putting these lines in the same file, seems to work.

    Thank you!

    Lars

    >