[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] DocBook XSL Stylesheets + rootid + PDF problem
This is actually a bug in the stylesheet. The FO output does not have a page-sequence when you select the section with the rootid parameter. That's because the template that generates a page-sequence for section uses match="/section" for files that consist of only a section. In your case, that template is not used, only the regular section template which does not generate a page-sequence. Can you file a bug report on SourceForge for this problem? If you need a workaround, copy the template with match="/section" from fo/section.xsl to your customization and change the match to the following: <xsl:template match="section[not(parent::*) or $rootid = @id]"> Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: <paul@kitebird.com> To: <docbook-apps@lists.oasis-open.org> Sent: Wednesday, November 10, 2004 12:27 PM Subject: [docbook-apps] DocBook XSL Stylesheets + rootid + PDF problem > I'm trying to use the rootid parameter with the DocBook XSL stylesheets, > but have run into a problem with regard to producing PDF documents. > In summary, I have no problem when rootid is the ID for a <chapter>. But > when when rootid is the ID for a <section>, the resulting FO file makes > FOP die. I've tried to narrow this down to a minimal test case below. > > Here is a small input file, junk.xml, that demonstrates the problem: > > ---------- > <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> > <book lang="en"> > <title id="title-book">Book Title</title> > > <chapter id="chapter"> > <title id="title-introduction">Chapter Title</title> > > <para>Chapter para.</para> > > <section id="section"> > <title id="title-section">Section Title</title> > > <para>Section para.</para> > > </section> > > </chapter> > > </book> > ---------- > > The goal here is to produce one output document from the <chapter> > and one from the <section>, in both HTML and PDF output formats. > > Here is a shell script that does these things: > - Formats the <chapter> as HTML (this works) > - Formats the <section> as HTML (this works) > - Formats the <chapter> as PDF (this works) > - Formats the <section> as PDF (this fails at the FOP step) > > docbook://xsl-current/fo/docbook.xsl is mapped in my catalog file to version > 1.66.1 of the DocBook XSL stylesheets. (Note: I've also tried with 1.67.0 > with the same result.) > > ---------- > INPUT=junk.xml > xsltproc \ > --novalid \ > --stringparam rootid chapter \ > --output chapter.html \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > > xsltproc \ > --novalid \ > --stringparam rootid section \ > --output section.html \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > > xsltproc \ > --novalid \ > --stringparam rootid chapter \ > --param fop.extensions 1 \ > --output chapter.fo \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > fop -q chapter.fo chapter.pdf > > xsltproc \ > --novalid \ > --stringparam rootid section \ > --param fop.extensions 1 \ > --output section.fo \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > fop -q section.fo section.pdf > ---------- > > The result of running the script is as follows: > > % sh -v test-cmds > INPUT=junk.xml > xsltproc \ > --novalid \ > --stringparam rootid chapter \ > --output chapter.html \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > Making portrait pages on USletter paper (8.5inx11in) > > xsltproc \ > --novalid \ > --stringparam rootid section \ > --output section.html \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > Making portrait pages on USletter paper (8.5inx11in) > > xsltproc \ > --novalid \ > --stringparam rootid chapter \ > --param fop.extensions 1 \ > --output chapter.fo \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > Making portrait pages on USletter paper (8.5inx11in) > fop -q chapter.fo chapter.pdf > [ERROR] property - "background-position-horizontal" is not implemented yet. > [ERROR] property - "background-position-vertical" is not implemented yet. > <34 similar lines deleted> > [ERROR] property - "background-position-horizontal" is not implemented yet. > [ERROR] property - "background-position-vertical" is not implemented yet. > > xsltproc \ > --novalid \ > --stringparam rootid section \ > --param fop.extensions 1 \ > --output section.fo \ > docbook://xsl-current/fo/docbook.xsl \ > $INPUT > Making portrait pages on USletter paper (8.5inx11in) > fop -q section.fo section.pdf > [ERROR] property - "background-position-horizontal" is not implemented yet. > [ERROR] property - "background-position-vertical" is not implemented yet. > <34 similar lines deleted> > [ERROR] property - "background-position-horizontal" is not implemented yet. > [ERROR] property - "background-position-vertical" is not implemented yet. > [ERROR] null > > > Ah, the so-informative "null" error. :-( > > I suppose the problem could be either in the stylesheets or in FOP > (or with myself, of course), but I'm uncertain how to proceed here. > Any suggestions appreciated. Thanks. > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]