1<?xml version='1.0'?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 xmlns:fo="http://www.w3.org/1999/XSL/Format" 4 version='1.0'> 5 6<!-- ******************************************************************** 7 $Id$ 8 ******************************************************************** 9 10 This file is part of the XSL DocBook Stylesheet distribution. 11 See /README or http://nwalsh.com/docbook/xsl/ for copyright 12 and other information. 13 14 ******************************************************************** --> 15 16<!-- ==================================================================== --> 17 18<xsl:template match="index"> 19 <xsl:variable name="id"> 20 <xsl:call-template name="object.id"/> 21 </xsl:variable> 22 23 <fo:block id="{$id}"> 24 <xsl:call-template name="component.separator"/> 25 <xsl:call-template name="index.titlepage"/> 26 <xsl:apply-templates/> 27 <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> 28 <xsl:call-template name="generate-index"/> 29 </xsl:if> 30 </fo:block> 31</xsl:template> 32 33<xsl:template match="book/index"> 34 <xsl:variable name="id"> 35 <xsl:call-template name="object.id"/> 36 </xsl:variable> 37 <xsl:variable name="master-name"> 38 <xsl:call-template name="select.pagemaster"/> 39 </xsl:variable> 40 41 <fo:page-sequence id="{$id}" 42 hyphenate="{$hyphenate}" 43 master-name="{$master-name}"> 44 <xsl:attribute name="language"> 45 <xsl:call-template name="l10n.language"/> 46 </xsl:attribute> 47 <xsl:if test="$double.sided != 0"> 48 <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> 49 </xsl:if> 50 51 <xsl:apply-templates select="." mode="running.head.mode"> 52 <xsl:with-param name="master-name" select="$master-name"/> 53 </xsl:apply-templates> 54 <xsl:apply-templates select="." mode="running.foot.mode"> 55 <xsl:with-param name="master-name" select="$master-name"/> 56 </xsl:apply-templates> 57 58 <fo:flow flow-name="xsl-region-body"> 59 <xsl:call-template name="index.titlepage"/> 60 <xsl:apply-templates/> 61 <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> 62 <xsl:call-template name="generate-index"/> 63 </xsl:if> 64 </fo:flow> 65 </fo:page-sequence> 66</xsl:template> 67 68<xsl:template match="index/title"></xsl:template> 69<xsl:template match="index/subtitle"></xsl:template> 70<xsl:template match="index/titleabbrev"></xsl:template> 71 72<!-- ==================================================================== --> 73 74<xsl:template match="indexdiv"> 75 <fo:block> 76 <xsl:apply-templates/> 77 </fo:block> 78</xsl:template> 79 80<xsl:template match="indexdiv/title"> 81 <xsl:variable name="id"> 82 <xsl:call-template name="object.id"> 83 <xsl:with-param name="object" select=".."/> 84 </xsl:call-template> 85 </xsl:variable> 86 <fo:block font-size="16pt" font-weight="bold"> 87 <xsl:apply-templates/> 88 </fo:block> 89</xsl:template> 90 91<!-- ==================================================================== --> 92 93<xsl:template match="indexterm"> 94 <fo:wrapper> 95 <xsl:attribute name="id"> 96 <xsl:call-template name="object.id"/> 97 </xsl:attribute> 98 <xsl:comment> 99 <xsl:value-of select="primary"/> 100 <xsl:if test="secondary"> 101 <xsl:text>, </xsl:text> 102 <xsl:value-of select="secondary"/> 103 </xsl:if> 104 <xsl:if test="tertiary"> 105 <xsl:text>, </xsl:text> 106 <xsl:value-of select="tertiary"/> 107 </xsl:if> 108 </xsl:comment> 109 </fo:wrapper> 110</xsl:template> 111 112<xsl:template match="indexentry"> 113</xsl:template> 114 115<xsl:template name="generate-index"> 116 <!-- nop: use autoidx.xsl to get automatic indexing --> 117</xsl:template> 118 119</xsl:stylesheet> 120