[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] can't compile doc with colophon
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. > > <?xml version="1.0" encoding="UTF-8"?> > <article version="5.0" xml:lang="fr" xmlns="http://docbook.org/ns/docbook"> > <info><title>Test</title></info> > > <section xml:id="introduction"><title>Introduction</title> > <para>Blah blahblah</para> > </section> > > <colophon> > <para>colophon text</para> > </colophon> > > </article> > > 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 : > > <?xml version="1.0" encoding="UTF-8"?> > <book version="5.0" xml:lang="fr" xmlns="http://docbook.org/ns/docbook"> > <info><title>Test</title></info> > > <chapter xml:id="introduction"><title>Introduction</title> > <para>Blah blahblah</para> > </chapter> > > <colophon> > <para>colophon text</para> > </colophon> > > </book> > > above it's OK but this one : > <?xml version="1.0" encoding="UTF-8"?> > <book version="5.0" xml:lang="fr" xmlns="http://docbook.org/ns/docbook"> > <info><title>Test</title></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 > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]