source: stylesheets/pdf/lfs-index.xsl@ f60796a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since f60796a was 276015d2, checked in by Randy McMurchy <randy@…>, 17 years ago

Added the LastChangedBy and Date keywords then set the corresponding keyword property on each file in the repo

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6430 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 6.5 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2<!DOCTYPE xsl:stylesheet [
3<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
4<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
5<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
6<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
7]>
8
9<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:fo="http://www.w3.org/1999/XSL/Format"
11 version="1.0">
12
13<!--
14$LastChangedBy$
15$Date$
16-->
17
18 <!--Title-->
19 <xsl:template match="index" mode="title.markup">
20 <xsl:param name="allow-anchors" select="0"/>
21 <xsl:call-template name="gentext">
22 <xsl:with-param name="key">Index</xsl:with-param>
23 </xsl:call-template>
24 </xsl:template>
25
26 <!-- Divisions-->
27 <xsl:template match="indexterm" mode="index-div">
28 <xsl:param name="scope" select="."/>
29 <xsl:variable name="key"
30 select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
31 <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
32 <xsl:if test="key('letter', $key)[&scope;]
33 [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
34 <fo:block>
35 <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
36 <xsl:call-template name="indexdiv.title">
37 <xsl:with-param name="titlecontent">
38 <xsl:choose>
39 <xsl:when test="$divtitle = 'A'">
40 <xsl:call-template name="gentext">
41 <xsl:with-param name="key">Packages</xsl:with-param>
42 </xsl:call-template>
43 </xsl:when>
44 <xsl:when test="$divtitle = 'B'">
45 <xsl:call-template name="gentext">
46 <xsl:with-param name="key">Programs</xsl:with-param>
47 </xsl:call-template>
48 </xsl:when>
49 <xsl:when test="$divtitle = 'C'">
50 <xsl:call-template name="gentext">
51 <xsl:with-param name="key">Libraries</xsl:with-param>
52 </xsl:call-template>
53 </xsl:when>
54 <xsl:when test="$divtitle = 'D'">
55 <xsl:call-template name="gentext">
56 <xsl:with-param name="key">Kernel Configuration</xsl:with-param>
57 </xsl:call-template>
58 </xsl:when>
59 <xsl:when test="$divtitle = 'E'">
60 <xsl:call-template name="gentext">
61 <xsl:with-param name="key">Configuration Files</xsl:with-param>
62 </xsl:call-template>
63 </xsl:when>
64 <xsl:when test="$divtitle = 'F'">
65 <xsl:call-template name="gentext">
66 <xsl:with-param name="key">Bootscripts</xsl:with-param>
67 </xsl:call-template>
68 </xsl:when>
69 <xsl:when test="$divtitle = 'G'">
70 <xsl:call-template name="gentext">
71 <xsl:with-param name="key">Others</xsl:with-param>
72 </xsl:call-template>
73 </xsl:when>
74 <xsl:otherwise>
75 <xsl:value-of select="$divtitle"/>
76 </xsl:otherwise>
77 </xsl:choose>
78 </xsl:with-param>
79 </xsl:call-template>
80 </xsl:if>
81 <fo:block>
82 <xsl:apply-templates select="key('letter', $key)[&scope;]
83 [count(.|key('primary', &primary;)[&scope;][1])=1]"
84 mode="index-primary">
85 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
86 <xsl:with-param name="scope" select="$scope"/>
87 </xsl:apply-templates>
88 </fo:block>
89 </fo:block>
90 </xsl:if>
91 </xsl:template>
92
93 <!-- The separator -->
94 <xsl:template match="indexterm" mode="reference">
95 <xsl:param name="scope" select="."/>
96 <xsl:text>,&#160;</xsl:text>
97 <xsl:call-template name="reference">
98 <xsl:with-param name="zones" select="normalize-space(@zone)"/>
99 <xsl:with-param name="scope" select="$scope"/>
100 </xsl:call-template>
101 </xsl:template>
102
103 <!--Bookmarks-->
104 <xsl:template name="reference">
105 <xsl:param name="scope" select="."/>
106 <xsl:param name="zones"/>
107 <xsl:choose>
108 <xsl:when test="contains($zones, ' ')">
109 <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
110 <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
111 <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
112 <xsl:variable name="target2" select="key('id', $zone2)[&scope;]"/>
113 <xsl:variable name="id">
114 <xsl:call-template name="object.id">
115 <xsl:with-param name="object" select="$target[1]"/>
116 </xsl:call-template>
117 </xsl:variable>
118 <xsl:variable name="id2">
119 <xsl:call-template name="object.id">
120 <xsl:with-param name="object" select="$target2[1]"/>
121 </xsl:call-template>
122 </xsl:variable>
123 <!-- No package page number
124 <fo:basic-link internal-destination="{$id}">
125 <xsl:apply-templates select="$target" mode="page.citation">
126 <xsl:with-param name="id" select="$id"/>
127 </xsl:apply-templates>
128 </fo:basic-link>
129 <xsl:text>, </xsl:text>-->
130 <fo:basic-link internal-destination="{$id2}">
131 <xsl:apply-templates select="$target2" mode="page.citation">
132 <xsl:with-param name="id" select="$id2"/>
133 </xsl:apply-templates>
134 </fo:basic-link>
135 </xsl:when>
136 <xsl:otherwise>
137 <xsl:variable name="zone" select="$zones"/>
138 <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
139 <xsl:variable name="id">
140 <xsl:call-template name="object.id">
141 <xsl:with-param name="object" select="$target[1]"/>
142 </xsl:call-template>
143 </xsl:variable>
144 <fo:basic-link internal-destination="{$id}">
145 <xsl:apply-templates select="$target" mode="page.citation">
146 <xsl:with-param name="id" select="$id"/>
147 </xsl:apply-templates>
148 </fo:basic-link>
149 </xsl:otherwise>
150 </xsl:choose>
151 </xsl:template>
152
153 <!-- Page number in Index-->
154 <xsl:template match="*" mode="page.citation">
155 <xsl:param name="id" select="'???'"/>
156 <fo:inline keep-together.within-line="always">
157 <!--<xsl:text>[p</xsl:text>-->
158 <fo:page-number-citation ref-id="{$id}"/>
159 <!--<xsl:text>]</xsl:text>-->
160 </fo:inline>
161 </xsl:template>
162
163</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.