| 1 |
<?xml version='1.0'?> |
| 2 |
|
| 3 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" |
| 4 |
xmlns:exsl="http://exslt.org/common" |
| 5 |
version="1.0" |
| 6 |
exclude-result-prefixes="exsl"> |
| 7 |
|
| 8 |
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/> |
| 9 |
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/> |
| 10 |
|
| 11 |
<xsl:include href="defaults.xsl"/> |
| 12 |
<xsl:include href="xhtml-common.xsl"/> |
| 13 |
|
| 14 |
<xsl:param name="generate.legalnotice.link" select="0"/> |
| 15 |
<xsl:param name="generate.revhistory.link" select="0"/> |
| 16 |
|
| 17 |
<xsl:param name="chunk.section.depth" select="4"/> |
| 18 |
<!-- caused issues with each subsection being its own page |
| 19 |
<xsl:param name="chunk.first.sections" select="1"/>--> |
| 20 |
<xsl:param name="chunk.toc" select="''"/> |
| 21 |
<xsl:param name="chunk.append"/> |
| 22 |
<xsl:param name="chunker.output.quiet" select="0"/> |
| 23 |
|
| 24 |
<xsl:param name="refentry.separator" select="1"/> |
| 25 |
<xsl:param name="suppress.footer.navigation"><xsl:value-of select="$embedtoc"/></xsl:param> |
| 26 |
|
| 27 |
<!-- |
| 28 |
From: xsl/docbook/1.72.0/xhtml/chunk-code.xsl |
| 29 |
Reason: remove inline css from hr |
| 30 |
Version: 1.72.0 |
| 31 |
--> |
| 32 |
<xsl:template name="process.footnotes"> |
| 33 |
<xsl:variable name="footnotes" select=".//footnote"/> |
| 34 |
<xsl:variable name="fcount"> |
| 35 |
<xsl:call-template name="count.footnotes.in.this.chunk"> |
| 36 |
<xsl:with-param name="node" select="."/> |
| 37 |
<xsl:with-param name="footnotes" select="$footnotes"/> |
| 38 |
</xsl:call-template> |
| 39 |
</xsl:variable> |
| 40 |
|
| 41 |
<!-- |
| 42 |
<xsl:message> |
| 43 |
<xsl:value-of select="name(.)"/> |
| 44 |
<xsl:text> fcount: </xsl:text> |
| 45 |
<xsl:value-of select="$fcount"/> |
| 46 |
</xsl:message> |
| 47 |
--> |
| 48 |
|
| 49 |
<!-- Only bother to do this if there's at least one non-table footnote --> |
| 50 |
<xsl:if test="$fcount > 0"> |
| 51 |
<div class="footnotes" xmlns="http://www.w3.org/1999/xhtml"> |
| 52 |
<br/> |
| 53 |
<hr/> |
| 54 |
<xsl:call-template name="process.footnotes.in.this.chunk"> |
| 55 |
<xsl:with-param name="node" select="."/> |
| 56 |
<xsl:with-param name="footnotes" select="$footnotes"/> |
| 57 |
</xsl:call-template> |
| 58 |
</div> |
| 59 |
</xsl:if> |
| 60 |
|
| 61 |
<!-- FIXME: When chunking, only the annotations actually used |
| 62 |
in this chunk should be referenced. I don't think it |
| 63 |
does any harm to reference them all, but it adds |
| 64 |
unnecessary bloat to each chunk. --> |
| 65 |
<xsl:if test="$annotation.support != 0 and //annotation"> |
| 66 |
<div class="annotation-list"> |
| 67 |
<div class="annotation-nocss"> |
| 68 |
<p>The following annotations are from this essay. You are seeing |
| 69 |
them here because your browser doesn’t support the user-interface |
| 70 |
techniques used to make them appear as ‘popups’ on modern browsers.</p> |
| 71 |
</div> |
| 72 |
|
| 73 |
<xsl:apply-templates select="//annotation" mode="annotation-popup"/> |
| 74 |
</div> |
| 75 |
</xsl:if> |
| 76 |
</xsl:template> |
| 77 |
<!-- |
| 78 |
From: xhtml/chunk-common.xsl |
| 79 |
Reason: remove tables, truncate link text |
| 80 |
Version: |
| 81 |
--> |
| 82 |
<xsl:template name="header.navigation"> |
| 83 |
<xsl:param name="prev" select="/foo"/> |
| 84 |
<xsl:param name="next" select="/foo"/> |
| 85 |
<xsl:param name="nav.context"/> |
| 86 |
<xsl:variable name="home" select="/*[1]"/> |
| 87 |
<xsl:variable name="up" select="parent::*"/> |
| 88 |
<xsl:variable name="row1" select="$navig.showtitles != 0"/> |
| 89 |
<xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/> |
| 90 |
<xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'"> |
| 91 |
<xsl:if test="$row1 or $row2"> |
| 92 |
<xsl:if test="$row1"> |
| 93 |
<p xmlns="http://www.w3.org/1999/xhtml"> |
| 94 |
<xsl:attribute name="id"> |
| 95 |
<xsl:text>title</xsl:text> |
| 96 |
</xsl:attribute> |
| 97 |
<!--<a class="left"> |
| 98 |
<xsl:attribute name="href"> |
| 99 |
<xsl:value-of select="$prod.url"/> |
| 100 |
</xsl:attribute> |
| 101 |
<img alt="Product Site"> |
| 102 |
<xsl:attribute name="src"> |
| 103 |
<xsl:value-of select="$admon.graphics.path"/><xsl:text>/image_left.svg</xsl:text> |
| 104 |
</xsl:attribute> |
| 105 |
</img> |
| 106 |
</a> --> |
| 107 |
<!-- <a class="right"> |
| 108 |
<xsl:attribute name="href"> |
| 109 |
<xsl:value-of select="$doc.url"/> |
| 110 |
</xsl:attribute> |
| 111 |
<img alt="Documentation Site"> |
| 112 |
<xsl:attribute name="src"> |
| 113 |
<xsl:value-of select="$admon.graphics.path"/><xsl:text>/image_right.png</xsl:text> |
| 114 |
</xsl:attribute> |
| 115 |
</img> |
| 116 |
</a> --> |
| 117 |
</p> |
| 118 |
</xsl:if> |
| 119 |
<xsl:if test="$row2"> |
| 120 |
<ul class="docnav top" xmlns="http://www.w3.org/1999/xhtml"> |
| 121 |
<li class="previous"> |
| 122 |
<xsl:if test="count($prev)>0"> |
| 123 |
<a accesskey="p"> |
| 124 |
<xsl:attribute name="href"> |
| 125 |
<xsl:call-template name="href.target"> |
| 126 |
<xsl:with-param name="object" select="$prev"/> |
| 127 |
</xsl:call-template> |
| 128 |
</xsl:attribute> |
| 129 |
<strong> |
| 130 |
<xsl:call-template name="navig.content"> |
| 131 |
<xsl:with-param name="direction" select="'prev'"/> |
| 132 |
</xsl:call-template> |
| 133 |
</strong> |
| 134 |
</a> |
| 135 |
</xsl:if> |
| 136 |
</li> |
| 137 |
<li class="home">SystemTap Beginners Guide</li> |
| 138 |
<li class="next"> |
| 139 |
<xsl:if test="count($next)>0"> |
| 140 |
<a accesskey="n"> |
| 141 |
<xsl:attribute name="href"> |
| 142 |
<xsl:call-template name="href.target"> |
| 143 |
<xsl:with-param name="object" select="$next"/> |
| 144 |
</xsl:call-template> |
| 145 |
</xsl:attribute> |
| 146 |
<strong> |
| 147 |
<xsl:call-template name="navig.content"> |
| 148 |
<xsl:with-param name="direction" select="'next'"/> |
| 149 |
</xsl:call-template> |
| 150 |
</strong> |
| 151 |
</a> |
| 152 |
</xsl:if> |
| 153 |
</li> |
| 154 |
</ul> |
| 155 |
</xsl:if> |
| 156 |
</xsl:if> |
| 157 |
<xsl:if test="$header.rule != 0"> |
| 158 |
<hr/> |
| 159 |
</xsl:if> |
| 160 |
</xsl:if> |
| 161 |
</xsl:template> |
| 162 |
|
| 163 |
<!-- |
| 164 |
From: xhtml/chunk-common.xsl |
| 165 |
Reason: remove tables, truncate link text |
| 166 |
Version: |
| 167 |
--> |
| 168 |
<xsl:template name="footer.navigation"> |
| 169 |
<xsl:param name="prev" select="/foo"/> |
| 170 |
<xsl:param name="next" select="/foo"/> |
| 171 |
<xsl:param name="nav.context"/> |
| 172 |
<xsl:param name="title-limit" select="'50'"/> |
| 173 |
<xsl:variable name="home" select="/*[1]"/> |
| 174 |
<xsl:variable name="up" select="parent::*"/> |
| 175 |
<xsl:variable name="row1" select="count($prev) > 0 or count($up) > 0 or count($next) > 0"/> |
| 176 |
<xsl:variable name="row2" select="($prev and $navig.showtitles != 0) or (generate-id($home) != generate-id(.) or $nav.context = 'toc') or ($chunk.tocs.and.lots != 0 and $nav.context != 'toc') or ($next and $navig.showtitles != 0)"/> |
| 177 |
|
| 178 |
<xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'"> |
| 179 |
<xsl:if test="$footer.rule != 0"> |
| 180 |
<hr/> |
| 181 |
</xsl:if> |
| 182 |
<xsl:if test="$row1 or $row2"> |
| 183 |
<ul class="docnav" xmlns="http://www.w3.org/1999/xhtml"> |
| 184 |
<xsl:if test="$row1"> |
| 185 |
<li class="previous"> |
| 186 |
<xsl:if test="count($prev) > 0"> |
| 187 |
<a accesskey="p"> |
| 188 |
<xsl:attribute name="href"> |
| 189 |
<xsl:call-template name="href.target"> |
| 190 |
<xsl:with-param name="object" select="$prev"/> |
| 191 |
</xsl:call-template> |
| 192 |
</xsl:attribute> |
| 193 |
<strong> |
| 194 |
<xsl:call-template name="navig.content"> |
| 195 |
<xsl:with-param name="direction" select="'prev'"/> |
| 196 |
</xsl:call-template> |
| 197 |
</strong> |
| 198 |
<xsl:variable name="text"> |
| 199 |
<xsl:apply-templates select="$prev" mode="object.title.markup"/> |
| 200 |
</xsl:variable> |
| 201 |
<xsl:choose> |
| 202 |
<xsl:when test="string-length($text) > $title-limit"> |
| 203 |
<xsl:value-of select="concat(substring($text, 0, $title-limit), '...')"/> |
| 204 |
</xsl:when> |
| 205 |
<xsl:otherwise> |
| 206 |
<xsl:value-of select="$text"/> |
| 207 |
</xsl:otherwise> |
| 208 |
</xsl:choose> |
| 209 |
</a> |
| 210 |
</xsl:if> |
| 211 |
</li> |
| 212 |
<xsl:if test="count($up) > 0"> |
| 213 |
<li class="up"> |
| 214 |
<a accesskey="u"> |
| 215 |
<xsl:attribute name="href"> |
| 216 |
<xsl:text>#</xsl:text> |
| 217 |
</xsl:attribute> |
| 218 |
<strong> |
| 219 |
<xsl:call-template name="navig.content"> |
| 220 |
<xsl:with-param name="direction" select="'up'"/> |
| 221 |
</xsl:call-template> |
| 222 |
</strong> |
| 223 |
</a> |
| 224 |
</li> |
| 225 |
</xsl:if> |
| 226 |
<xsl:if test="$home != . or $nav.context = 'toc'"> |
| 227 |
<li class="home"> |
| 228 |
<a accesskey="h"> |
| 229 |
<xsl:attribute name="href"> |
| 230 |
<xsl:call-template name="href.target"> |
| 231 |
<xsl:with-param name="object" select="$home"/> |
| 232 |
</xsl:call-template> |
| 233 |
</xsl:attribute> |
| 234 |
<strong> |
| 235 |
<xsl:call-template name="navig.content"> |
| 236 |
<xsl:with-param name="direction" select="'home'"/> |
| 237 |
</xsl:call-template> |
| 238 |
</strong> |
| 239 |
</a> |
| 240 |
</li> |
| 241 |
</xsl:if> |
| 242 |
<xsl:if test="count($next)>0"> |
| 243 |
<li class="next"> |
| 244 |
<a accesskey="n"> |
| 245 |
<xsl:attribute name="href"> |
| 246 |
<xsl:call-template name="href.target"> |
| 247 |
<xsl:with-param name="object" select="$next"/> |
| 248 |
</xsl:call-template> |
| 249 |
</xsl:attribute> |
| 250 |
<strong> |
| 251 |
<xsl:call-template name="navig.content"> |
| 252 |
<xsl:with-param name="direction" select="'next'"/> |
| 253 |
</xsl:call-template> |
| 254 |
</strong> |
| 255 |
<xsl:variable name="text"> |
| 256 |
<xsl:apply-templates select="$next" mode="object.title.markup"/> |
| 257 |
</xsl:variable> |
| 258 |
<xsl:choose> |
| 259 |
<xsl:when test="string-length($text) > $title-limit"> |
| 260 |
<xsl:value-of select="concat(substring($text, 0, $title-limit),'...')"/> |
| 261 |
</xsl:when> |
| 262 |
<xsl:otherwise> |
| 263 |
<xsl:value-of select="$text"/> |
| 264 |
</xsl:otherwise> |
| 265 |
</xsl:choose> |
| 266 |
</a> |
| 267 |
</li> |
| 268 |
</xsl:if> |
| 269 |
</xsl:if> |
| 270 |
</ul> |
| 271 |
</xsl:if> |
| 272 |
</xsl:if> |
| 273 |
</xsl:template> |
| 274 |
|
| 275 |
<!-- |
| 276 |
From: xhtml/chunk-common.xsl |
| 277 |
Reason: add TOC div for web site |
| 278 |
Version: |
| 279 |
--> |
| 280 |
<xsl:template name="chunk-element-content"> |
| 281 |
<xsl:param name="prev"/> |
| 282 |
<xsl:param name="next"/> |
| 283 |
<xsl:param name="nav.context"/> |
| 284 |
<xsl:param name="content"> |
| 285 |
<xsl:apply-imports/> |
| 286 |
</xsl:param> |
| 287 |
|
| 288 |
<xsl:call-template name="user.preroot"/> |
| 289 |
|
| 290 |
<html> |
| 291 |
<xsl:call-template name="html.head"> |
| 292 |
<xsl:with-param name="prev" select="$prev"/> |
| 293 |
<xsl:with-param name="next" select="$next"/> |
| 294 |
</xsl:call-template> |
| 295 |
|
| 296 |
<body> |
| 297 |
<xsl:call-template name="body.attributes"/> |
| 298 |
<xsl:if test="$embedtoc != 0"> |
| 299 |
<div id="navigation"></div> |
| 300 |
<div id="floatingtoc" class="hidden"></div> |
| 301 |
</xsl:if> |
| 302 |
<xsl:call-template name="user.header.navigation"/> |
| 303 |
<xsl:call-template name="header.navigation"> |
| 304 |
<xsl:with-param name="prev" select="$prev"/> |
| 305 |
<xsl:with-param name="next" select="$next"/> |
| 306 |
<xsl:with-param name="nav.context" select="$nav.context"/> |
| 307 |
</xsl:call-template> |
| 308 |
|
| 309 |
<xsl:call-template name="user.header.content"/> |
| 310 |
|
| 311 |
<xsl:copy-of select="$content"/> |
| 312 |
|
| 313 |
<xsl:call-template name="user.footer.content"/> |
| 314 |
|
| 315 |
<xsl:call-template name="footer.navigation"> |
| 316 |
<xsl:with-param name="prev" select="$prev"/> |
| 317 |
<xsl:with-param name="next" select="$next"/> |
| 318 |
<xsl:with-param name="nav.context" select="$nav.context"/> |
| 319 |
</xsl:call-template> |
| 320 |
|
| 321 |
<xsl:call-template name="user.footer.navigation"/> |
| 322 |
</body> |
| 323 |
</html> |
| 324 |
<xsl:value-of select="$chunk.append"/> |
| 325 |
</xsl:template> |
| 326 |
|
| 327 |
</xsl:stylesheet> |