[2] | 1 | <?xml version="1.0" encoding="US-ASCII"?>
|
---|
| 2 | <!--This file was created automatically by xsl2profile-->
|
---|
| 3 | <!--from the DocBook XSL stylesheets. Do not edit this file.-->
|
---|
| 4 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:exsl="http://exslt.org/common" xmlns:set="http://exslt.org/sets" xmlns:h="urn:x-hex" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="doc exsl set h exslt">
|
---|
| 5 |
|
---|
| 6 | <!-- ********************************************************************
|
---|
| 7 | $Id: htmlhelp-common.xsl,v 1.31 2005/06/21 07:50:58 kosek Exp $
|
---|
| 8 | ******************************************************************** -->
|
---|
| 9 |
|
---|
| 10 | <!-- ==================================================================== -->
|
---|
| 11 | <!-- Customizations of standard HTML stylesheet parameters -->
|
---|
| 12 |
|
---|
| 13 | <!-- no navigation on pages by default, HTML Help provides its own navigation controls -->
|
---|
| 14 | <xsl:param name="suppress.navigation" select="1"/>
|
---|
| 15 |
|
---|
| 16 | <!-- no separate HTML page with index, index is built inside CHM index pane -->
|
---|
| 17 | <xsl:param name="generate.index" select="0"/>
|
---|
| 18 |
|
---|
| 19 | <!-- ==================================================================== -->
|
---|
| 20 |
|
---|
| 21 | <xsl:variable name="htmlhelp.generate.index" select="//indexterm[1]"/>
|
---|
| 22 |
|
---|
| 23 | <!-- Set up HTML Help flag -->
|
---|
| 24 | <xsl:variable name="htmlhelp.output" select="1"/>
|
---|
| 25 |
|
---|
| 26 | <xsl:variable name="raw.help.title">
|
---|
| 27 | <xsl:choose>
|
---|
| 28 | <xsl:when test="$htmlhelp.title = ''">
|
---|
| 29 | <xsl:choose>
|
---|
| 30 | <xsl:when test="$rootid != ''">
|
---|
| 31 | <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/>
|
---|
| 32 | </xsl:when>
|
---|
| 33 | <xsl:otherwise>
|
---|
| 34 | <xsl:apply-templates select="/*" mode="title.markup"/>
|
---|
| 35 | </xsl:otherwise>
|
---|
| 36 | </xsl:choose>
|
---|
| 37 | </xsl:when>
|
---|
| 38 | <xsl:otherwise>
|
---|
| 39 | <xsl:value-of select="$htmlhelp.title"/>
|
---|
| 40 | </xsl:otherwise>
|
---|
| 41 | </xsl:choose>
|
---|
| 42 | </xsl:variable>
|
---|
| 43 |
|
---|
| 44 | <xsl:variable name="help.title" select="normalize-space($raw.help.title)"/>
|
---|
| 45 |
|
---|
| 46 | <!-- ==================================================================== -->
|
---|
| 47 |
|
---|
| 48 | <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
|
---|
| 49 | <xsl:if test="$htmlhelp.only != 1">
|
---|
| 50 | <xsl:choose>
|
---|
| 51 | <xsl:when test="$rootid != ''">
|
---|
| 52 | <xsl:choose>
|
---|
| 53 | <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
|
---|
| 54 | <xsl:message terminate="yes">
|
---|
| 55 | <xsl:text>ID '</xsl:text>
|
---|
| 56 | <xsl:value-of select="$rootid"/>
|
---|
| 57 | <xsl:text>' not found in document.</xsl:text>
|
---|
| 58 | </xsl:message>
|
---|
| 59 | </xsl:when>
|
---|
| 60 | <xsl:otherwise>
|
---|
| 61 | <xsl:message>Formatting from <xsl:value-of select="$rootid"/></xsl:message>
|
---|
| 62 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
|
---|
| 63 | </xsl:otherwise>
|
---|
| 64 | </xsl:choose>
|
---|
| 65 | </xsl:when>
|
---|
| 66 | <xsl:otherwise>
|
---|
| 67 | <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
|
---|
| 68 | </xsl:otherwise>
|
---|
| 69 | </xsl:choose>
|
---|
| 70 | </xsl:if>
|
---|
| 71 |
|
---|
| 72 | <xsl:call-template name="hhp"/>
|
---|
| 73 | <xsl:call-template name="hhc"/>
|
---|
| 74 | <xsl:if test="($rootid = '' and //processing-instruction('dbhh')) or ($rootid != '' and $profiled-nodes//*[@id=$rootid]//processing-instruction('dbhh'))">
|
---|
| 75 | <xsl:call-template name="hh-map"/>
|
---|
| 76 | <xsl:call-template name="hh-alias"/>
|
---|
| 77 | </xsl:if>
|
---|
| 78 | <xsl:if test="$htmlhelp.generate.index">
|
---|
| 79 | <xsl:call-template name="hhk"/>
|
---|
| 80 | </xsl:if>
|
---|
| 81 | </xsl:template>
|
---|
| 82 |
|
---|
| 83 | <!-- ==================================================================== -->
|
---|
| 84 |
|
---|
| 85 | <xsl:template name="hhp">
|
---|
| 86 | <xsl:call-template name="write.text.chunk">
|
---|
| 87 | <xsl:with-param name="filename">
|
---|
| 88 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
| 89 | <xsl:value-of select="$base.dir"/>
|
---|
| 90 | </xsl:if>
|
---|
| 91 | <xsl:value-of select="$htmlhelp.hhp"/>
|
---|
| 92 | </xsl:with-param>
|
---|
| 93 | <xsl:with-param name="method" select="'text'"/>
|
---|
| 94 | <xsl:with-param name="content">
|
---|
| 95 | <xsl:call-template name="hhp-main"/>
|
---|
| 96 | </xsl:with-param>
|
---|
| 97 | <xsl:with-param name="encoding" select="$htmlhelp.encoding"/>
|
---|
| 98 | </xsl:call-template>
|
---|
| 99 | </xsl:template>
|
---|
| 100 |
|
---|
| 101 | <!-- ==================================================================== -->
|
---|
| 102 | <xsl:template name="hhp-main"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
|
---|
| 103 | <xsl:variable name="default.topic">
|
---|
| 104 | <xsl:choose>
|
---|
| 105 | <xsl:when test="$htmlhelp.default.topic != ''">
|
---|
| 106 | <xsl:value-of select="$htmlhelp.default.topic"/>
|
---|
| 107 | </xsl:when>
|
---|
| 108 | <xsl:otherwise>
|
---|
| 109 | <xsl:call-template name="make-relative-filename">
|
---|
| 110 | <xsl:with-param name="base.dir">
|
---|
| 111 | <xsl:if test="$manifest.in.base.dir = 0">
|
---|
| 112 | <xsl:value-of select="$base.dir"/>
|
---|
| 113 | </xsl:if>
|
---|
| 114 | </xsl:with-param>
|
---|
| 115 | <xsl:with-param name="base.name">
|
---|
| 116 | <xsl:choose>
|
---|
| 117 | <xsl:when test="$rootid != ''">
|
---|
| 118 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="chunk-filename"/>
|
---|
| 119 | </xsl:when>
|
---|
| 120 | <xsl:otherwise>
|
---|
| 121 | <xsl:apply-templates select="$profiled-nodes" mode="chunk-filename"/>
|
---|
| 122 | </xsl:otherwise>
|
---|
| 123 | </xsl:choose>
|
---|
| 124 | </xsl:with-param>
|
---|
| 125 | </xsl:call-template>
|
---|
| 126 | </xsl:otherwise>
|
---|
| 127 | </xsl:choose>
|
---|
| 128 | </xsl:variable>
|
---|
| 129 | <xsl:variable name="xnavigation">
|
---|
| 130 | <xsl:text>0x</xsl:text>
|
---|
| 131 | <xsl:call-template name="toHex">
|
---|
| 132 | <xsl:with-param name="n" select="9504 + $htmlhelp.show.menu * 65536 + $htmlhelp.show.advanced.search * 131072 + $htmlhelp.show.favorities * 4096 + (1 - $htmlhelp.show.toolbar.text) * 64 + $htmlhelp.remember.window.position * 262144"/>
|
---|
| 133 | </xsl:call-template>
|
---|
| 134 | </xsl:variable>
|
---|
| 135 | <xsl:variable name="xbuttons">
|
---|
| 136 | <xsl:text>0x</xsl:text>
|
---|
| 137 | <xsl:call-template name="toHex">
|
---|
| 138 | <xsl:with-param name="n" select="0 + $htmlhelp.button.hideshow * 2 + $htmlhelp.button.back * 4 + $htmlhelp.button.forward * 8 + $htmlhelp.button.stop * 16 + $htmlhelp.button.refresh * 32 + $htmlhelp.button.home * 64 + $htmlhelp.button.options * 4096 + $htmlhelp.button.print * 8192 + $htmlhelp.button.locate * 2048 + $htmlhelp.button.jump1 * 262144 + $htmlhelp.button.jump2 * 524288 + $htmlhelp.button.next * 2097152 + $htmlhelp.button.prev * 4194304 + $htmlhelp.button.zoom * 1048576"/>
|
---|
| 139 | </xsl:call-template>
|
---|
| 140 | </xsl:variable>
|
---|
| 141 | <xsl:text>[OPTIONS]
|
---|
| 142 | </xsl:text>
|
---|
| 143 | <xsl:if test="$htmlhelp.generate.index">
|
---|
| 144 | <xsl:text>Auto Index=Yes
|
---|
| 145 | </xsl:text></xsl:if>
|
---|
| 146 | <xsl:if test="$htmlhelp.hhc.binary != 0">
|
---|
| 147 | <xsl:text>Binary TOC=Yes
|
---|
| 148 | </xsl:text></xsl:if>
|
---|
| 149 | <xsl:text>Compatibility=1.1 or later
|
---|
| 150 | Compiled file=</xsl:text><xsl:value-of select="$htmlhelp.chm"/><xsl:text>
|
---|
| 151 | Contents file=</xsl:text><xsl:value-of select="$htmlhelp.hhc"/><xsl:text>
|
---|
| 152 | </xsl:text>
|
---|
| 153 | <xsl:if test="$htmlhelp.hhp.window != ''">
|
---|
| 154 | <xsl:text>Default Window=</xsl:text><xsl:value-of select="$htmlhelp.hhp.window"/><xsl:text>
|
---|
| 155 | </xsl:text></xsl:if>
|
---|
| 156 | <xsl:text>Default topic=</xsl:text><xsl:value-of select="$default.topic"/>
|
---|
| 157 | <xsl:text>
|
---|
| 158 | Display compile progress=</xsl:text>
|
---|
| 159 | <xsl:choose>
|
---|
| 160 | <xsl:when test="$htmlhelp.display.progress != 1">
|
---|
| 161 | <xsl:text>No</xsl:text>
|
---|
| 162 | </xsl:when>
|
---|
| 163 | <xsl:otherwise>
|
---|
| 164 | <xsl:text>Yes</xsl:text>
|
---|
| 165 | </xsl:otherwise>
|
---|
| 166 | </xsl:choose>
|
---|
| 167 | <xsl:text>
|
---|
| 168 | Full-text search=Yes
|
---|
| 169 | </xsl:text>
|
---|
| 170 | <xsl:if test="$htmlhelp.generate.index">
|
---|
| 171 | <xsl:text>Index file=</xsl:text><xsl:value-of select="$htmlhelp.hhk"/><xsl:text>
|
---|
| 172 | </xsl:text></xsl:if>
|
---|
| 173 | <xsl:text>Language=</xsl:text>
|
---|
| 174 | <xsl:for-each select="*"> <!-- Change context from / to root element -->
|
---|
| 175 | <xsl:call-template name="gentext.template">
|
---|
| 176 | <xsl:with-param name="context" select="'htmlhelp'"/>
|
---|
| 177 | <xsl:with-param name="name" select="'langcode'"/>
|
---|
| 178 | </xsl:call-template>
|
---|
| 179 | </xsl:for-each>
|
---|
| 180 | <xsl:text>
|
---|
| 181 | Title=</xsl:text>
|
---|
| 182 | <xsl:value-of select="$help.title"/>
|
---|
| 183 | <xsl:text>
|
---|
| 184 | Enhanced decompilation=</xsl:text>
|
---|
| 185 | <xsl:choose>
|
---|
| 186 | <xsl:when test="$htmlhelp.enhanced.decompilation != 0">
|
---|
| 187 | <xsl:text>Yes</xsl:text>
|
---|
| 188 | </xsl:when>
|
---|
| 189 | <xsl:otherwise>
|
---|
| 190 | <xsl:text>No</xsl:text>
|
---|
| 191 | </xsl:otherwise>
|
---|
| 192 | </xsl:choose>
|
---|
| 193 |
|
---|
| 194 | <xsl:if test="$htmlhelp.hhp.window != ''">
|
---|
| 195 | <xsl:text>
|
---|
| 196 |
|
---|
| 197 | [WINDOWS]
|
---|
| 198 | </xsl:text>
|
---|
| 199 | <xsl:value-of select="$htmlhelp.hhp.window"/>
|
---|
| 200 | <xsl:text>="</xsl:text>
|
---|
| 201 | <xsl:value-of select="$help.title"/>
|
---|
| 202 | <xsl:text>","</xsl:text><xsl:value-of select="$htmlhelp.hhc"/>
|
---|
| 203 | <xsl:text>",</xsl:text>
|
---|
| 204 | <xsl:if test="$htmlhelp.generate.index">
|
---|
| 205 | <xsl:text>"</xsl:text>
|
---|
| 206 | <xsl:value-of select="$htmlhelp.hhk"/>
|
---|
| 207 | <xsl:text>"</xsl:text>
|
---|
| 208 | </xsl:if>
|
---|
| 209 | <xsl:text>,"</xsl:text>
|
---|
| 210 | <xsl:value-of select="$default.topic"/>
|
---|
| 211 | <xsl:text>",</xsl:text>
|
---|
| 212 | <xsl:text>"</xsl:text>
|
---|
| 213 | <xsl:choose>
|
---|
| 214 | <xsl:when test="$htmlhelp.button.home != 0">
|
---|
| 215 | <xsl:value-of select="$htmlhelp.button.home.url"/>
|
---|
| 216 | </xsl:when>
|
---|
| 217 | <xsl:otherwise>
|
---|
| 218 | <xsl:value-of select="$default.topic"/>
|
---|
| 219 | </xsl:otherwise>
|
---|
| 220 | </xsl:choose>
|
---|
| 221 | <xsl:text>"</xsl:text>
|
---|
| 222 | <xsl:text>,</xsl:text>
|
---|
| 223 | <xsl:if test="$htmlhelp.button.jump1 != 0">
|
---|
| 224 | <xsl:text>"</xsl:text>
|
---|
| 225 | <xsl:value-of select="$htmlhelp.button.jump1.url"/>
|
---|
| 226 | <xsl:text>"</xsl:text>
|
---|
| 227 | </xsl:if>
|
---|
| 228 | <xsl:text>,</xsl:text>
|
---|
| 229 | <xsl:if test="$htmlhelp.button.jump1 != 0">
|
---|
| 230 | <xsl:text>"</xsl:text>
|
---|
| 231 | <xsl:value-of select="$htmlhelp.button.jump1.title"/>
|
---|
| 232 | <xsl:text>"</xsl:text>
|
---|
| 233 | </xsl:if>
|
---|
| 234 | <xsl:text>,</xsl:text>
|
---|
| 235 | <xsl:if test="$htmlhelp.button.jump2 != 0">
|
---|
| 236 | <xsl:text>"</xsl:text>
|
---|
| 237 | <xsl:value-of select="$htmlhelp.button.jump2.url"/>
|
---|
| 238 | <xsl:text>"</xsl:text>
|
---|
| 239 | </xsl:if>
|
---|
| 240 | <xsl:text>,</xsl:text>
|
---|
| 241 | <xsl:if test="$htmlhelp.button.jump2 != 0">
|
---|
| 242 | <xsl:text>"</xsl:text>
|
---|
| 243 | <xsl:value-of select="$htmlhelp.button.jump2.title"/>
|
---|
| 244 | <xsl:text>"</xsl:text>
|
---|
| 245 | </xsl:if>
|
---|
| 246 | <xsl:text>,</xsl:text>
|
---|
| 247 | <xsl:value-of select="$xnavigation"/>
|
---|
| 248 | <xsl:text>,</xsl:text><xsl:value-of select="$htmlhelp.hhc.width"/><xsl:text>,</xsl:text>
|
---|
| 249 | <xsl:value-of select="$xbuttons"/>
|
---|
| 250 | <xsl:text>,</xsl:text><xsl:value-of select="$htmlhelp.window.geometry"/><xsl:text>,,,,,,,0
|
---|
| 251 | </xsl:text>
|
---|
| 252 | </xsl:if>
|
---|
| 253 |
|
---|
| 254 | <!--
|
---|
| 255 | Needs more investigation to generate propetly all fields
|
---|
| 256 | <xsl:text>search="</xsl:text>
|
---|
| 257 | <xsl:value-of select="normalize-space(//title[1])"/>
|
---|
| 258 | <xsl:text>","toc.hhc","index.hhk","</xsl:text>
|
---|
| 259 | <xsl:value-of select="$root.filename"/>
|
---|
| 260 | <xsl:text>.html","</xsl:text>
|
---|
| 261 | <xsl:value-of select="$root.filename"/>
|
---|
| 262 | <xsl:text>.html",,,,,</xsl:text>
|
---|
| 263 | <xsl:value-of select="$xnavigation"/>
|
---|
| 264 | <xsl:text>,</xsl:text>
|
---|
| 265 | <xsl:value-of select="$htmlhelp.hhc.width"/>
|
---|
| 266 | <xsl:text>,</xsl:text>
|
---|
| 267 | <xsl:value-of select="$xbuttons"/>
|
---|
| 268 | <xsl:text>,</xsl:text>
|
---|
| 269 | <xsl:value-of select="$htmlhelp.window.geometry"/>
|
---|
| 270 | <xsl:text>,,,,,2,,0
|
---|
| 271 | </xsl:text>
|
---|
| 272 | -->
|
---|
| 273 |
|
---|
| 274 | <xsl:if test="$htmlhelp.hhp.windows">
|
---|
| 275 | <xsl:value-of select="$htmlhelp.hhp.windows"/>
|
---|
| 276 | </xsl:if>
|
---|
| 277 | <xsl:text>
|
---|
| 278 |
|
---|
| 279 | [FILES]
|
---|
| 280 | </xsl:text>
|
---|
| 281 |
|
---|
| 282 | <xsl:choose>
|
---|
| 283 | <xsl:when test="$rootid != ''">
|
---|
| 284 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="enumerate-files"/>
|
---|
| 285 | </xsl:when>
|
---|
| 286 | <xsl:otherwise>
|
---|
| 287 | <xsl:apply-templates select="$profiled-nodes" mode="enumerate-files"/>
|
---|
| 288 | </xsl:otherwise>
|
---|
| 289 | </xsl:choose>
|
---|
| 290 |
|
---|
| 291 | <xsl:if test="$htmlhelp.enumerate.images">
|
---|
| 292 | <xsl:variable name="imagelist">
|
---|
| 293 | <xsl:choose>
|
---|
| 294 | <xsl:when test="$rootid != ''">
|
---|
| 295 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="enumerate-images"/>
|
---|
| 296 | </xsl:when>
|
---|
| 297 | <xsl:otherwise>
|
---|
| 298 | <xsl:apply-templates select="$profiled-nodes" mode="enumerate-images"/>
|
---|
| 299 | </xsl:otherwise>
|
---|
| 300 | </xsl:choose>
|
---|
| 301 | </xsl:variable>
|
---|
| 302 | <xsl:choose>
|
---|
| 303 | <xsl:when test="function-available('exsl:node-set') and function-available('set:distinct')">
|
---|
| 304 | <xsl:for-each select="set:distinct(exsl:node-set($imagelist)/filename)">
|
---|
| 305 | <xsl:value-of select="."/>
|
---|
| 306 | <xsl:text>
|
---|
| 307 | </xsl:text>
|
---|
| 308 | </xsl:for-each>
|
---|
| 309 | </xsl:when>
|
---|
| 310 | <xsl:otherwise>
|
---|
| 311 | <xsl:value-of select="$imagelist"/>
|
---|
| 312 | </xsl:otherwise>
|
---|
| 313 | </xsl:choose>
|
---|
| 314 | </xsl:if>
|
---|
| 315 |
|
---|
| 316 | <xsl:if test="($htmlhelp.force.map.and.alias != 0) or ($rootid = '' and //processing-instruction('dbhh')) or ($rootid != '' and $profiled-nodes//*[@id=$rootid]//processing-instruction('dbhh'))">
|
---|
| 317 | <xsl:text>
|
---|
| 318 | [ALIAS]
|
---|
| 319 | #include </xsl:text><xsl:value-of select="$htmlhelp.alias.file"/><xsl:text>
|
---|
| 320 |
|
---|
| 321 | [MAP]
|
---|
| 322 | #include </xsl:text><xsl:value-of select="$htmlhelp.map.file"/><xsl:text>
|
---|
| 323 | </xsl:text>
|
---|
| 324 | </xsl:if>
|
---|
| 325 |
|
---|
| 326 | <xsl:value-of select="$htmlhelp.hhp.tail"/>
|
---|
| 327 | </xsl:template>
|
---|
| 328 |
|
---|
| 329 | <!-- ==================================================================== -->
|
---|
| 330 |
|
---|
| 331 | <xsl:template match="graphic|inlinegraphic[@format!='linespecific']" mode="enumerate-images">
|
---|
| 332 | <xsl:call-template name="write.filename.enumerate-images">
|
---|
| 333 | <xsl:with-param name="filename">
|
---|
| 334 | <xsl:call-template name="mediaobject.filename.enumerate-images">
|
---|
| 335 | <xsl:with-param name="object" select="."/>
|
---|
| 336 | </xsl:call-template>
|
---|
| 337 | </xsl:with-param>
|
---|
| 338 | </xsl:call-template>
|
---|
| 339 | </xsl:template>
|
---|
| 340 |
|
---|
| 341 | <xsl:template match="mediaobject|inlinemediaobject" mode="enumerate-images">
|
---|
| 342 | <xsl:call-template name="select.mediaobject.enumerate-images"/>
|
---|
| 343 | </xsl:template>
|
---|
| 344 |
|
---|
| 345 | <xsl:template name="select.mediaobject.enumerate-images">
|
---|
| 346 | <xsl:param name="olist" select="imageobject|imageobjectco |videoobject|audioobject|textobject"/>
|
---|
| 347 | <xsl:param name="count">1</xsl:param>
|
---|
| 348 |
|
---|
| 349 | <xsl:if test="$count <= count($olist)">
|
---|
| 350 | <xsl:variable name="object" select="$olist[position()=$count]"/>
|
---|
| 351 |
|
---|
| 352 | <xsl:variable name="useobject">
|
---|
| 353 | <xsl:choose>
|
---|
| 354 | <!-- The phrase is never used -->
|
---|
| 355 | <xsl:when test="name($object)='textobject' and $object/phrase">
|
---|
| 356 | <xsl:text>0</xsl:text>
|
---|
| 357 | </xsl:when>
|
---|
| 358 | <!-- The first textobject is a reasonable fallback (but not for image in HH) -->
|
---|
| 359 | <xsl:when test="name($object)='textobject'">
|
---|
| 360 | <xsl:text>0</xsl:text>
|
---|
| 361 | </xsl:when>
|
---|
| 362 | <!-- If there's only one object, use it -->
|
---|
| 363 | <xsl:when test="$count = 1 and count($olist) = 1">
|
---|
| 364 | <xsl:text>1</xsl:text>
|
---|
| 365 | </xsl:when>
|
---|
| 366 | <!-- Otherwise, see if this one is a useable graphic -->
|
---|
| 367 | <xsl:otherwise>
|
---|
| 368 | <xsl:choose>
|
---|
| 369 | <!-- peek inside imageobjectco to simplify the test -->
|
---|
| 370 | <xsl:when test="local-name($object) = 'imageobjectco'">
|
---|
| 371 | <xsl:call-template name="is.acceptable.mediaobject">
|
---|
| 372 | <xsl:with-param name="object" select="$object/imageobject"/>
|
---|
| 373 | </xsl:call-template>
|
---|
| 374 | </xsl:when>
|
---|
| 375 | <xsl:otherwise>
|
---|
| 376 | <xsl:call-template name="is.acceptable.mediaobject">
|
---|
| 377 | <xsl:with-param name="object" select="$object"/>
|
---|
| 378 | </xsl:call-template>
|
---|
| 379 | </xsl:otherwise>
|
---|
| 380 | </xsl:choose>
|
---|
| 381 | </xsl:otherwise>
|
---|
| 382 | </xsl:choose>
|
---|
| 383 | </xsl:variable>
|
---|
| 384 |
|
---|
| 385 | <xsl:choose>
|
---|
| 386 | <xsl:when test="$useobject='1' and $object[not(*/@format='linespecific')]">
|
---|
| 387 | <xsl:call-template name="write.filename.enumerate-images">
|
---|
| 388 | <xsl:with-param name="filename">
|
---|
| 389 | <xsl:call-template name="mediaobject.filename.enumerate-images">
|
---|
| 390 | <xsl:with-param name="object" select="$object"/>
|
---|
| 391 | </xsl:call-template>
|
---|
| 392 | </xsl:with-param>
|
---|
| 393 | </xsl:call-template>
|
---|
| 394 | </xsl:when>
|
---|
| 395 | <xsl:otherwise>
|
---|
| 396 | <xsl:call-template name="select.mediaobject.enumerate-images">
|
---|
| 397 | <xsl:with-param name="olist" select="$olist"/>
|
---|
| 398 | <xsl:with-param name="count" select="$count + 1"/>
|
---|
| 399 | </xsl:call-template>
|
---|
| 400 | </xsl:otherwise>
|
---|
| 401 | </xsl:choose>
|
---|
| 402 | </xsl:if>
|
---|
| 403 | </xsl:template>
|
---|
| 404 |
|
---|
| 405 | <xsl:template name="mediaobject.filename.enumerate-images">
|
---|
| 406 | <xsl:param name="object"/>
|
---|
| 407 |
|
---|
| 408 | <xsl:variable name="urifilename">
|
---|
| 409 | <xsl:call-template name="mediaobject.filename">
|
---|
| 410 | <xsl:with-param name="object" select="$object"/>
|
---|
| 411 | </xsl:call-template>
|
---|
| 412 | </xsl:variable>
|
---|
| 413 |
|
---|
| 414 | <xsl:variable name="filename">
|
---|
| 415 | <xsl:choose>
|
---|
| 416 | <xsl:when test="starts-with($urifilename, 'file:/')">
|
---|
| 417 | <xsl:value-of select="substring-after($urifilename, 'file:/')"/>
|
---|
| 418 | </xsl:when>
|
---|
| 419 | <xsl:otherwise>
|
---|
| 420 | <xsl:value-of select="$urifilename"/>
|
---|
| 421 | </xsl:otherwise>
|
---|
| 422 | </xsl:choose>
|
---|
| 423 | </xsl:variable>
|
---|
| 424 |
|
---|
| 425 | <xsl:value-of select="translate($filename, '/', '\')"/>
|
---|
| 426 |
|
---|
| 427 | </xsl:template>
|
---|
| 428 |
|
---|
| 429 | <xsl:template match="text()" mode="enumerate-images">
|
---|
| 430 | </xsl:template>
|
---|
| 431 |
|
---|
| 432 | <xsl:template name="write.filename.enumerate-images">
|
---|
| 433 | <xsl:param name="filename"/>
|
---|
| 434 | <xsl:choose>
|
---|
| 435 | <xsl:when test="function-available('exsl:node-set') and function-available('set:distinct')">
|
---|
| 436 | <filename><xsl:value-of select="$filename"/></filename>
|
---|
| 437 | </xsl:when>
|
---|
| 438 | <xsl:otherwise>
|
---|
| 439 | <xsl:value-of select="$filename"/>
|
---|
| 440 | <xsl:text>
|
---|
| 441 | </xsl:text>
|
---|
| 442 | </xsl:otherwise>
|
---|
| 443 | </xsl:choose>
|
---|
| 444 | </xsl:template>
|
---|
| 445 |
|
---|
| 446 | <!-- ==================================================================== -->
|
---|
| 447 |
|
---|
| 448 | <!-- Following templates are not nice. It is because MS help compiler is unable
|
---|
| 449 | to process correct HTML files. We must generate following weird
|
---|
| 450 | stuff instead. -->
|
---|
| 451 |
|
---|
| 452 | <xsl:template name="hhc">
|
---|
| 453 | <xsl:call-template name="write.text.chunk">
|
---|
| 454 | <xsl:with-param name="filename">
|
---|
| 455 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
| 456 | <xsl:value-of select="$base.dir"/>
|
---|
| 457 | </xsl:if>
|
---|
| 458 | <xsl:value-of select="$htmlhelp.hhc"/>
|
---|
| 459 | </xsl:with-param>
|
---|
| 460 | <xsl:with-param name="method" select="'text'"/>
|
---|
| 461 | <xsl:with-param name="content">
|
---|
| 462 | <xsl:call-template name="hhc-main"/>
|
---|
| 463 | </xsl:with-param>
|
---|
| 464 | <xsl:with-param name="encoding" select="$htmlhelp.encoding"/>
|
---|
| 465 | </xsl:call-template>
|
---|
| 466 | </xsl:template>
|
---|
| 467 |
|
---|
| 468 | <xsl:template name="hhc-main"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
|
---|
| 469 | <xsl:text disable-output-escaping="yes"><HTML>
|
---|
| 470 | <HEAD>
|
---|
| 471 | </HEAD>
|
---|
| 472 | <BODY>
|
---|
| 473 | </xsl:text>
|
---|
| 474 | <xsl:if test="$htmlhelp.hhc.folders.instead.books != 0">
|
---|
| 475 | <xsl:text disable-output-escaping="yes"><OBJECT type="text/site properties">
|
---|
| 476 | <param name="ImageType" value="Folder">
|
---|
| 477 | </OBJECT>
|
---|
| 478 | </xsl:text>
|
---|
| 479 | </xsl:if>
|
---|
| 480 | <xsl:if test="$htmlhelp.hhc.show.root != 0">
|
---|
| 481 | <xsl:text disable-output-escaping="yes"><UL>
|
---|
| 482 | </xsl:text>
|
---|
| 483 | </xsl:if>
|
---|
| 484 |
|
---|
| 485 | <xsl:choose>
|
---|
| 486 | <xsl:when test="$rootid != ''">
|
---|
| 487 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="hhc"/>
|
---|
| 488 | </xsl:when>
|
---|
| 489 | <xsl:otherwise>
|
---|
| 490 | <xsl:apply-templates select="$profiled-nodes" mode="hhc"/>
|
---|
| 491 | </xsl:otherwise>
|
---|
| 492 | </xsl:choose>
|
---|
| 493 |
|
---|
| 494 | <xsl:if test="$htmlhelp.hhc.show.root != 0">
|
---|
| 495 | <xsl:text disable-output-escaping="yes"></UL>
|
---|
| 496 | </xsl:text>
|
---|
| 497 | </xsl:if>
|
---|
| 498 | <xsl:text disable-output-escaping="yes"></BODY>
|
---|
| 499 | </HTML></xsl:text>
|
---|
| 500 | </xsl:template>
|
---|
| 501 |
|
---|
| 502 | <xsl:template match="set" mode="hhc">
|
---|
| 503 | <xsl:variable name="title">
|
---|
| 504 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 505 | <xsl:variable name="label.markup">
|
---|
| 506 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 507 | </xsl:variable>
|
---|
| 508 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 509 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 510 | </xsl:if>
|
---|
| 511 | </xsl:if>
|
---|
| 512 | <xsl:call-template name="escape-attr">
|
---|
| 513 | <xsl:with-param name="value">
|
---|
| 514 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 515 | </xsl:with-param>
|
---|
| 516 | </xsl:call-template>
|
---|
| 517 | </xsl:variable>
|
---|
| 518 |
|
---|
| 519 | <xsl:if test="$htmlhelp.hhc.show.root != 0">
|
---|
| 520 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 521 | <param name="Name" value="</xsl:text>
|
---|
| 522 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 523 | <xsl:text disable-output-escaping="yes">">
|
---|
| 524 | <param name="Local" value="</xsl:text>
|
---|
| 525 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 526 | <xsl:text disable-output-escaping="yes">">
|
---|
| 527 | </OBJECT></xsl:text>
|
---|
| 528 | </xsl:if>
|
---|
| 529 | <xsl:if test="book">
|
---|
| 530 | <xsl:variable name="toc.params">
|
---|
| 531 | <xsl:call-template name="find.path.params">
|
---|
| 532 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
---|
| 533 | </xsl:call-template>
|
---|
| 534 | </xsl:variable>
|
---|
| 535 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 536 | <xsl:if test="contains($toc.params, 'toc') and $htmlhelp.hhc.show.root = 0">
|
---|
| 537 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 538 | <param name="Name" value="</xsl:text>
|
---|
| 539 | <xsl:call-template name="gentext">
|
---|
| 540 | <xsl:with-param name="key" select="'TableofContents'"/>
|
---|
| 541 | </xsl:call-template>
|
---|
| 542 | <xsl:text disable-output-escaping="yes">">
|
---|
| 543 | <param name="Local" value="</xsl:text>
|
---|
| 544 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 545 | <xsl:text disable-output-escaping="yes">">
|
---|
| 546 | </OBJECT></xsl:text>
|
---|
| 547 | </xsl:if>
|
---|
| 548 | <xsl:apply-templates select="book" mode="hhc"/>
|
---|
| 549 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 550 | </xsl:if>
|
---|
| 551 | </xsl:template>
|
---|
| 552 |
|
---|
| 553 | <xsl:template match="book" mode="hhc">
|
---|
| 554 | <xsl:variable name="title">
|
---|
| 555 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 556 | <xsl:variable name="label.markup">
|
---|
| 557 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 558 | </xsl:variable>
|
---|
| 559 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 560 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 561 | </xsl:if>
|
---|
| 562 | </xsl:if>
|
---|
| 563 | <xsl:call-template name="escape-attr">
|
---|
| 564 | <xsl:with-param name="value">
|
---|
| 565 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 566 | </xsl:with-param>
|
---|
| 567 | </xsl:call-template>
|
---|
| 568 | </xsl:variable>
|
---|
| 569 |
|
---|
| 570 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 571 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 572 | <param name="Name" value="</xsl:text>
|
---|
| 573 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 574 | <xsl:text disable-output-escaping="yes">">
|
---|
| 575 | <param name="Local" value="</xsl:text>
|
---|
| 576 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 577 | <xsl:text disable-output-escaping="yes">">
|
---|
| 578 | </OBJECT></xsl:text>
|
---|
| 579 | </xsl:if>
|
---|
| 580 | <xsl:if test="part|reference|preface|chapter|appendix|bibliography|article|colophon|glossary">
|
---|
| 581 | <xsl:variable name="toc.params">
|
---|
| 582 | <xsl:call-template name="find.path.params">
|
---|
| 583 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
---|
| 584 | </xsl:call-template>
|
---|
| 585 | </xsl:variable>
|
---|
| 586 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 587 | <xsl:if test="contains($toc.params, 'toc') and $htmlhelp.hhc.show.root = 0 and not(parent::*)">
|
---|
| 588 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 589 | <param name="Name" value="</xsl:text>
|
---|
| 590 | <xsl:call-template name="gentext">
|
---|
| 591 | <xsl:with-param name="key" select="'TableofContents'"/>
|
---|
| 592 | </xsl:call-template>
|
---|
| 593 | <xsl:text disable-output-escaping="yes">">
|
---|
| 594 | <param name="Local" value="</xsl:text>
|
---|
| 595 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 596 | <xsl:text disable-output-escaping="yes">">
|
---|
| 597 | </OBJECT></xsl:text>
|
---|
| 598 | </xsl:if>
|
---|
| 599 | <xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary" mode="hhc"/>
|
---|
| 600 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 601 | </xsl:if>
|
---|
| 602 | </xsl:template>
|
---|
| 603 |
|
---|
| 604 | <xsl:template match="part|reference|preface|chapter|bibliography|appendix|article|glossary" mode="hhc">
|
---|
| 605 | <xsl:variable name="title">
|
---|
| 606 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 607 | <xsl:variable name="label.markup">
|
---|
| 608 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 609 | </xsl:variable>
|
---|
| 610 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 611 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 612 | </xsl:if>
|
---|
| 613 | </xsl:if>
|
---|
| 614 | <xsl:call-template name="escape-attr">
|
---|
| 615 | <xsl:with-param name="value">
|
---|
| 616 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 617 | </xsl:with-param>
|
---|
| 618 | </xsl:call-template>
|
---|
| 619 | </xsl:variable>
|
---|
| 620 |
|
---|
| 621 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 622 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 623 | <param name="Name" value="</xsl:text>
|
---|
| 624 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 625 | <xsl:text disable-output-escaping="yes">">
|
---|
| 626 | <param name="Local" value="</xsl:text>
|
---|
| 627 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 628 | <xsl:text disable-output-escaping="yes">">
|
---|
| 629 | </OBJECT></xsl:text>
|
---|
| 630 | </xsl:if>
|
---|
| 631 | <xsl:if test="reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv">
|
---|
| 632 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 633 | <xsl:apply-templates select="reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv" mode="hhc"/>
|
---|
| 634 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 635 | </xsl:if>
|
---|
| 636 | </xsl:template>
|
---|
| 637 |
|
---|
| 638 | <xsl:template match="section" mode="hhc">
|
---|
| 639 | <xsl:variable name="title">
|
---|
| 640 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 641 | <xsl:variable name="label.markup">
|
---|
| 642 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 643 | </xsl:variable>
|
---|
| 644 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 645 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 646 | </xsl:if>
|
---|
| 647 | </xsl:if>
|
---|
| 648 | <xsl:call-template name="escape-attr">
|
---|
| 649 | <xsl:with-param name="value">
|
---|
| 650 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 651 | </xsl:with-param>
|
---|
| 652 | </xsl:call-template>
|
---|
| 653 | </xsl:variable>
|
---|
| 654 |
|
---|
| 655 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 656 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 657 | <param name="Name" value="</xsl:text>
|
---|
| 658 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 659 | <xsl:text disable-output-escaping="yes">">
|
---|
| 660 | <param name="Local" value="</xsl:text>
|
---|
| 661 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 662 | <xsl:text disable-output-escaping="yes">">
|
---|
| 663 | </OBJECT></xsl:text>
|
---|
| 664 | </xsl:if>
|
---|
| 665 | <xsl:if test="section[count(ancestor::section) < $htmlhelp.hhc.section.depth]|refentry">
|
---|
| 666 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 667 | <xsl:apply-templates select="section|refentry" mode="hhc"/>
|
---|
| 668 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 669 | </xsl:if>
|
---|
| 670 | </xsl:template>
|
---|
| 671 |
|
---|
| 672 | <xsl:template match="sect1" mode="hhc">
|
---|
| 673 | <xsl:variable name="title">
|
---|
| 674 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 675 | <xsl:variable name="label.markup">
|
---|
| 676 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 677 | </xsl:variable>
|
---|
| 678 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 679 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 680 | </xsl:if>
|
---|
| 681 | </xsl:if>
|
---|
| 682 | <xsl:call-template name="escape-attr">
|
---|
| 683 | <xsl:with-param name="value">
|
---|
| 684 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 685 | </xsl:with-param>
|
---|
| 686 | </xsl:call-template>
|
---|
| 687 | </xsl:variable>
|
---|
| 688 |
|
---|
| 689 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 690 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 691 | <param name="Name" value="</xsl:text>
|
---|
| 692 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 693 | <xsl:text disable-output-escaping="yes">">
|
---|
| 694 | <param name="Local" value="</xsl:text>
|
---|
| 695 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 696 | <xsl:text disable-output-escaping="yes">">
|
---|
| 697 | </OBJECT></xsl:text>
|
---|
| 698 | </xsl:if>
|
---|
| 699 | <xsl:if test="sect2[$htmlhelp.hhc.section.depth > 1]|refentry">
|
---|
| 700 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 701 | <xsl:apply-templates select="sect2|refentry" mode="hhc"/>
|
---|
| 702 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 703 | </xsl:if>
|
---|
| 704 | </xsl:template>
|
---|
| 705 |
|
---|
| 706 | <xsl:template match="sect2" mode="hhc">
|
---|
| 707 | <xsl:variable name="title">
|
---|
| 708 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 709 | <xsl:variable name="label.markup">
|
---|
| 710 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 711 | </xsl:variable>
|
---|
| 712 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 713 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 714 | </xsl:if>
|
---|
| 715 | </xsl:if>
|
---|
| 716 | <xsl:call-template name="escape-attr">
|
---|
| 717 | <xsl:with-param name="value">
|
---|
| 718 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 719 | </xsl:with-param>
|
---|
| 720 | </xsl:call-template>
|
---|
| 721 | </xsl:variable>
|
---|
| 722 |
|
---|
| 723 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 724 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 725 | <param name="Name" value="</xsl:text>
|
---|
| 726 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 727 | <xsl:text disable-output-escaping="yes">">
|
---|
| 728 | <param name="Local" value="</xsl:text>
|
---|
| 729 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 730 | <xsl:text disable-output-escaping="yes">">
|
---|
| 731 | </OBJECT></xsl:text>
|
---|
| 732 | </xsl:if>
|
---|
| 733 | <xsl:if test="sect3[$htmlhelp.hhc.section.depth > 2]|refentry">
|
---|
| 734 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 735 | <xsl:apply-templates select="sect3|refentry" mode="hhc"/>
|
---|
| 736 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 737 | </xsl:if>
|
---|
| 738 | </xsl:template>
|
---|
| 739 |
|
---|
| 740 | <xsl:template match="sect3" mode="hhc">
|
---|
| 741 | <xsl:variable name="title">
|
---|
| 742 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 743 | <xsl:variable name="label.markup">
|
---|
| 744 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 745 | </xsl:variable>
|
---|
| 746 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 747 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 748 | </xsl:if>
|
---|
| 749 | </xsl:if>
|
---|
| 750 | <xsl:call-template name="escape-attr">
|
---|
| 751 | <xsl:with-param name="value">
|
---|
| 752 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 753 | </xsl:with-param>
|
---|
| 754 | </xsl:call-template>
|
---|
| 755 | </xsl:variable>
|
---|
| 756 |
|
---|
| 757 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 758 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 759 | <param name="Name" value="</xsl:text>
|
---|
| 760 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 761 | <xsl:text disable-output-escaping="yes">">
|
---|
| 762 | <param name="Local" value="</xsl:text>
|
---|
| 763 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 764 | <xsl:text disable-output-escaping="yes">">
|
---|
| 765 | </OBJECT></xsl:text>
|
---|
| 766 | </xsl:if>
|
---|
| 767 | <xsl:if test="sect4[$htmlhelp.hhc.section.depth > 3]|refentry">
|
---|
| 768 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 769 | <xsl:apply-templates select="sect4|refentry" mode="hhc"/>
|
---|
| 770 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 771 | </xsl:if>
|
---|
| 772 | </xsl:template>
|
---|
| 773 |
|
---|
| 774 | <xsl:template match="sect4" mode="hhc">
|
---|
| 775 | <xsl:variable name="title">
|
---|
| 776 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 777 | <xsl:variable name="label.markup">
|
---|
| 778 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 779 | </xsl:variable>
|
---|
| 780 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 781 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 782 | </xsl:if>
|
---|
| 783 | </xsl:if>
|
---|
| 784 | <xsl:call-template name="escape-attr">
|
---|
| 785 | <xsl:with-param name="value">
|
---|
| 786 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 787 | </xsl:with-param>
|
---|
| 788 | </xsl:call-template>
|
---|
| 789 | </xsl:variable>
|
---|
| 790 |
|
---|
| 791 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 792 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 793 | <param name="Name" value="</xsl:text>
|
---|
| 794 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 795 | <xsl:text disable-output-escaping="yes">">
|
---|
| 796 | <param name="Local" value="</xsl:text>
|
---|
| 797 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 798 | <xsl:text disable-output-escaping="yes">">
|
---|
| 799 | </OBJECT></xsl:text>
|
---|
| 800 | </xsl:if>
|
---|
| 801 | <xsl:if test="sect5[$htmlhelp.hhc.section.depth > 4]|refentry">
|
---|
| 802 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 803 | <xsl:apply-templates select="sect5|refentry" mode="hhc"/>
|
---|
| 804 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 805 | </xsl:if>
|
---|
| 806 | </xsl:template>
|
---|
| 807 |
|
---|
| 808 | <xsl:template match="sect5|refentry|colophon|bibliodiv" mode="hhc">
|
---|
| 809 | <xsl:variable name="title">
|
---|
| 810 | <xsl:if test="$htmlhelp.autolabel=1">
|
---|
| 811 | <xsl:variable name="label.markup">
|
---|
| 812 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
| 813 | </xsl:variable>
|
---|
| 814 | <xsl:if test="normalize-space($label.markup)">
|
---|
| 815 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
| 816 | </xsl:if>
|
---|
| 817 | </xsl:if>
|
---|
| 818 | <xsl:call-template name="escape-attr">
|
---|
| 819 | <xsl:with-param name="value">
|
---|
| 820 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 821 | </xsl:with-param>
|
---|
| 822 | </xsl:call-template>
|
---|
| 823 | </xsl:variable>
|
---|
| 824 |
|
---|
| 825 | <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
|
---|
| 826 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 827 | <param name="Name" value="</xsl:text>
|
---|
| 828 | <xsl:value-of select="normalize-space($title)"/>
|
---|
| 829 | <xsl:text disable-output-escaping="yes">">
|
---|
| 830 | <param name="Local" value="</xsl:text>
|
---|
| 831 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 832 | <xsl:text disable-output-escaping="yes">">
|
---|
| 833 | </OBJECT></xsl:text>
|
---|
| 834 | </xsl:if>
|
---|
| 835 | <xsl:if test="refentry">
|
---|
| 836 | <xsl:text disable-output-escaping="yes"><UL></xsl:text>
|
---|
| 837 | <xsl:apply-templates select="refentry" mode="hhc"/>
|
---|
| 838 | <xsl:text disable-output-escaping="yes"></UL></xsl:text>
|
---|
| 839 | </xsl:if>
|
---|
| 840 | </xsl:template>
|
---|
| 841 |
|
---|
| 842 | <!-- ==================================================================== -->
|
---|
| 843 |
|
---|
| 844 | <xsl:template match="indexterm">
|
---|
| 845 | <xsl:choose>
|
---|
| 846 | <xsl:when test="$htmlhelp.use.hhk = 0">
|
---|
| 847 |
|
---|
| 848 | <xsl:variable name="primary" select="normalize-space(primary)"/>
|
---|
| 849 | <xsl:variable name="secondary" select="normalize-space(secondary)"/>
|
---|
| 850 | <xsl:variable name="tertiary" select="normalize-space(tertiary)"/>
|
---|
| 851 |
|
---|
| 852 | <xsl:variable name="text">
|
---|
| 853 | <xsl:value-of select="$primary"/>
|
---|
| 854 | <xsl:if test="secondary">
|
---|
| 855 | <xsl:text>, </xsl:text>
|
---|
| 856 | <xsl:value-of select="$secondary"/>
|
---|
| 857 | </xsl:if>
|
---|
| 858 | <xsl:if test="tertiary">
|
---|
| 859 | <xsl:text>, </xsl:text>
|
---|
| 860 | <xsl:value-of select="$tertiary"/>
|
---|
| 861 | </xsl:if>
|
---|
| 862 | </xsl:variable>
|
---|
| 863 |
|
---|
| 864 | <xsl:if test="secondary">
|
---|
| 865 | <xsl:if test="not(//indexterm[normalize-space(primary)=$primary and not(secondary)])">
|
---|
| 866 | <xsl:call-template name="write.indexterm">
|
---|
| 867 | <xsl:with-param name="text" select="$primary"/>
|
---|
| 868 | </xsl:call-template>
|
---|
| 869 | </xsl:if>
|
---|
| 870 | </xsl:if>
|
---|
| 871 |
|
---|
| 872 | <xsl:call-template name="write.indexterm">
|
---|
| 873 | <xsl:with-param name="text" select="$text"/>
|
---|
| 874 | </xsl:call-template>
|
---|
| 875 |
|
---|
| 876 | </xsl:when>
|
---|
| 877 | <xsl:otherwise>
|
---|
| 878 | <a>
|
---|
| 879 | <xsl:attribute name="name">
|
---|
| 880 | <xsl:call-template name="object.id"/>
|
---|
| 881 | </xsl:attribute>
|
---|
| 882 | </a>
|
---|
| 883 | </xsl:otherwise>
|
---|
| 884 |
|
---|
| 885 | </xsl:choose>
|
---|
| 886 | </xsl:template>
|
---|
| 887 |
|
---|
| 888 | <xsl:template name="write.indexterm">
|
---|
| 889 | <xsl:param name="text"/>
|
---|
| 890 | <OBJECT type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
|
---|
| 891 | <param name="Keyword" value="{$text}"/>
|
---|
| 892 | </OBJECT>
|
---|
| 893 | </xsl:template>
|
---|
| 894 |
|
---|
| 895 | <!-- ==================================================================== -->
|
---|
| 896 |
|
---|
| 897 | <xsl:template name="hhk">
|
---|
| 898 | <xsl:call-template name="write.text.chunk">
|
---|
| 899 | <xsl:with-param name="filename">
|
---|
| 900 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
| 901 | <xsl:value-of select="$base.dir"/>
|
---|
| 902 | </xsl:if>
|
---|
| 903 | <xsl:value-of select="$htmlhelp.hhk"/>
|
---|
| 904 | </xsl:with-param>
|
---|
| 905 | <xsl:with-param name="method" select="'text'"/>
|
---|
| 906 | <xsl:with-param name="content"><xsl:text disable-output-escaping="yes"><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
---|
| 907 | <HTML>
|
---|
| 908 | <HEAD>
|
---|
| 909 | <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
|
---|
| 910 | <!-- Sitemap 1.0 -->
|
---|
| 911 | </HEAD><BODY>
|
---|
| 912 | <OBJECT type="text/site properties">
|
---|
| 913 | </OBJECT>
|
---|
| 914 | <UL>
|
---|
| 915 | </xsl:text>
|
---|
| 916 | <xsl:if test="($htmlhelp.use.hhk != 0) and $htmlhelp.generate.index">
|
---|
| 917 | <xsl:choose>
|
---|
| 918 | <xsl:when test="$rootid != ''">
|
---|
| 919 | <xsl:apply-templates select="key('id',$rootid)" mode="hhk"/>
|
---|
| 920 | </xsl:when>
|
---|
| 921 | <xsl:otherwise>
|
---|
| 922 | <xsl:apply-templates select="/" mode="hhk"/>
|
---|
| 923 | </xsl:otherwise>
|
---|
| 924 | </xsl:choose>
|
---|
| 925 | </xsl:if>
|
---|
| 926 | <xsl:text disable-output-escaping="yes"></UL>
|
---|
| 927 | </BODY></HTML>
|
---|
| 928 | </xsl:text></xsl:with-param>
|
---|
| 929 | <xsl:with-param name="encoding" select="$htmlhelp.encoding"/>
|
---|
| 930 | </xsl:call-template>
|
---|
| 931 | </xsl:template>
|
---|
| 932 |
|
---|
| 933 | <xsl:template match="indexterm[@class='endofrange']" mode="hhk"/>
|
---|
| 934 |
|
---|
| 935 | <xsl:template match="indexterm" mode="hhk">
|
---|
| 936 | <xsl:variable name="primary" select="normalize-space(primary)"/>
|
---|
| 937 | <xsl:variable name="secondary" select="normalize-space(secondary)"/>
|
---|
| 938 | <xsl:variable name="tertiary" select="normalize-space(tertiary)"/>
|
---|
| 939 |
|
---|
| 940 | <xsl:call-template name="write.indexterm.hhk">
|
---|
| 941 | <xsl:with-param name="text" select="$primary"/>
|
---|
| 942 | <xsl:with-param name="seealso" select="seealso"/>
|
---|
| 943 | </xsl:call-template>
|
---|
| 944 |
|
---|
| 945 | <xsl:if test="secondary">
|
---|
| 946 | <xsl:if test="not(//indexterm[normalize-space(primary)=$primary and not(secondary)])">
|
---|
| 947 | <xsl:call-template name="write.indexterm.hhk">
|
---|
| 948 | <!-- We must create fake entry when there is secondary without primary -->
|
---|
| 949 | <xsl:with-param name="text" select="$primary"/>
|
---|
| 950 | <xsl:with-param name="seealso" select="$primary"/>
|
---|
| 951 | </xsl:call-template>
|
---|
| 952 | </xsl:if>
|
---|
| 953 | <xsl:text disable-output-escaping="yes"><UL>
|
---|
| 954 | </xsl:text>
|
---|
| 955 | <xsl:call-template name="write.indexterm.hhk">
|
---|
| 956 | <xsl:with-param name="text" select="$secondary"/>
|
---|
| 957 | <xsl:with-param name="seealso" select="secondary/seealso"/>
|
---|
| 958 | </xsl:call-template>
|
---|
| 959 | <xsl:if test="tertiary">
|
---|
| 960 | <xsl:text disable-output-escaping="yes"><UL>
|
---|
| 961 | </xsl:text>
|
---|
| 962 | <xsl:call-template name="write.indexterm.hhk">
|
---|
| 963 | <xsl:with-param name="text" select="$tertiary"/>
|
---|
| 964 | <xsl:with-param name="seealso" select="tertiary/seealso"/>
|
---|
| 965 | </xsl:call-template>
|
---|
| 966 | <xsl:text disable-output-escaping="yes"></UL>
|
---|
| 967 | </xsl:text>
|
---|
| 968 | </xsl:if>
|
---|
| 969 | <xsl:text disable-output-escaping="yes"></UL>
|
---|
| 970 | </xsl:text>
|
---|
| 971 | </xsl:if>
|
---|
| 972 |
|
---|
| 973 | </xsl:template>
|
---|
| 974 |
|
---|
| 975 | <xsl:template name="write.indexterm.hhk">
|
---|
| 976 | <xsl:param name="text"/>
|
---|
| 977 | <xsl:param name="seealso"/>
|
---|
| 978 | <xsl:variable name="text.escaped">
|
---|
| 979 | <xsl:call-template name="escape-attr">
|
---|
| 980 | <xsl:with-param name="value" select="$text"/>
|
---|
| 981 | </xsl:call-template>
|
---|
| 982 | </xsl:variable>
|
---|
| 983 |
|
---|
| 984 | <xsl:text disable-output-escaping="yes"><LI> <OBJECT type="text/sitemap">
|
---|
| 985 | <param name="Name" value="</xsl:text><xsl:value-of select="$text.escaped"/><xsl:text disable-output-escaping="yes">"></xsl:text>
|
---|
| 986 | <xsl:if test="not(seealso)">
|
---|
| 987 | <xsl:variable name="href">
|
---|
| 988 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
| 989 | </xsl:variable>
|
---|
| 990 | <xsl:variable name="title">
|
---|
| 991 | <xsl:call-template name="escape-attr">
|
---|
| 992 | <xsl:with-param name="value">
|
---|
| 993 | <xsl:call-template name="nearest.title">
|
---|
| 994 | <xsl:with-param name="object" select=".."/>
|
---|
| 995 | </xsl:call-template>
|
---|
| 996 | </xsl:with-param>
|
---|
| 997 | </xsl:call-template>
|
---|
| 998 | </xsl:variable>
|
---|
| 999 | <xsl:text disable-output-escaping="yes"><param name="Name" value="</xsl:text>
|
---|
| 1000 | <xsl:value-of select="$title"/>
|
---|
| 1001 | <xsl:text disable-output-escaping="yes">"></xsl:text>
|
---|
| 1002 | <xsl:text disable-output-escaping="yes"><param name="Local" value="</xsl:text>
|
---|
| 1003 | <xsl:value-of select="$href"/>
|
---|
| 1004 | <xsl:text disable-output-escaping="yes">"></xsl:text>
|
---|
| 1005 | </xsl:if>
|
---|
| 1006 | <xsl:if test="seealso">
|
---|
| 1007 | <xsl:text disable-output-escaping="yes"><param name="See Also" value="</xsl:text>
|
---|
| 1008 | <xsl:value-of select="$seealso"/>
|
---|
| 1009 | <xsl:text disable-output-escaping="yes">"></xsl:text>
|
---|
| 1010 | </xsl:if>
|
---|
| 1011 | <xsl:text disable-output-escaping="yes"> </OBJECT></xsl:text>
|
---|
| 1012 | </xsl:template>
|
---|
| 1013 |
|
---|
| 1014 | <xsl:template match="text()" mode="hhk"/>
|
---|
| 1015 |
|
---|
| 1016 | <xsl:template name="nearest.title">
|
---|
| 1017 | <xsl:param name="object"/>
|
---|
| 1018 | <xsl:apply-templates select="$object/ancestor-or-self::*[title][1]" mode="title.markup"/>
|
---|
| 1019 | </xsl:template>
|
---|
| 1020 |
|
---|
| 1021 | <!-- ==================================================================== -->
|
---|
| 1022 |
|
---|
| 1023 | <xsl:template name="hh-map">
|
---|
| 1024 | <xsl:call-template name="write.text.chunk">
|
---|
| 1025 | <xsl:with-param name="filename">
|
---|
| 1026 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
| 1027 | <xsl:value-of select="$base.dir"/>
|
---|
| 1028 | </xsl:if>
|
---|
| 1029 | <xsl:value-of select="$htmlhelp.map.file"/>
|
---|
| 1030 | </xsl:with-param>
|
---|
| 1031 | <xsl:with-param name="method" select="'text'"/>
|
---|
| 1032 | <xsl:with-param name="content">
|
---|
| 1033 | <xsl:choose>
|
---|
| 1034 | <xsl:when test="$rootid != ''">
|
---|
| 1035 | <xsl:apply-templates select="key('id',$rootid)" mode="hh-map"/>
|
---|
| 1036 | </xsl:when>
|
---|
| 1037 | <xsl:otherwise>
|
---|
| 1038 | <xsl:apply-templates select="/" mode="hh-map"/>
|
---|
| 1039 | </xsl:otherwise>
|
---|
| 1040 | </xsl:choose>
|
---|
| 1041 | </xsl:with-param>
|
---|
| 1042 | <xsl:with-param name="encoding" select="$htmlhelp.encoding"/>
|
---|
| 1043 | </xsl:call-template>
|
---|
| 1044 | </xsl:template>
|
---|
| 1045 |
|
---|
| 1046 | <xsl:template match="processing-instruction('dbhh')" mode="hh-map">
|
---|
| 1047 | <xsl:variable name="topicname">
|
---|
| 1048 | <xsl:call-template name="pi-attribute">
|
---|
| 1049 | <xsl:with-param name="pis" select="."/>
|
---|
| 1050 | <xsl:with-param name="attribute" select="'topicname'"/>
|
---|
| 1051 | </xsl:call-template>
|
---|
| 1052 | </xsl:variable>
|
---|
| 1053 | <xsl:variable name="topicid">
|
---|
| 1054 | <xsl:call-template name="pi-attribute">
|
---|
| 1055 | <xsl:with-param name="pis" select="."/>
|
---|
| 1056 | <xsl:with-param name="attribute" select="'topicid'"/>
|
---|
| 1057 | </xsl:call-template>
|
---|
| 1058 | </xsl:variable>
|
---|
| 1059 | <xsl:text>#define </xsl:text>
|
---|
| 1060 | <xsl:value-of select="$topicname"/>
|
---|
| 1061 | <xsl:text> </xsl:text>
|
---|
| 1062 | <xsl:value-of select="$topicid"/>
|
---|
| 1063 | <xsl:text>
|
---|
| 1064 | </xsl:text>
|
---|
| 1065 | </xsl:template>
|
---|
| 1066 |
|
---|
| 1067 | <xsl:template match="text()" mode="hh-map"/>
|
---|
| 1068 |
|
---|
| 1069 | <!-- ==================================================================== -->
|
---|
| 1070 |
|
---|
| 1071 | <xsl:template name="hh-alias">
|
---|
| 1072 | <xsl:call-template name="write.text.chunk">
|
---|
| 1073 | <xsl:with-param name="filename">
|
---|
| 1074 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
| 1075 | <xsl:value-of select="$base.dir"/>
|
---|
| 1076 | </xsl:if>
|
---|
| 1077 | <xsl:value-of select="$htmlhelp.alias.file"/>
|
---|
| 1078 | </xsl:with-param>
|
---|
| 1079 | <xsl:with-param name="method" select="'text'"/>
|
---|
| 1080 | <xsl:with-param name="content">
|
---|
| 1081 | <xsl:choose>
|
---|
| 1082 | <xsl:when test="$rootid != ''">
|
---|
| 1083 | <xsl:apply-templates select="key('id',$rootid)" mode="hh-alias"/>
|
---|
| 1084 | </xsl:when>
|
---|
| 1085 | <xsl:otherwise>
|
---|
| 1086 | <xsl:apply-templates select="/" mode="hh-alias"/>
|
---|
| 1087 | </xsl:otherwise>
|
---|
| 1088 | </xsl:choose>
|
---|
| 1089 | </xsl:with-param>
|
---|
| 1090 | <xsl:with-param name="encoding" select="$htmlhelp.encoding"/>
|
---|
| 1091 | </xsl:call-template>
|
---|
| 1092 | </xsl:template>
|
---|
| 1093 |
|
---|
| 1094 | <xsl:template match="processing-instruction('dbhh')" mode="hh-alias">
|
---|
| 1095 | <xsl:variable name="topicname">
|
---|
| 1096 | <xsl:call-template name="pi-attribute">
|
---|
| 1097 | <xsl:with-param name="pis" select="."/>
|
---|
| 1098 | <xsl:with-param name="attribute" select="'topicname'"/>
|
---|
| 1099 | </xsl:call-template>
|
---|
| 1100 | </xsl:variable>
|
---|
| 1101 | <xsl:variable name="href">
|
---|
| 1102 | <xsl:call-template name="href.target.with.base.dir">
|
---|
| 1103 | <xsl:with-param name="object" select=".."/>
|
---|
| 1104 | </xsl:call-template>
|
---|
| 1105 | </xsl:variable>
|
---|
| 1106 | <xsl:value-of select="$topicname"/>
|
---|
| 1107 | <xsl:text>=</xsl:text>
|
---|
| 1108 | <!-- Some versions of HH doesn't like fragment identifires, but some does. -->
|
---|
| 1109 | <!-- <xsl:value-of select="substring-before(concat($href, '#'), '#')"/> -->
|
---|
| 1110 | <xsl:value-of select="$href"/>
|
---|
| 1111 | <xsl:text>
|
---|
| 1112 | </xsl:text>
|
---|
| 1113 | </xsl:template>
|
---|
| 1114 |
|
---|
| 1115 | <xsl:template match="text()" mode="hh-alias"/>
|
---|
| 1116 |
|
---|
| 1117 | <!-- ==================================================================== -->
|
---|
| 1118 | <!-- This code can be used to convert any number to hexadecimal format -->
|
---|
| 1119 |
|
---|
| 1120 | <h:hex>
|
---|
| 1121 | <d>0</d>
|
---|
| 1122 | <d>1</d>
|
---|
| 1123 | <d>2</d>
|
---|
| 1124 | <d>3</d>
|
---|
| 1125 | <d>4</d>
|
---|
| 1126 | <d>5</d>
|
---|
| 1127 | <d>6</d>
|
---|
| 1128 | <d>7</d>
|
---|
| 1129 | <d>8</d>
|
---|
| 1130 | <d>9</d>
|
---|
| 1131 | <d>A</d>
|
---|
| 1132 | <d>B</d>
|
---|
| 1133 | <d>C</d>
|
---|
| 1134 | <d>D</d>
|
---|
| 1135 | <d>E</d>
|
---|
| 1136 | <d>F</d>
|
---|
| 1137 | </h:hex>
|
---|
| 1138 |
|
---|
| 1139 | <xsl:template name="toHex">
|
---|
| 1140 | <xsl:param name="n" select="0"/>
|
---|
| 1141 | <xsl:param name="digit" select="$n mod 16"/>
|
---|
| 1142 | <xsl:param name="rest" select="floor($n div 16)"/>
|
---|
| 1143 | <xsl:if test="$rest > 0">
|
---|
| 1144 | <xsl:call-template name="toHex">
|
---|
| 1145 | <xsl:with-param name="n" select="$rest"/>
|
---|
| 1146 | </xsl:call-template>
|
---|
| 1147 | </xsl:if>
|
---|
| 1148 | <xsl:value-of select="document('')//h:hex/d[$digit+1]"/>
|
---|
| 1149 | </xsl:template>
|
---|
| 1150 |
|
---|
| 1151 | <!-- ==================================================================== -->
|
---|
| 1152 | <!-- Template for escaping <, & and " in attribute values.
|
---|
| 1153 | We aren't using HTML output method, so we must do this job ourselves -->
|
---|
| 1154 |
|
---|
| 1155 | <xsl:template name="escape-attr">
|
---|
| 1156 | <xsl:param name="value"/>
|
---|
| 1157 |
|
---|
| 1158 | <xsl:variable name="amp.escaped">
|
---|
| 1159 | <xsl:call-template name="string.subst">
|
---|
| 1160 | <xsl:with-param name="string" select="$value"/>
|
---|
| 1161 | <xsl:with-param name="target" select="'&'"/>
|
---|
| 1162 | <xsl:with-param name="replacement" select="'&amp;'"/>
|
---|
| 1163 | </xsl:call-template>
|
---|
| 1164 | </xsl:variable>
|
---|
| 1165 |
|
---|
| 1166 | <xsl:variable name="quot.escaped">
|
---|
| 1167 | <xsl:call-template name="string.subst">
|
---|
| 1168 | <xsl:with-param name="string" select="$amp.escaped"/>
|
---|
| 1169 | <xsl:with-param name="target" select="'"'"/>
|
---|
| 1170 | <xsl:with-param name="replacement" select="'&quot;'"/>
|
---|
| 1171 | </xsl:call-template>
|
---|
| 1172 | </xsl:variable>
|
---|
| 1173 |
|
---|
| 1174 | <xsl:variable name="angle.escaped">
|
---|
| 1175 | <xsl:call-template name="string.subst">
|
---|
| 1176 | <xsl:with-param name="string" select="$quot.escaped"/>
|
---|
| 1177 | <xsl:with-param name="target" select="'<'"/>
|
---|
| 1178 | <xsl:with-param name="replacement" select="'&lt;'"/>
|
---|
| 1179 | </xsl:call-template>
|
---|
| 1180 | </xsl:variable>
|
---|
| 1181 |
|
---|
| 1182 | <xsl:value-of select="$angle.escaped"/>
|
---|
| 1183 |
|
---|
| 1184 | </xsl:template>
|
---|
| 1185 |
|
---|
| 1186 | <!-- ==================================================================== -->
|
---|
| 1187 | <!-- Modification to standard HTML stylesheets -->
|
---|
| 1188 |
|
---|
| 1189 | <!-- There are links from ToC pane to bibliodivs, so there must be anchor -->
|
---|
| 1190 | <xsl:template match="bibliodiv/title">
|
---|
| 1191 | <h3 class="{name(.)}">
|
---|
| 1192 | <xsl:call-template name="anchor">
|
---|
| 1193 | <xsl:with-param name="node" select=".."/>
|
---|
| 1194 | <xsl:with-param name="conditional" select="0"/>
|
---|
| 1195 | </xsl:call-template>
|
---|
| 1196 | <xsl:apply-templates/>
|
---|
| 1197 | </h3>
|
---|
| 1198 | </xsl:template>
|
---|
| 1199 |
|
---|
| 1200 | </xsl:stylesheet>
|
---|