diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:43:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:44:49 (GMT) |
commit | 3afa4f741c26360245dc313bc368f508b26a6b96 (patch) | |
tree | 4fc9fedac990a099010fed8a4ee09ddc51c21cc5 /3rdParty/DocBook/XSL/fo/ptc.xsl | |
parent | 7548dabae7d10e48816142e508be651ada9f7bc3 (diff) | |
download | swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.zip swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.tar.bz2 |
Added DocBook infrastructure.
Imported most of "DocBook kit".
Added placeholder for Swiften developers guide.
Diffstat (limited to '3rdParty/DocBook/XSL/fo/ptc.xsl')
-rw-r--r-- | 3rdParty/DocBook/XSL/fo/ptc.xsl | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/3rdParty/DocBook/XSL/fo/ptc.xsl b/3rdParty/DocBook/XSL/fo/ptc.xsl new file mode 100644 index 0000000..a8874d8 --- /dev/null +++ b/3rdParty/DocBook/XSL/fo/ptc.xsl @@ -0,0 +1,77 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<!-- ================================================================ --> +<!-- --> +<!-- PTC/Arbortext Code for XSL 1.1 bookmark support --> +<!-- --> +<!-- ================================================================ --> + +<xsl:param name="ati.xsl11.bookmarks" select="1"/> + +<xsl:variable name="ati-a-dia" select= +"'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/> + +<xsl:variable name="ati-a-asc" select= +"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/> + +<xsl:template match="*" mode="ati.xsl11.bookmarks"> + <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/> +</xsl:template> + +<xsl:template match="set|book|part|reference|preface|chapter|appendix|article + |glossary|bibliography|index|setindex + |refentry + |sect1|sect2|sect3|sect4|sect5|section" + mode="ati.xsl11.bookmarks"> + <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> + + <!-- Put the root element bookmark at the same level as its children --> + <!-- If the object is a set or book, generate a bookmark for the toc --> + + <xsl:choose> + <xsl:when test="self::index and $generate.index = 0"/> + <xsl:when test="parent::*"> + <fo:bookmark internal-destination="{$id}"> + <fo:bookmark-title> + <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/> + </fo:bookmark-title> + <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/> + </fo:bookmark> + </xsl:when> + <xsl:otherwise> + <fo:bookmark internal-destination="{$id}"> + <fo:bookmark-title> + <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-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 section|sect1|refentry + |article|bibliography|glossary + |appendix"> + <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="ati.xsl11.bookmarks"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> |