docbook-apps

  • 1.  Re: [docbook-apps] can't compile doc with colophon

    Posted 11-21-2010 20:12
    Indeed, you have uncovered a bug in the stylesheets. The stylesheets put an article
    into an fo:page-sequence, but the only template for colophon also tries to create an
    fo:page-sequence. Since you cannot nest fo:page-sequence, this does not work.
    Instead, a colophon inside an article should be handled in with a separate template a
    manner similar to the way an appendix inside an article is handled: without starting
    another fo:page-sequence.

    If you want to file a bug report on the DocBook SourceForge site, that would be great.

    In the meantime, you will need to add a new template in your customization layer to
    fix this problem. You could copy the template with match="d:colophon" from
    fo/component.xsl, and make these changes:

    1. Change the match to match="d:article/d:colophon".

    2. Remove all the fo:page-sequence stuff, leaving just:

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

    <fo:block id="{$id}"
    xsl:use-attribute-sets="component.titlepage.properties">
    <xsl:call-template name="colophon.titlepage"/>
    </fo:block>
    <xsl:apply-templates/>

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: "vincent" <vvaquin@club-internet.fr>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Sunday, November 21, 2010 3:25 AM
    Subject: [docbook-apps] can't compile doc with colophon


    > Hello, I'm new here.:-)
    > I'm beginning to have an intensive use of docbook. It's work fine but I have a
    > difficulty with colophon and I have seen nothing that would help me, even here...
    > So I try to explain my difficulty.
    >
    >
    >

    > <info></info>
    >
    >

    > <para>Blah blahblah</para>
    >

    >
    > <colophon>
    > <para>colophon text</para>
    > </colophon>
    >
    >

    >
    > The doc is valid and xsltproc create the .fo but fop complain :
    > page-sequence is not a valid child of fo:flow
    >
    > The same document with "book" and "chapter" instead of "article " and "section" is
    > ok (1)
    >
    > I use xls-ns-stylesheet 1.75.2, fop 1.0 and xsltproc on windows
    > I tried to use :
    > <xsl:param name="fop1.extensions" select="1"></xsl:param>
    > but no difference.
    > -----------------------------------------------------------------------------------------------
    > (1) the same document with book work only if there is something before colophon :
    >
    >
    > <book version="5.0" xml:lang="fr" xmlns="http://docbook.org/ns/docbook">
    > <info></info>
    >
    > <chapter xml:id="introduction">
    > <para>Blah blahblah</para>
    > </chapter>
    >
    > <colophon>
    > <para>colophon text</para>
    > </colophon>
    >
    > </book>
    >
    > above it's OK but this one :
    >
    > <book version="5.0" xml:lang="fr" xmlns="http://docbook.org/ns/docbook">
    > <info></info>
    >
    > <colophon>
    > <para>colophon text</para>
    > </colophon>
    >
    > </book>
    > which is valid don't work.
    >
    >
    >
    > ---------------------------------------------------------------------
    > 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] can't compile doc with colophon

    Posted 11-23-2010 19:43
    Le 21/11/2010 21:12, Bob Stayton a écrit :
    >
    > Indeed, you have uncovered a bug in the stylesheets. The stylesheets
    > put an article into an fo:page-sequence, but the only template for
    > colophon also tries to create an fo:page-sequence. Since you cannot
    > nest fo:page-sequence, this does not work. Instead, a colophon inside
    > an article should be handled in with a separate template a manner
    > similar to the way an appendix inside an article is handled: without
    > starting another fo:page-sequence.
    >
    > If you want to file a bug report on the DocBook SourceForge site, that
    > would be great.
    >

    OK.
    > In the meantime, you will need to add a new template in your
    > customization layer to fix this problem. You could copy the template
    > with match="d:colophon" from fo/component.xsl, and make these changes:
    >
    > 1. Change the match to match="d:article/d:colophon".
    >
    > 2. Remove all the fo:page-sequence stuff, leaving just:
    >
    > <xsl:variable name="id">
    > <xsl:call-template name="object.id"/>
    > </xsl:variable>
    >
    > <fo:block id="{$id}"
    > xsl:use-attribute-sets="component.titlepage.properties">
    > <xsl:call-template name="colophon.titlepage"/>
    > </fo:block>
    > <xsl:apply-templates/>
    >
    > Bob Stayton
    > Sagehill Enterprises
    > bobs@sagehill.net
    >
    Well, thank you very much.