This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Double Side and FOP with 1.53
- From: Jens Stavnstrup <js at ddre dot dk>
- To: Togan Muftuoglu <toganm at users dot sourceforge dot net>
- Cc: Docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 13 Aug 2002 14:47:54 +0200 (CEST)
- Subject: Re: DOCBOOK-APPS: Double Side and FOP with 1.53
Togan,
A little fix, which should work in all cases. Well, at least, I have not
find the bug yet !
Regards
Jens
----------------------
<?xml version="1.0"?>
<!--
This stylesheet is created for post-processing of FO result-trees intended for
delivery to FOP 0.20.4. This should temporary solve problems caused by wrong
or unimplemented features in FOP.
When using Saxon, this stylesheet can be automatically processed by adding the
attribute saxon:next-in-chain to the xsl:output element of your own
stylesheet.
E.g.
<xsl:output method="xml" indent="no"
saxon:next-in-chain="fo-post-for-fop.xsl"/>
N.B. Remember to attach the namespace declaration
xmlns:saxon="http://icl.com/saxon" to your stylesheet element
Copyright (c) 2002, Jens Stavnstrup/DDRE <js@ddre.dk>
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version='1.0'
exclude-result-prefixes="#default">
<!-- Copy everything -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- ....................................................................
Problem: In DocBook 1.53.0 Norm uses the basic conformance level
property initial-page-number to force components to break on
odd-pages instead of the previously used extended conformance
level property force-page-count.
Solution: Use the extended property force-page-count
.................................................................... -->
<xsl:template match="fo:page-sequence[@initial-page-number]">
<xsl:copy>
<xsl:if test="@initial-page-number != 'auto-odd'">
<xsl:apply-templates select="@initial-page-number"/>
</xsl:if>
<xsl:apply-templates select="@*[name() != 'initial-page-number']"/>
<xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- Put your own templates here -->
</xsl:stylesheet>
----------------------
On Tue, 13 Aug 2002, Togan Muftuoglu wrote:
> * Jens Stavnstrup; <js@ddre.dk> on 13 Aug, 2002 wrote:
> >Togan,
> >
> >There are one case, where the stylesheet does not work, and that is when
> >your first chapter does not have an even number of pages. I think this is
> >a general problem with the initial-page-number property.
> >
>
> I know exactly what you mean since ny test document passed I thought
> volla. However I have hit the case you are mentioning with my actual
> document, which is pitty.
>
> Still the 6 pack is yours to pick. I will revert to a working release
> until I have a solution with the current or future Stylesheet or Fop
> releases.
>
> Thanks for the help
>
> --
>
> Togan Muftuoglu
>