[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] FOP 0.90alpha1
> -----Original Message----- > From: Holger Morch > But it doesn't work with my *.fo document generated with > docbook-xsl-1.69.1. The Problem is the fox namespace. As [1] > points out > the fox:outline tag replaced by the bookmark elements of > xsl-fo 1.1 and > fox:destination is not implemented yet. > > I don't really know much about xsl-fo. I only use it to generate PDF > from docbook. > > Does somebody know a workaround for getting fop 0.90alpha1 working. I > could imagine a replacement of the two tags via customization > layer. But > I don't know the replacements. To get PDF bookmarks working with FOP 0.90, you can use the attached stylesheet file (fop-new.xsl) that I created as a replacement for the old fop.xsl. To use it, add <xsl:import href="fop-new.xsl"/> to your customization layer. /MJ
<?xml version='1.0' encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- MJ 051122: patch of fop.xsl 1.10 to accommodate new FOP implementation of PDF bookmarks --> <!-- ******************************************************************** $Id: fop.xsl,v 1.10 2005/04/20 08:11:36 bobstayton Exp $ ******************************************************************** (c) Stephane Bline Peregrine Systems 2001 Driver file to allow pdf bookmarking (based on fop implementation). ******************************************************************** --> <!-- In PDF bookmarks can't be used characters with code>255. This version of file translates characters with code>255 back to ASCII. Pavel Zampach (zampach@volny.cz) --> <xsl:variable name="a-dia" select= "'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/> <xsl:variable name="a-asc" select= "'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/> <!-- Bookmarks for FOP version >= 0.90 --> <!-- ================================= --> <xsl:template match="*" mode="fop.outline"/> <xsl:template match="set|book|part|reference|preface|chapter|appendix|article |glossary|bibliography|index|setindex |refentry |sect1|sect2|sect3|sect4|sect5|section" mode="fop.outline"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="bookmark-label"> <xsl:apply-templates select="." mode="object.title.markup"/> </xsl:variable> <xsl:choose> <xsl:when test="parent::*"> <fo:bookmark internal-destination="{$id}" starting-state="hide"> <fo:bookmark-title> <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fo:bookmark-title> <xsl:apply-templates select="*" mode="fop.outline"/> </fo:bookmark> </xsl:when> <xsl:otherwise> <fo:bookmark-tree> <fo:bookmark internal-destination="{$id}" starting-state="show"> <fo:bookmark-title> <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fo:bookmark-title> </fo:bookmark> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and (book|part|reference|preface|chapter|appendix|article |glossary|bibliography|index|setindex |refentry |sect1|sect2|sect3|sect4|sect5|section)"> <fo:bookmark internal-destination="toc...{$id}"> <fo:bookmark-title> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template> </fo:bookmark-title> </fo:bookmark> </xsl:if> <xsl:apply-templates select="*" mode="fop.outline"/> </fo:bookmark-tree> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]