| 1 |
<?xml version='1.0'?> |
| 2 |
|
| 3 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
| 4 |
|
| 5 |
<xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl"/> |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
<xsl:param name="generate.consistent.ids" select="1"/> |
| 16 |
|
| 17 |
|
| 18 |
<xsl:template match="citerefentry[not(@project)]"> |
| 19 |
<a> |
| 20 |
<xsl:attribute name="href"> |
| 21 |
<xsl:value-of select="refentrytitle"/><xsl:text>.html#</xsl:text> |
| 22 |
<xsl:value-of select="refentrytitle/@target"/> |
| 23 |
</xsl:attribute> |
| 24 |
<xsl:call-template name="inline.charseq"/> |
| 25 |
</a> |
| 26 |
</xsl:template> |
| 27 |
|
| 28 |
<xsl:template match="citerefentry[@project='man-pages'] | citerefentry[manvolnum='2'] | citerefentry[manvolnum='4']"> |
| 29 |
<a> |
| 30 |
<xsl:attribute name="href"> |
| 31 |
<xsl:text>http://man7.org/linux/man-pages/man</xsl:text> |
| 32 |
<xsl:value-of select="manvolnum"/> |
| 33 |
<xsl:text>/</xsl:text> |
| 34 |
<xsl:value-of select="refentrytitle"/> |
| 35 |
<xsl:text>.</xsl:text> |
| 36 |
<xsl:value-of select="manvolnum"/> |
| 37 |
<xsl:text>.html</xsl:text> |
| 38 |
</xsl:attribute> |
| 39 |
<xsl:call-template name="inline.charseq"/> |
| 40 |
</a> |
| 41 |
</xsl:template> |
| 42 |
|
| 43 |
<xsl:template match="citerefentry[@project='die-net']"> |
| 44 |
<a> |
| 45 |
<xsl:attribute name="href"> |
| 46 |
<xsl:text>http://linux.die.net/man/</xsl:text> |
| 47 |
<xsl:value-of select="manvolnum"/> |
| 48 |
<xsl:text>/</xsl:text> |
| 49 |
<xsl:value-of select="refentrytitle"/> |
| 50 |
</xsl:attribute> |
| 51 |
<xsl:call-template name="inline.charseq"/> |
| 52 |
</a> |
| 53 |
</xsl:template> |
| 54 |
|
| 55 |
<xsl:template match="citerefentry[@project='mankier']"> |
| 56 |
<a> |
| 57 |
<xsl:attribute name="href"> |
| 58 |
<xsl:text>https://www.mankier.com/</xsl:text> |
| 59 |
<xsl:value-of select="manvolnum"/> |
| 60 |
<xsl:text>/</xsl:text> |
| 61 |
<xsl:value-of select="refentrytitle"/> |
| 62 |
</xsl:attribute> |
| 63 |
<xsl:call-template name="inline.charseq"/> |
| 64 |
</a> |
| 65 |
</xsl:template> |
| 66 |
|
| 67 |
<xsl:template match="citerefentry[@project='archlinux']"> |
| 68 |
<a> |
| 69 |
<xsl:attribute name="href"> |
| 70 |
<xsl:text>https://www.archlinux.org/</xsl:text> |
| 71 |
<xsl:value-of select="refentrytitle"/> |
| 72 |
<xsl:text>/</xsl:text> |
| 73 |
<xsl:value-of select="refentrytitle"/> |
| 74 |
<xsl:text>.</xsl:text> |
| 75 |
<xsl:value-of select="manvolnum"/> |
| 76 |
<xsl:text>.html</xsl:text> |
| 77 |
</xsl:attribute> |
| 78 |
<xsl:call-template name="inline.charseq"/> |
| 79 |
</a> |
| 80 |
</xsl:template> |
| 81 |
|
| 82 |
<xsl:template match="citerefentry[@project='freebsd']"> |
| 83 |
<a> |
| 84 |
<xsl:attribute name="href"> |
| 85 |
<xsl:text>https://www.freebsd.org/cgi/man.cgi?</xsl:text> |
| 86 |
<xsl:value-of select="refentrytitle"/> |
| 87 |
<xsl:text>(</xsl:text> |
| 88 |
<xsl:value-of select="manvolnum"/> |
| 89 |
<xsl:text>)</xsl:text> |
| 90 |
</xsl:attribute> |
| 91 |
<xsl:call-template name="inline.charseq"/> |
| 92 |
</a> |
| 93 |
</xsl:template> |
| 94 |
|
| 95 |
<xsl:template match="citerefentry[@project='dbus']"> |
| 96 |
<a> |
| 97 |
<xsl:attribute name="href"> |
| 98 |
<xsl:text>http://dbus.freedesktop.org/doc/</xsl:text> |
| 99 |
<xsl:value-of select="refentrytitle"/> |
| 100 |
<xsl:text>.</xsl:text> |
| 101 |
<xsl:value-of select="manvolnum"/> |
| 102 |
<xsl:text>.html</xsl:text> |
| 103 |
</xsl:attribute> |
| 104 |
<xsl:call-template name="inline.charseq"/> |
| 105 |
</a> |
| 106 |
</xsl:template> |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
<xsl:template name="generateID"> |
| 121 |
|
| 122 |
<xsl:param name="keyNode"/> |
| 123 |
|
| 124 |
<xsl:param name="templateID"/> |
| 125 |
<xsl:variable name="conflictSource" select="preceding::refsect1/title|preceding::refsect1/info/title| |
| 126 |
preceding::refsect2/title|preceding::refsect2/info/title| |
| 127 |
preceding::varlistentry/term[1]"/> |
| 128 |
<xsl:variable name="conflictCount" select="count($conflictSource[. = $keyNode])"/> |
| 129 |
<xsl:choose> |
| 130 |
|
| 131 |
<xsl:when test="$conflictCount = 0"> |
| 132 |
<xsl:value-of select="$templateID"/> |
| 133 |
</xsl:when> |
| 134 |
<xsl:otherwise> |
| 135 |
<xsl:value-of select="concat($templateID, $conflictCount)"/> |
| 136 |
</xsl:otherwise> |
| 137 |
</xsl:choose> |
| 138 |
</xsl:template> |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
<xsl:template name="permalink"> |
| 145 |
<xsl:param name="nodeType"/> |
| 146 |
<xsl:param name="nodeContent"/> |
| 147 |
<xsl:param name="linkTitle"/> |
| 148 |
|
| 149 |
|
| 150 |
<xsl:param name="keyNode"/> |
| 151 |
<xsl:param name="templateID"/> |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
<xsl:variable name="generatedID"> |
| 160 |
<xsl:call-template name="generateID"> |
| 161 |
<xsl:with-param name="keyNode" select="$keyNode"/> |
| 162 |
<xsl:with-param name="templateID" select="$templateID"/> |
| 163 |
</xsl:call-template> |
| 164 |
</xsl:variable> |
| 165 |
|
| 166 |
<xsl:element name="{$nodeType}"> |
| 167 |
<xsl:attribute name="id"> |
| 168 |
<xsl:value-of select="$generatedID"/> |
| 169 |
</xsl:attribute> |
| 170 |
<xsl:apply-templates select="$nodeContent"/> |
| 171 |
<a class="headerlink" title="{$linkTitle}" href="#{$generatedID}">¶</a> |
| 172 |
</xsl:element> |
| 173 |
</xsl:template> |
| 174 |
|
| 175 |
|
| 176 |
<xsl:template name="headerlink"> |
| 177 |
<xsl:param name="nodeType"/> |
| 178 |
<xsl:call-template name="permalink"> |
| 179 |
<xsl:with-param name="nodeType" select="$nodeType"/> |
| 180 |
<xsl:with-param name="linkTitle" select="'Permalink to this headline'"/> |
| 181 |
<xsl:with-param name="nodeContent" select="node()"/> |
| 182 |
<xsl:with-param name="keyNode" select="."/> |
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
<xsl:with-param name="templateID"> |
| 189 |
<xsl:call-template name="inline.charseq"/> |
| 190 |
</xsl:with-param> |
| 191 |
</xsl:call-template> |
| 192 |
</xsl:template> |
| 193 |
|
| 194 |
<xsl:template match="refsect1/title|refsect1/info/title"> |
| 195 |
|
| 196 |
<xsl:call-template name="headerlink"> |
| 197 |
<xsl:with-param name="nodeType" select="'h2'"/> |
| 198 |
</xsl:call-template> |
| 199 |
</xsl:template> |
| 200 |
|
| 201 |
<xsl:template match="refsect2/title|refsect2/info/title"> |
| 202 |
<xsl:call-template name="headerlink"> |
| 203 |
<xsl:with-param name="nodeType" select="'h3'"/> |
| 204 |
</xsl:call-template> |
| 205 |
</xsl:template> |
| 206 |
|
| 207 |
<xsl:template match="varlistentry"> |
| 208 |
<xsl:call-template name="permalink"> |
| 209 |
<xsl:with-param name="nodeType" select="'dt'"/> |
| 210 |
<xsl:with-param name="linkTitle" select="'Permalink to this term'"/> |
| 211 |
<xsl:with-param name="nodeContent" select="term"/> |
| 212 |
<xsl:with-param name="keyNode" select="term[1]"/> |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
<xsl:with-param name="templateID"> |
| 219 |
<xsl:call-template name="inline.charseq"> |
| 220 |
<xsl:with-param name="content" select="term[1]"/> |
| 221 |
</xsl:call-template> |
| 222 |
</xsl:with-param> |
| 223 |
</xsl:call-template> |
| 224 |
<dd> |
| 225 |
<xsl:apply-templates select="listitem"/> |
| 226 |
</dd> |
| 227 |
</xsl:template> |
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
<xsl:template name="user.header.content"> |
| 232 |
<style> |
| 233 |
a.headerlink { |
| 234 |
color: #c60f0f; |
| 235 |
font-size: 0.8em; |
| 236 |
padding: 0 4px 0 4px; |
| 237 |
text-decoration: none; |
| 238 |
visibility: hidden; |
| 239 |
} |
| 240 |
|
| 241 |
a.headerlink:hover { |
| 242 |
background-color: #c60f0f; |
| 243 |
color: white; |
| 244 |
} |
| 245 |
|
| 246 |
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { |
| 247 |
visibility: visible; |
| 248 |
} |
| 249 |
</style> |
| 250 |
|
| 251 |
<a> |
| 252 |
<xsl:attribute name="href"> |
| 253 |
<xsl:text>index.html</xsl:text> |
| 254 |
</xsl:attribute> |
| 255 |
<xsl:text>Index </xsl:text> |
| 256 |
</a>· |
| 257 |
<a> |
| 258 |
<xsl:attribute name="href"> |
| 259 |
<xsl:text>iputils.directives.html</xsl:text> |
| 260 |
</xsl:attribute> |
| 261 |
<xsl:text>Directives </xsl:text> |
| 262 |
</a> |
| 263 |
|
| 264 |
<span style="float:right"> |
| 265 |
<xsl:text>iputils </xsl:text> |
| 266 |
<xsl:value-of select="$iputils.version"/> |
| 267 |
</span> |
| 268 |
<hr/> |
| 269 |
</xsl:template> |
| 270 |
|
| 271 |
<xsl:template match="literal"> |
| 272 |
<xsl:text>"</xsl:text> |
| 273 |
<xsl:call-template name="inline.monoseq"/> |
| 274 |
<xsl:text>"</xsl:text> |
| 275 |
</xsl:template> |
| 276 |
|
| 277 |
<xsl:output method="html" encoding="UTF-8" indent="no"/> |
| 278 |
|
| 279 |
</xsl:stylesheet> |