[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:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="doc exslt">
|
---|
| 5 |
|
---|
| 6 | <xsl:import href="../html/chunk.xsl"/>
|
---|
| 7 |
|
---|
| 8 | <xsl:output method="html"/>
|
---|
| 9 |
|
---|
| 10 | <!-- ********************************************************************
|
---|
| 11 | $Id: javahelp.xsl,v 1.9 2004/10/22 08:29:12 bobstayton Exp $
|
---|
| 12 | ********************************************************************
|
---|
| 13 |
|
---|
| 14 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
| 15 | See ../README or http://nwalsh.com/docbook/xsl/ for copyright
|
---|
| 16 | and other information.
|
---|
| 17 |
|
---|
| 18 | ******************************************************************** -->
|
---|
| 19 |
|
---|
| 20 | <!-- ==================================================================== -->
|
---|
| 21 | <xsl:param name="javahelp.encoding" select="'ISO-8859-1'"/>
|
---|
| 22 |
|
---|
| 23 | <doc:param name="javahelp.encoding">
|
---|
| 24 | <refpurpose>Character encoding to use in control files for Java Help.</refpurpose>
|
---|
| 25 | <refdescription>
|
---|
| 26 | <para>Java Help crashes on some characters when written as character
|
---|
| 27 | references. In that case you can select appropriate encoding here.</para>
|
---|
| 28 | </refdescription>
|
---|
| 29 | </doc:param>
|
---|
| 30 |
|
---|
| 31 | <!-- ==================================================================== -->
|
---|
| 32 |
|
---|
| 33 | <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)"/>
|
---|
| 34 | <xsl:choose>
|
---|
| 35 | <xsl:when test="$rootid != ''">
|
---|
| 36 | <xsl:choose>
|
---|
| 37 | <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
|
---|
| 38 | <xsl:message terminate="yes">
|
---|
| 39 | <xsl:text>ID '</xsl:text>
|
---|
| 40 | <xsl:value-of select="$rootid"/>
|
---|
| 41 | <xsl:text>' not found in document.</xsl:text>
|
---|
| 42 | </xsl:message>
|
---|
| 43 | </xsl:when>
|
---|
| 44 | <xsl:otherwise>
|
---|
| 45 | <xsl:message>Formatting from <xsl:value-of select="$rootid"/></xsl:message>
|
---|
| 46 | <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
|
---|
| 47 | </xsl:otherwise>
|
---|
| 48 | </xsl:choose>
|
---|
| 49 | </xsl:when>
|
---|
| 50 | <xsl:otherwise>
|
---|
| 51 | <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
|
---|
| 52 | </xsl:otherwise>
|
---|
| 53 | </xsl:choose>
|
---|
| 54 |
|
---|
| 55 | <xsl:call-template name="helpset"/>
|
---|
| 56 | <xsl:call-template name="helptoc"/>
|
---|
| 57 | <xsl:call-template name="helpmap"/>
|
---|
| 58 | <xsl:call-template name="helpidx"/>
|
---|
| 59 | </xsl:template>
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | <xsl:template name="header.navigation">
|
---|
| 63 | </xsl:template>
|
---|
| 64 |
|
---|
| 65 | <xsl:template name="footer.navigation">
|
---|
| 66 | </xsl:template>
|
---|
| 67 |
|
---|
| 68 | <!-- ==================================================================== -->
|
---|
| 69 |
|
---|
| 70 | <xsl:template name="helpset">
|
---|
| 71 | <xsl:call-template name="write.chunk.with.doctype">
|
---|
| 72 | <xsl:with-param name="filename" select="concat($base.dir,'jhelpset.hs')"/>
|
---|
| 73 | <xsl:with-param name="method" select="'xml'"/>
|
---|
| 74 | <xsl:with-param name="indent" select="'yes'"/>
|
---|
| 75 | <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN'"/>
|
---|
| 76 | <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/helpset_1_0.dtd'"/>
|
---|
| 77 | <xsl:with-param name="content">
|
---|
| 78 | <xsl:call-template name="helpset.content"/>
|
---|
| 79 | </xsl:with-param>
|
---|
| 80 | </xsl:call-template>
|
---|
| 81 | </xsl:template>
|
---|
| 82 |
|
---|
| 83 | <xsl:template name="helpset.content">
|
---|
| 84 | <xsl:variable name="title">
|
---|
| 85 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 86 | </xsl:variable>
|
---|
| 87 |
|
---|
| 88 | <helpset version="1.0">
|
---|
| 89 | <title>
|
---|
| 90 | <xsl:value-of select="$title"/>
|
---|
| 91 | </title>
|
---|
| 92 |
|
---|
| 93 | <!-- maps -->
|
---|
| 94 | <maps>
|
---|
| 95 | <homeID>top</homeID>
|
---|
| 96 | <mapref location="jhelpmap.jhm"/>
|
---|
| 97 | </maps>
|
---|
| 98 |
|
---|
| 99 | <!-- views -->
|
---|
| 100 | <view>
|
---|
| 101 | <name>TOC</name>
|
---|
| 102 | <label>Table Of Contents</label>
|
---|
| 103 | <type>javax.help.TOCView</type>
|
---|
| 104 | <data>jhelptoc.xml</data>
|
---|
| 105 | </view>
|
---|
| 106 |
|
---|
| 107 | <view>
|
---|
| 108 | <name>Index</name>
|
---|
| 109 | <label>Index</label>
|
---|
| 110 | <type>javax.help.IndexView</type>
|
---|
| 111 | <data>jhelpidx.xml</data>
|
---|
| 112 | </view>
|
---|
| 113 |
|
---|
| 114 | <view>
|
---|
| 115 | <name>Search</name>
|
---|
| 116 | <label>Search</label>
|
---|
| 117 | <type>javax.help.SearchView</type>
|
---|
| 118 | <data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
|
---|
| 119 | </view>
|
---|
| 120 | </helpset>
|
---|
| 121 | </xsl:template>
|
---|
| 122 |
|
---|
| 123 | <!-- ==================================================================== -->
|
---|
| 124 |
|
---|
| 125 | <xsl:template name="helptoc">
|
---|
| 126 | <xsl:call-template name="write.chunk.with.doctype">
|
---|
| 127 | <xsl:with-param name="filename" select="concat($base.dir,'jhelptoc.xml')"/>
|
---|
| 128 | <xsl:with-param name="method" select="'xml'"/>
|
---|
| 129 | <xsl:with-param name="indent" select="'yes'"/>
|
---|
| 130 | <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN'"/>
|
---|
| 131 | <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/toc_1_0.dtd'"/>
|
---|
| 132 | <xsl:with-param name="encoding" select="$javahelp.encoding"/>
|
---|
| 133 | <xsl:with-param name="content">
|
---|
| 134 | <xsl:call-template name="helptoc.content"/>
|
---|
| 135 | </xsl:with-param>
|
---|
| 136 | </xsl:call-template>
|
---|
| 137 | </xsl:template>
|
---|
| 138 |
|
---|
| 139 | <xsl:template name="helptoc.content">
|
---|
| 140 | <toc version="1.0">
|
---|
| 141 | <xsl:choose>
|
---|
| 142 | <xsl:when test="$rootid != ''">
|
---|
| 143 | <xsl:apply-templates select="key('id',$rootid)" mode="jhtoc"/>
|
---|
| 144 | </xsl:when>
|
---|
| 145 | <xsl:otherwise>
|
---|
| 146 | <xsl:apply-templates select="." mode="jhtoc"/>
|
---|
| 147 | </xsl:otherwise>
|
---|
| 148 | </xsl:choose>
|
---|
| 149 | </toc>
|
---|
| 150 | </xsl:template>
|
---|
| 151 |
|
---|
| 152 | <xsl:template match="set" mode="jhtoc">
|
---|
| 153 | <xsl:variable name="id">
|
---|
| 154 | <xsl:call-template name="object.id">
|
---|
| 155 | <xsl:with-param name="object" select="."/>
|
---|
| 156 | </xsl:call-template>
|
---|
| 157 | </xsl:variable>
|
---|
| 158 | <xsl:variable name="title">
|
---|
| 159 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 160 | </xsl:variable>
|
---|
| 161 |
|
---|
| 162 | <tocitem target="{$id}">
|
---|
| 163 | <xsl:attribute name="text">
|
---|
| 164 | <xsl:value-of select="$title"/>
|
---|
| 165 | </xsl:attribute>
|
---|
| 166 | <xsl:apply-templates select="book" mode="jhtoc"/>
|
---|
| 167 | </tocitem>
|
---|
| 168 | </xsl:template>
|
---|
| 169 |
|
---|
| 170 | <xsl:template match="book" mode="jhtoc">
|
---|
| 171 | <xsl:variable name="id">
|
---|
| 172 | <xsl:call-template name="object.id"/>
|
---|
| 173 | </xsl:variable>
|
---|
| 174 | <xsl:variable name="title">
|
---|
| 175 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 176 | </xsl:variable>
|
---|
| 177 |
|
---|
| 178 | <tocitem target="{$id}">
|
---|
| 179 | <xsl:attribute name="text">
|
---|
| 180 | <xsl:value-of select="$title"/>
|
---|
| 181 | </xsl:attribute>
|
---|
| 182 | <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon" mode="jhtoc"/>
|
---|
| 183 | </tocitem>
|
---|
| 184 | </xsl:template>
|
---|
| 185 |
|
---|
| 186 | <xsl:template match="part|reference|preface|chapter|appendix|article" mode="jhtoc">
|
---|
| 187 | <xsl:variable name="id">
|
---|
| 188 | <xsl:call-template name="object.id"/>
|
---|
| 189 | </xsl:variable>
|
---|
| 190 | <xsl:variable name="title">
|
---|
| 191 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 192 | </xsl:variable>
|
---|
| 193 |
|
---|
| 194 | <tocitem target="{$id}">
|
---|
| 195 | <xsl:attribute name="text">
|
---|
| 196 | <xsl:value-of select="$title"/>
|
---|
| 197 | </xsl:attribute>
|
---|
| 198 | <xsl:apply-templates select="preface|chapter|appendix|refentry|section|sect1" mode="jhtoc"/>
|
---|
| 199 | </tocitem>
|
---|
| 200 | </xsl:template>
|
---|
| 201 |
|
---|
| 202 | <xsl:template match="section" mode="jhtoc">
|
---|
| 203 | <xsl:variable name="id">
|
---|
| 204 | <xsl:call-template name="object.id"/>
|
---|
| 205 | </xsl:variable>
|
---|
| 206 | <xsl:variable name="title">
|
---|
| 207 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 208 | </xsl:variable>
|
---|
| 209 |
|
---|
| 210 | <tocitem target="{$id}">
|
---|
| 211 | <xsl:attribute name="text">
|
---|
| 212 | <xsl:value-of select="$title"/>
|
---|
| 213 | </xsl:attribute>
|
---|
| 214 | <xsl:apply-templates select="section" mode="jhtoc"/>
|
---|
| 215 | </tocitem>
|
---|
| 216 | </xsl:template>
|
---|
| 217 |
|
---|
| 218 | <xsl:template match="sect1" mode="jhtoc">
|
---|
| 219 | <xsl:variable name="id">
|
---|
| 220 | <xsl:call-template name="object.id"/>
|
---|
| 221 | </xsl:variable>
|
---|
| 222 | <xsl:variable name="title">
|
---|
| 223 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 224 | </xsl:variable>
|
---|
| 225 |
|
---|
| 226 | <tocitem target="{$id}">
|
---|
| 227 | <xsl:attribute name="text">
|
---|
| 228 | <xsl:value-of select="$title"/>
|
---|
| 229 | </xsl:attribute>
|
---|
| 230 | <xsl:apply-templates select="sect2" mode="jhtoc"/>
|
---|
| 231 | </tocitem>
|
---|
| 232 | </xsl:template>
|
---|
| 233 |
|
---|
| 234 | <xsl:template match="sect2" mode="jhtoc">
|
---|
| 235 | <xsl:variable name="id">
|
---|
| 236 | <xsl:call-template name="object.id"/>
|
---|
| 237 | </xsl:variable>
|
---|
| 238 | <xsl:variable name="title">
|
---|
| 239 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 240 | </xsl:variable>
|
---|
| 241 |
|
---|
| 242 | <tocitem target="{$id}">
|
---|
| 243 | <xsl:attribute name="text">
|
---|
| 244 | <xsl:value-of select="$title"/>
|
---|
| 245 | </xsl:attribute>
|
---|
| 246 | <xsl:apply-templates select="sect3" mode="jhtoc"/>
|
---|
| 247 | </tocitem>
|
---|
| 248 | </xsl:template>
|
---|
| 249 |
|
---|
| 250 | <xsl:template match="sect3" mode="jhtoc">
|
---|
| 251 | <xsl:variable name="id">
|
---|
| 252 | <xsl:call-template name="object.id"/>
|
---|
| 253 | </xsl:variable>
|
---|
| 254 | <xsl:variable name="title">
|
---|
| 255 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 256 | </xsl:variable>
|
---|
| 257 |
|
---|
| 258 | <tocitem target="{$id}">
|
---|
| 259 | <xsl:attribute name="text">
|
---|
| 260 | <xsl:value-of select="$title"/>
|
---|
| 261 | </xsl:attribute>
|
---|
| 262 | <xsl:apply-templates select="sect4" mode="jhtoc"/>
|
---|
| 263 | </tocitem>
|
---|
| 264 | </xsl:template>
|
---|
| 265 |
|
---|
| 266 | <xsl:template match="sect4" mode="jhtoc">
|
---|
| 267 | <xsl:variable name="id">
|
---|
| 268 | <xsl:call-template name="object.id"/>
|
---|
| 269 | </xsl:variable>
|
---|
| 270 | <xsl:variable name="title">
|
---|
| 271 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 272 | </xsl:variable>
|
---|
| 273 |
|
---|
| 274 | <tocitem target="{$id}">
|
---|
| 275 | <xsl:attribute name="text">
|
---|
| 276 | <xsl:value-of select="$title"/>
|
---|
| 277 | </xsl:attribute>
|
---|
| 278 | <xsl:apply-templates select="sect5" mode="jhtoc"/>
|
---|
| 279 | </tocitem>
|
---|
| 280 | </xsl:template>
|
---|
| 281 |
|
---|
| 282 | <xsl:template match="sect5|colophon" mode="jhtoc">
|
---|
| 283 | <xsl:variable name="id">
|
---|
| 284 | <xsl:call-template name="object.id"/>
|
---|
| 285 | </xsl:variable>
|
---|
| 286 | <xsl:variable name="title">
|
---|
| 287 | <xsl:apply-templates select="." mode="title.markup"/>
|
---|
| 288 | </xsl:variable>
|
---|
| 289 |
|
---|
| 290 | <tocitem target="{$id}">
|
---|
| 291 | <xsl:attribute name="text">
|
---|
| 292 | <xsl:value-of select="$title"/>
|
---|
| 293 | </xsl:attribute>
|
---|
| 294 | </tocitem>
|
---|
| 295 | </xsl:template>
|
---|
| 296 |
|
---|
| 297 | <!-- ==================================================================== -->
|
---|
| 298 |
|
---|
| 299 | <xsl:template name="helpmap">
|
---|
| 300 | <xsl:call-template name="write.chunk.with.doctype">
|
---|
| 301 | <xsl:with-param name="filename" select="concat($base.dir, 'jhelpmap.jhm')"/>
|
---|
| 302 | <xsl:with-param name="method" select="'xml'"/>
|
---|
| 303 | <xsl:with-param name="indent" select="'yes'"/>
|
---|
| 304 | <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN'"/>
|
---|
| 305 | <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/map_1_0.dtd'"/>
|
---|
| 306 | <xsl:with-param name="encoding" select="$javahelp.encoding"/>
|
---|
| 307 | <xsl:with-param name="content">
|
---|
| 308 | <xsl:call-template name="helpmap.content"/>
|
---|
| 309 | </xsl:with-param>
|
---|
| 310 | </xsl:call-template>
|
---|
| 311 | </xsl:template>
|
---|
| 312 |
|
---|
| 313 | <xsl:template name="helpmap.content">
|
---|
| 314 | <map version="1.0">
|
---|
| 315 | <xsl:choose>
|
---|
| 316 | <xsl:when test="$rootid != ''">
|
---|
| 317 | <xsl:apply-templates select="key('id',$rootid)//set | key('id',$rootid)//book | key('id',$rootid)//part | key('id',$rootid)//reference | key('id',$rootid)//preface | key('id',$rootid)//chapter | key('id',$rootid)//appendix | key('id',$rootid)//article | key('id',$rootid)//colophon | key('id',$rootid)//refentry | key('id',$rootid)//section | key('id',$rootid)//sect1 | key('id',$rootid)//sect2 | key('id',$rootid)//sect3 | key('id',$rootid)//sect4 | key('id',$rootid)//sect5 | key('id',$rootid)//indexterm" mode="map"/>
|
---|
| 318 | </xsl:when>
|
---|
| 319 | <xsl:otherwise>
|
---|
| 320 | <xsl:apply-templates select="//set | //book | //part | //reference | //preface | //chapter | //appendix | //article | //colophon | //refentry | //section | //sect1 | //sect2 | //sect3 | //sect4 | //sect5 | //indexterm" mode="map"/>
|
---|
| 321 | </xsl:otherwise>
|
---|
| 322 | </xsl:choose>
|
---|
| 323 | </map>
|
---|
| 324 | </xsl:template>
|
---|
| 325 |
|
---|
| 326 | <xsl:template match="set" mode="map">
|
---|
| 327 | <xsl:variable name="id">
|
---|
| 328 | <xsl:call-template name="object.id">
|
---|
| 329 | <xsl:with-param name="object" select="."/>
|
---|
| 330 | </xsl:call-template>
|
---|
| 331 | </xsl:variable>
|
---|
| 332 |
|
---|
| 333 | <mapID target="{$id}">
|
---|
| 334 | <xsl:attribute name="url">
|
---|
| 335 | <xsl:call-template name="href.target.uri"/>
|
---|
| 336 | </xsl:attribute>
|
---|
| 337 | </mapID>
|
---|
| 338 | </xsl:template>
|
---|
| 339 |
|
---|
| 340 | <xsl:template match="book" mode="map">
|
---|
| 341 | <xsl:variable name="id">
|
---|
| 342 | <xsl:call-template name="object.id"/>
|
---|
| 343 | </xsl:variable>
|
---|
| 344 |
|
---|
| 345 | <mapID target="{$id}">
|
---|
| 346 | <xsl:attribute name="url">
|
---|
| 347 | <xsl:call-template name="href.target.uri"/>
|
---|
| 348 | </xsl:attribute>
|
---|
| 349 | </mapID>
|
---|
| 350 | </xsl:template>
|
---|
| 351 |
|
---|
| 352 | <xsl:template match="part|reference|preface|chapter|appendix|article" mode="map">
|
---|
| 353 | <xsl:variable name="id">
|
---|
| 354 | <xsl:call-template name="object.id"/>
|
---|
| 355 | </xsl:variable>
|
---|
| 356 |
|
---|
| 357 | <mapID target="{$id}">
|
---|
| 358 | <xsl:attribute name="url">
|
---|
| 359 | <xsl:call-template name="href.target.uri"/>
|
---|
| 360 | </xsl:attribute>
|
---|
| 361 | </mapID>
|
---|
| 362 | </xsl:template>
|
---|
| 363 |
|
---|
| 364 | <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|colophon" mode="map">
|
---|
| 365 | <xsl:variable name="id">
|
---|
| 366 | <xsl:call-template name="object.id"/>
|
---|
| 367 | </xsl:variable>
|
---|
| 368 |
|
---|
| 369 | <mapID target="{$id}">
|
---|
| 370 | <xsl:attribute name="url">
|
---|
| 371 | <xsl:call-template name="href.target.uri"/>
|
---|
| 372 | </xsl:attribute>
|
---|
| 373 | </mapID>
|
---|
| 374 | </xsl:template>
|
---|
| 375 |
|
---|
| 376 | <xsl:template match="indexterm" mode="map">
|
---|
| 377 | <xsl:variable name="id">
|
---|
| 378 | <xsl:call-template name="object.id"/>
|
---|
| 379 | </xsl:variable>
|
---|
| 380 |
|
---|
| 381 | <mapID target="{$id}">
|
---|
| 382 | <xsl:attribute name="url">
|
---|
| 383 | <xsl:call-template name="href.target.uri"/>
|
---|
| 384 | </xsl:attribute>
|
---|
| 385 | </mapID>
|
---|
| 386 | </xsl:template>
|
---|
| 387 |
|
---|
| 388 | <!-- ==================================================================== -->
|
---|
| 389 |
|
---|
| 390 | <xsl:template name="helpidx">
|
---|
| 391 | <xsl:call-template name="write.chunk.with.doctype">
|
---|
| 392 | <xsl:with-param name="filename" select="concat($base.dir, 'jhelpidx.xml')"/>
|
---|
| 393 | <xsl:with-param name="method" select="'xml'"/>
|
---|
| 394 | <xsl:with-param name="indent" select="'yes'"/>
|
---|
| 395 | <xsl:with-param name="doctype-public" select="'-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN'"/>
|
---|
| 396 | <xsl:with-param name="doctype-system" select="'http://java.sun.com/products/javahelp/index_1_0.dtd'"/>
|
---|
| 397 | <xsl:with-param name="encoding" select="$javahelp.encoding"/>
|
---|
| 398 | <xsl:with-param name="content">
|
---|
| 399 | <xsl:call-template name="helpidx.content"/>
|
---|
| 400 | </xsl:with-param>
|
---|
| 401 | </xsl:call-template>
|
---|
| 402 | </xsl:template>
|
---|
| 403 |
|
---|
| 404 | <xsl:template name="helpidx.content">
|
---|
| 405 | <index version="1.0">
|
---|
| 406 | <xsl:choose>
|
---|
| 407 | <xsl:when test="$rootid != ''">
|
---|
| 408 | <xsl:apply-templates select="key('id',$rootid)//indexterm" mode="idx"/>
|
---|
| 409 | </xsl:when>
|
---|
| 410 | <xsl:otherwise>
|
---|
| 411 | <xsl:apply-templates select="//indexterm" mode="idx"/>
|
---|
| 412 | </xsl:otherwise>
|
---|
| 413 | </xsl:choose>
|
---|
| 414 | </index>
|
---|
| 415 | </xsl:template>
|
---|
| 416 |
|
---|
| 417 | <xsl:template match="indexterm" mode="idx">
|
---|
| 418 | <xsl:variable name="id">
|
---|
| 419 | <xsl:call-template name="object.id"/>
|
---|
| 420 | </xsl:variable>
|
---|
| 421 |
|
---|
| 422 | <xsl:variable name="text">
|
---|
| 423 | <xsl:value-of select="primary"/>
|
---|
| 424 | <xsl:if test="secondary">
|
---|
| 425 | <xsl:text>, </xsl:text>
|
---|
| 426 | <xsl:value-of select="secondary"/>
|
---|
| 427 | </xsl:if>
|
---|
| 428 | <xsl:if test="tertiary">
|
---|
| 429 | <xsl:text>, </xsl:text>
|
---|
| 430 | <xsl:value-of select="tertiary"/>
|
---|
| 431 | </xsl:if>
|
---|
| 432 | </xsl:variable>
|
---|
| 433 |
|
---|
| 434 | <xsl:choose>
|
---|
| 435 | <xsl:when test="see">
|
---|
| 436 | <xsl:variable name="see"><xsl:value-of select="see"/></xsl:variable>
|
---|
| 437 | <indexitem text="{$text} see '{$see}'"/>
|
---|
| 438 | </xsl:when>
|
---|
| 439 | <xsl:otherwise>
|
---|
| 440 | <indexitem text="{$text}" target="{$id}"/>
|
---|
| 441 | </xsl:otherwise>
|
---|
| 442 | </xsl:choose>
|
---|
| 443 | </xsl:template>
|
---|
| 444 |
|
---|
| 445 | <!-- ==================================================================== -->
|
---|
| 446 | <!-- Kludge for Xalan outputting ™ which fails in javahelp -->
|
---|
| 447 | <xsl:template name="dingbat.characters">
|
---|
| 448 | <!-- now that I'm using the real serializer, all that dingbat malarky -->
|
---|
| 449 | <!-- isn't necessary anymore... -->
|
---|
| 450 | <xsl:param name="dingbat">bullet</xsl:param>
|
---|
| 451 |
|
---|
| 452 | <xsl:choose>
|
---|
| 453 | <xsl:when test="$dingbat='bullet'">•</xsl:when>
|
---|
| 454 | <xsl:when test="$dingbat='copyright'">©</xsl:when>
|
---|
| 455 | <xsl:when test="$dingbat='trademark' or $dingbat='trade'">
|
---|
| 456 | <xsl:choose>
|
---|
| 457 | <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
|
---|
| 458 | <sup>TM</sup>
|
---|
| 459 | </xsl:when>
|
---|
| 460 | <xsl:otherwise>™</xsl:otherwise>
|
---|
| 461 | </xsl:choose>
|
---|
| 462 | </xsl:when>
|
---|
| 463 | <xsl:when test="$dingbat='registered'">®</xsl:when>
|
---|
| 464 | <xsl:when test="$dingbat='service'">(SM)</xsl:when>
|
---|
| 465 | <xsl:when test="$dingbat='nbsp'"> </xsl:when>
|
---|
| 466 | <xsl:when test="$dingbat='ldquo'">“</xsl:when>
|
---|
| 467 | <xsl:when test="$dingbat='rdquo'">”</xsl:when>
|
---|
| 468 | <xsl:when test="$dingbat='lsquo'">‘</xsl:when>
|
---|
| 469 | <xsl:when test="$dingbat='rsquo'">’</xsl:when>
|
---|
| 470 | <xsl:when test="$dingbat='em-dash'">—</xsl:when>
|
---|
| 471 | <xsl:when test="$dingbat='mdash'">—</xsl:when>
|
---|
| 472 | <xsl:when test="$dingbat='en-dash'">–</xsl:when>
|
---|
| 473 | <xsl:when test="$dingbat='ndash'">–</xsl:when>
|
---|
| 474 | <xsl:otherwise>
|
---|
| 475 | <xsl:text>•</xsl:text>
|
---|
| 476 | </xsl:otherwise>
|
---|
| 477 | </xsl:choose>
|
---|
| 478 | </xsl:template>
|
---|
| 479 |
|
---|
| 480 | </xsl:stylesheet>
|
---|