Changeset ded6ddd for stylesheets/pdf
- Timestamp:
- 05/08/2004 02:19:53 PM (20 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 0868461
- Parents:
- e4bf4c7
- Location:
- stylesheets/pdf
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/pdf/lfs-index.xsl
re4bf4c7 rded6ddd 4 4 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> 5 5 <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> 6 <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> 6 7 <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> 8 <!ENTITY sep '" "'> 7 9 ]> 8 10 9 <!-- Version 0. 8.0- Manuel Canales Esparcia <macana@lfs-es.org> -->11 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> 10 12 11 13 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 13 15 version="1.0"> 14 16 15 <!--Index Stuff--> 16 17 <!--Only one column to fit the targets titles--> 18 <xsl:param name="column.count.index" select="1"></xsl:param> 17 <!--Only one column to fit the table layout--> 18 <xsl:param name="column.count.index" select="1"/> 19 19 20 20 <!--Title--> 21 21 <xsl:template match="index" mode="title.markup"> 22 <xsl:param name="allow-anchors" select="0"/>23 22 <xsl:text>Index of packages and important installed files</xsl:text> 24 23 </xsl:template> … … 39 38 <xsl:when test="$divtitle = 'A'"> 40 39 <xsl:text>Packages</xsl:text> 41 </xsl:when>42 <xsl:when test="$divtitle = 'B'">43 <xsl:text>Programs</xsl:text>44 </xsl:when>45 <xsl:when test="$divtitle = 'C'">46 <xsl:text>Libraries</xsl:text>47 </xsl:when>48 <xsl:when test="$divtitle = 'D'">49 <xsl:text>Scripts</xsl:text>50 </xsl:when>51 <xsl:when test="$divtitle = 'E'">52 <xsl:text>Others</xsl:text>53 </xsl:when>54 <xsl:otherwise>55 <xsl:value-of select="$divtitle"/>56 </xsl:otherwise>57 </xsl:choose>40 </xsl:when> 41 <xsl:when test="$divtitle = 'B'"> 42 <xsl:text>Programs</xsl:text> 43 </xsl:when> 44 <xsl:when test="$divtitle = 'C'"> 45 <xsl:text>Libraries</xsl:text> 46 </xsl:when> 47 <xsl:when test="$divtitle = 'D'"> 48 <xsl:text>Scripts</xsl:text> 49 </xsl:when> 50 <xsl:when test="$divtitle = 'E'"> 51 <xsl:text>Others</xsl:text> 52 </xsl:when> 53 <xsl:otherwise> 54 <xsl:value-of select="$divtitle"/> 55 </xsl:otherwise> 56 </xsl:choose> 58 57 </xsl:with-param> 59 58 </xsl:call-template> 60 59 </xsl:if> 61 <fo:block> 62 <xsl:apply-templates select="key('letter', $key)[&scope;] 63 [count(.|key('primary', &primary;)[&scope;][1])=1]" 64 mode="index-primary"> 65 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 66 <xsl:with-param name="scope" select="$scope"/> 67 </xsl:apply-templates> 68 </fo:block> 60 <fo:table table-layout="fixed" width="100%"> 61 <fo:table-column column-number="1" column-width="11em"/> 62 <fo:table-column column-number="2" column-width="19em"/> 63 <fo:table-column column-number="3"/> 64 <fo:table-body> 65 <xsl:apply-templates select="key('letter', $key)[&scope;] 66 [count(.|key('primary', &primary;)[&scope;][1])=1]" 67 mode="index-primary"> 68 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> 69 <xsl:with-param name="scope" select="$scope"/> 70 </xsl:apply-templates> 71 </fo:table-body> 72 </fo:table> 69 73 </fo:block> 70 74 </xsl:if> 71 75 </xsl:template> 72 76 73 <!-- The separator-->77 <!-- Dropping the separator from here --> 74 78 <xsl:template match="indexterm" mode="reference"> 75 79 <xsl:param name="scope" select="."/> 76 <xsl:text>: </xsl:text>77 80 <xsl:call-template name="reference"> 78 81 <xsl:with-param name="zones" select="normalize-space(@zone)"/> 79 82 <xsl:with-param name="scope" select="$scope"/> 80 83 </xsl:call-template> 84 </xsl:template> 85 86 <!-- Changing the output tags and re-addind the separator--> 87 <xsl:template match="indexterm" mode="index-primary"> 88 <xsl:param name="scope" select="."/> 89 <xsl:variable name="key" select="&primary;"/> 90 <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> 91 <fo:table-row> 92 <fo:table-cell> 93 <fo:block> 94 <xsl:value-of select="primary"/> 95 <xsl:text>: </xsl:text> 96 </fo:block> 97 </fo:table-cell> 98 <xsl:for-each select="$refs[not(see) and not(seealso) 99 and not(secondary)]"> 100 <xsl:apply-templates select="." mode="reference"> 101 <xsl:with-param name="scope" select="$scope"/> 102 </xsl:apply-templates> 103 </xsl:for-each> 104 </fo:table-row> 105 <xsl:if test="$refs/secondary"> 106 <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', 107 concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> 108 <xsl:with-param name="scope" select="$scope"/> 109 <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> 110 </xsl:apply-templates> 111 </xsl:if> 112 </xsl:template> 113 114 <xsl:template match="indexterm" mode="index-secondary"> 115 <xsl:param name="scope" select="."/> 116 <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> 117 <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> 118 <fo:table-row> 119 <fo:table-cell> 120 <fo:block start-indent="1pc"> 121 <xsl:value-of select="secondary"/> 122 <xsl:text>: </xsl:text> 123 </fo:block> 124 </fo:table-cell> 125 <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]"> 126 <xsl:apply-templates select="." mode="reference"> 127 <xsl:with-param name="scope" select="$scope"/> 128 </xsl:apply-templates> 129 </xsl:for-each> 130 </fo:table-row> 81 131 </xsl:template> 82 132 … … 101 151 </xsl:call-template> 102 152 </xsl:variable> 103 <fo:basic-link internal-destination="{$id}"> 104 <xsl:value-of select="$target/title"/> 105 <xsl:apply-templates select="$target" mode="page.citation"> 106 <xsl:with-param name="id" select="$id"/> 107 </xsl:apply-templates> 108 </fo:basic-link> 109 <xsl:text>, </xsl:text> 110 <fo:basic-link internal-destination="{$id2}"> 111 <xsl:text>description</xsl:text> 112 <xsl:apply-templates select="$target2" mode="page.citation"> 113 <xsl:with-param name="id" select="$id2"/> 114 </xsl:apply-templates> 115 </fo:basic-link> 153 <fo:table-cell> 154 <fo:block> 155 <fo:basic-link internal-destination="{$id}"> 156 <xsl:value-of select="$target/title"/> 157 <xsl:apply-templates select="$target" mode="page.citation"> 158 <xsl:with-param name="id" select="$id"/> 159 </xsl:apply-templates> 160 </fo:basic-link> 161 </fo:block> 162 </fo:table-cell> 163 <fo:table-cell> 164 <fo:block> 165 <fo:basic-link internal-destination="{$id2}"> 166 <xsl:text>description</xsl:text> 167 <xsl:apply-templates select="$target2" mode="page.citation"> 168 <xsl:with-param name="id" select="$id2"/> 169 </xsl:apply-templates> 170 </fo:basic-link> 171 </fo:block> 172 </fo:table-cell> 116 173 </xsl:when> 117 174 <xsl:otherwise> … … 123 180 </xsl:call-template> 124 181 </xsl:variable> 125 <fo:basic-link internal-destination="{$id}"> 126 <xsl:value-of select="$target/title"/> 127 <xsl:apply-templates select="$target" mode="page.citation"> 128 <xsl:with-param name="id" select="$id"/> 129 </xsl:apply-templates> 130 </fo:basic-link> 182 <fo:table-cell> 183 <fo:block> 184 <fo:basic-link internal-destination="{$id}"> 185 <xsl:value-of select="$target/title"/> 186 <xsl:apply-templates select="$target" mode="page.citation"> 187 <xsl:with-param name="id" select="$id"/> 188 </xsl:apply-templates> 189 </fo:basic-link> 190 </fo:block> 191 </fo:table-cell> 131 192 </xsl:otherwise> 132 193 </xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.