[15c7d39] | 1 | <?xml version='1.0'?>
|
---|
| 2 | <!DOCTYPE xsl:stylesheet [
|
---|
| 3 | <!ENTITY % common.entities SYSTEM "../common/entities.ent">
|
---|
| 4 | %common.entities;
|
---|
| 5 | ]>
|
---|
| 6 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 7 | xmlns:xlink='http://www.w3.org/1999/xlink'
|
---|
| 8 | xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
|
---|
| 9 | exclude-result-prefixes="xlink suwl"
|
---|
| 10 | version='1.0'>
|
---|
[c873d807] | 11 |
|
---|
| 12 | <!-- ********************************************************************
|
---|
[15c7d39] | 13 | $Id: inline.xsl 9663 2012-11-06 19:09:16Z bobstayton $
|
---|
[c873d807] | 14 | ********************************************************************
|
---|
| 15 |
|
---|
| 16 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
| 17 | See ../README or http://docbook.sf.net/release/xsl/current/ for
|
---|
| 18 | copyright and other information.
|
---|
| 19 |
|
---|
| 20 | ******************************************************************** -->
|
---|
[15c7d39] | 21 |
|
---|
| 22 | <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
|
---|
| 23 | <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
|
---|
| 24 |
|
---|
[c873d807] | 25 | <xsl:template name="simple.xlink">
|
---|
| 26 | <xsl:param name="node" select="."/>
|
---|
| 27 | <xsl:param name="content">
|
---|
| 28 | <xsl:apply-templates/>
|
---|
| 29 | </xsl:param>
|
---|
| 30 | <xsl:param name="linkend" select="$node/@linkend"/>
|
---|
| 31 | <xsl:param name="xhref" select="$node/@xlink:href"/>
|
---|
| 32 |
|
---|
[15c7d39] | 33 | <!-- Support for @xlink:show -->
|
---|
| 34 | <xsl:variable name="target.show">
|
---|
| 35 | <xsl:choose>
|
---|
| 36 | <xsl:when test="$node/@xlink:show = 'new'">_blank</xsl:when>
|
---|
| 37 | <xsl:when test="$node/@xlink:show = 'replace'">_top</xsl:when>
|
---|
| 38 | <xsl:otherwise></xsl:otherwise>
|
---|
| 39 | </xsl:choose>
|
---|
| 40 | </xsl:variable>
|
---|
| 41 |
|
---|
[c873d807] | 42 | <xsl:variable name="link">
|
---|
| 43 | <xsl:choose>
|
---|
[15c7d39] | 44 | <xsl:when test="$xhref and
|
---|
| 45 | (not($node/@xlink:type) or
|
---|
| 46 | $node/@xlink:type='simple')">
|
---|
[c873d807] | 47 |
|
---|
| 48 | <!-- Is it a local idref or a uri? -->
|
---|
| 49 | <xsl:variable name="is.idref">
|
---|
| 50 | <xsl:choose>
|
---|
| 51 | <!-- if the href starts with # and does not contain an "(" -->
|
---|
| 52 | <!-- or if the href starts with #xpointer(id(, it's just an ID -->
|
---|
[15c7d39] | 53 | <xsl:when test="starts-with($xhref,'#')
|
---|
| 54 | and (not(contains($xhref,'('))
|
---|
| 55 | or starts-with($xhref,
|
---|
| 56 | '#xpointer(id('))">1</xsl:when>
|
---|
[c873d807] | 57 | <xsl:otherwise>0</xsl:otherwise>
|
---|
| 58 | </xsl:choose>
|
---|
| 59 | </xsl:variable>
|
---|
| 60 |
|
---|
| 61 | <!-- Is it an olink ? -->
|
---|
| 62 | <xsl:variable name="is.olink">
|
---|
| 63 | <xsl:choose>
|
---|
[15c7d39] | 64 | <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
|
---|
[c873d807] | 65 | <!-- and if the href contains # -->
|
---|
[15c7d39] | 66 | <xsl:when test="contains($xhref,'#') and
|
---|
| 67 | @xlink:role = $xolink.role">1</xsl:when>
|
---|
[c873d807] | 68 | <xsl:otherwise>0</xsl:otherwise>
|
---|
| 69 | </xsl:choose>
|
---|
| 70 | </xsl:variable>
|
---|
| 71 |
|
---|
| 72 | <xsl:choose>
|
---|
[15c7d39] | 73 | <xsl:when test="$is.olink = 1">
|
---|
| 74 | <xsl:call-template name="olink">
|
---|
| 75 | <xsl:with-param name="content" select="$content"/>
|
---|
| 76 | </xsl:call-template>
|
---|
| 77 | </xsl:when>
|
---|
| 78 |
|
---|
[c873d807] | 79 | <xsl:when test="$is.idref = 1">
|
---|
| 80 |
|
---|
| 81 | <xsl:variable name="idref">
|
---|
| 82 | <xsl:call-template name="xpointer.idref">
|
---|
| 83 | <xsl:with-param name="xpointer" select="$xhref"/>
|
---|
| 84 | </xsl:call-template>
|
---|
| 85 | </xsl:variable>
|
---|
| 86 |
|
---|
| 87 | <xsl:variable name="targets" select="key('id',$idref)"/>
|
---|
| 88 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 89 |
|
---|
| 90 | <xsl:call-template name="check.id.unique">
|
---|
| 91 | <xsl:with-param name="linkend" select="$idref"/>
|
---|
| 92 | </xsl:call-template>
|
---|
| 93 |
|
---|
| 94 | <xsl:choose>
|
---|
| 95 | <xsl:when test="count($target) = 0">
|
---|
| 96 | <xsl:message>
|
---|
| 97 | <xsl:text>XLink to nonexistent id: </xsl:text>
|
---|
| 98 | <xsl:value-of select="$idref"/>
|
---|
| 99 | </xsl:message>
|
---|
| 100 | <xsl:copy-of select="$content"/>
|
---|
| 101 | </xsl:when>
|
---|
| 102 |
|
---|
| 103 | <xsl:otherwise>
|
---|
| 104 | <a>
|
---|
[15c7d39] | 105 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 106 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 107 |
|
---|
| 108 | <xsl:attribute name="href">
|
---|
| 109 | <xsl:call-template name="href.target">
|
---|
| 110 | <xsl:with-param name="object" select="$target"/>
|
---|
| 111 | </xsl:call-template>
|
---|
| 112 | </xsl:attribute>
|
---|
| 113 |
|
---|
| 114 | <xsl:choose>
|
---|
[c1fe047a] | 115 | <xsl:when test="$node/@xlink:title">
|
---|
[c873d807] | 116 | <xsl:attribute name="title">
|
---|
| 117 | <xsl:value-of select="$node/@xlink:title"/>
|
---|
| 118 | </xsl:attribute>
|
---|
| 119 | </xsl:when>
|
---|
| 120 | <xsl:otherwise>
|
---|
[15c7d39] | 121 | <xsl:apply-templates select="$target"
|
---|
| 122 | mode="html.title.attribute"/>
|
---|
[c873d807] | 123 | </xsl:otherwise>
|
---|
| 124 | </xsl:choose>
|
---|
| 125 |
|
---|
[15c7d39] | 126 | <xsl:if test="$target.show !=''">
|
---|
[c873d807] | 127 | <xsl:attribute name="target">
|
---|
[15c7d39] | 128 | <xsl:value-of select="$target.show"/>
|
---|
[c873d807] | 129 | </xsl:attribute>
|
---|
| 130 | </xsl:if>
|
---|
| 131 |
|
---|
| 132 | <xsl:copy-of select="$content"/>
|
---|
| 133 |
|
---|
| 134 | </a>
|
---|
| 135 | </xsl:otherwise>
|
---|
| 136 | </xsl:choose>
|
---|
| 137 | </xsl:when>
|
---|
| 138 |
|
---|
| 139 | <!-- otherwise it's a URI -->
|
---|
| 140 | <xsl:otherwise>
|
---|
| 141 | <a>
|
---|
[15c7d39] | 142 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 143 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 144 | <xsl:attribute name="href">
|
---|
| 145 | <xsl:value-of select="$xhref"/>
|
---|
| 146 | </xsl:attribute>
|
---|
[c1fe047a] | 147 | <xsl:if test="$node/@xlink:title">
|
---|
[c873d807] | 148 | <xsl:attribute name="title">
|
---|
| 149 | <xsl:value-of select="$node/@xlink:title"/>
|
---|
| 150 | </xsl:attribute>
|
---|
| 151 | </xsl:if>
|
---|
[15c7d39] | 152 |
|
---|
| 153 | <!-- For URIs, use @xlink:show if defined, otherwise use ulink.target -->
|
---|
| 154 | <xsl:choose>
|
---|
| 155 | <xsl:when test="$target.show !=''">
|
---|
| 156 | <xsl:attribute name="target">
|
---|
| 157 | <xsl:value-of select="$target.show"/>
|
---|
| 158 | </xsl:attribute>
|
---|
| 159 | </xsl:when>
|
---|
| 160 | <xsl:when test="$ulink.target !=''">
|
---|
| 161 | <xsl:attribute name="target">
|
---|
| 162 | <xsl:value-of select="$ulink.target"/>
|
---|
| 163 | </xsl:attribute>
|
---|
| 164 | </xsl:when>
|
---|
| 165 | </xsl:choose>
|
---|
| 166 |
|
---|
[c873d807] | 167 | <xsl:copy-of select="$content"/>
|
---|
| 168 | </a>
|
---|
| 169 | </xsl:otherwise>
|
---|
| 170 | </xsl:choose>
|
---|
| 171 | </xsl:when>
|
---|
| 172 |
|
---|
| 173 | <xsl:when test="$linkend">
|
---|
| 174 | <xsl:variable name="targets" select="key('id',$linkend)"/>
|
---|
| 175 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 176 |
|
---|
| 177 | <xsl:call-template name="check.id.unique">
|
---|
| 178 | <xsl:with-param name="linkend" select="$linkend"/>
|
---|
| 179 | </xsl:call-template>
|
---|
| 180 |
|
---|
| 181 | <a>
|
---|
[15c7d39] | 182 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 183 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 184 | <xsl:attribute name="href">
|
---|
| 185 | <xsl:call-template name="href.target">
|
---|
| 186 | <xsl:with-param name="object" select="$target"/>
|
---|
| 187 | </xsl:call-template>
|
---|
| 188 | </xsl:attribute>
|
---|
| 189 |
|
---|
| 190 | <xsl:apply-templates select="$target" mode="html.title.attribute"/>
|
---|
| 191 |
|
---|
| 192 | <xsl:copy-of select="$content"/>
|
---|
| 193 |
|
---|
| 194 | </a>
|
---|
| 195 | </xsl:when>
|
---|
| 196 | <xsl:otherwise>
|
---|
| 197 | <xsl:copy-of select="$content"/>
|
---|
| 198 | </xsl:otherwise>
|
---|
| 199 | </xsl:choose>
|
---|
| 200 | </xsl:variable>
|
---|
| 201 |
|
---|
| 202 | <xsl:choose>
|
---|
| 203 | <xsl:when test="function-available('suwl:unwrapLinks')">
|
---|
| 204 | <xsl:copy-of select="suwl:unwrapLinks($link)"/>
|
---|
| 205 | </xsl:when>
|
---|
| 206 | <xsl:otherwise>
|
---|
| 207 | <xsl:copy-of select="$link"/>
|
---|
| 208 | </xsl:otherwise>
|
---|
| 209 | </xsl:choose>
|
---|
| 210 | </xsl:template>
|
---|
| 211 |
|
---|
| 212 | <xsl:template name="inline.charseq">
|
---|
| 213 | <xsl:param name="content">
|
---|
| 214 | <xsl:call-template name="anchor"/>
|
---|
| 215 | <xsl:call-template name="simple.xlink">
|
---|
| 216 | <xsl:with-param name="content">
|
---|
| 217 | <xsl:apply-templates/>
|
---|
| 218 | </xsl:with-param>
|
---|
| 219 | </xsl:call-template>
|
---|
| 220 | </xsl:param>
|
---|
| 221 | <!-- * if you want output from the inline.charseq template wrapped in -->
|
---|
| 222 | <!-- * something other than a Span, call the template with some value -->
|
---|
| 223 | <!-- * for the 'wrapper-name' param -->
|
---|
| 224 | <xsl:param name="wrapper-name">span</xsl:param>
|
---|
[15c7d39] | 225 | <xsl:element name="{$wrapper-name}">
|
---|
[c873d807] | 226 | <xsl:attribute name="class">
|
---|
| 227 | <xsl:value-of select="local-name(.)"/>
|
---|
| 228 | </xsl:attribute>
|
---|
[15c7d39] | 229 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 230 | <xsl:call-template name="dir"/>
|
---|
| 231 | <xsl:call-template name="generate.html.title"/>
|
---|
| 232 | <xsl:copy-of select="$content"/>
|
---|
| 233 | <xsl:call-template name="apply-annotations"/>
|
---|
| 234 | </xsl:element>
|
---|
| 235 | </xsl:template>
|
---|
| 236 |
|
---|
| 237 | <xsl:template name="inline.monoseq">
|
---|
| 238 | <xsl:param name="content">
|
---|
| 239 | <xsl:call-template name="anchor"/>
|
---|
| 240 | <xsl:call-template name="simple.xlink">
|
---|
| 241 | <xsl:with-param name="content">
|
---|
| 242 | <xsl:apply-templates/>
|
---|
| 243 | </xsl:with-param>
|
---|
| 244 | </xsl:call-template>
|
---|
| 245 | </xsl:param>
|
---|
| 246 | <code>
|
---|
[15c7d39] | 247 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 248 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 249 | <xsl:copy-of select="$content"/>
|
---|
| 250 | <xsl:call-template name="apply-annotations"/>
|
---|
| 251 | </code>
|
---|
| 252 | </xsl:template>
|
---|
| 253 |
|
---|
| 254 | <xsl:template name="inline.boldseq">
|
---|
| 255 | <xsl:param name="content">
|
---|
| 256 | <xsl:call-template name="anchor"/>
|
---|
| 257 | <xsl:call-template name="simple.xlink">
|
---|
| 258 | <xsl:with-param name="content">
|
---|
| 259 | <xsl:apply-templates/>
|
---|
| 260 | </xsl:with-param>
|
---|
| 261 | </xsl:call-template>
|
---|
| 262 | </xsl:param>
|
---|
| 263 |
|
---|
| 264 | <span>
|
---|
[15c7d39] | 265 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 266 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 267 |
|
---|
| 268 | <!-- don't put <strong> inside figure, example, or table titles -->
|
---|
| 269 | <xsl:choose>
|
---|
[15c7d39] | 270 | <xsl:when test="local-name(..) = 'title'
|
---|
| 271 | and (local-name(../..) = 'figure'
|
---|
| 272 | or local-name(../..) = 'example'
|
---|
| 273 | or local-name(../..) = 'table')">
|
---|
[c873d807] | 274 | <xsl:copy-of select="$content"/>
|
---|
| 275 | </xsl:when>
|
---|
| 276 | <xsl:otherwise>
|
---|
| 277 | <strong>
|
---|
| 278 | <xsl:copy-of select="$content"/>
|
---|
| 279 | </strong>
|
---|
| 280 | </xsl:otherwise>
|
---|
| 281 | </xsl:choose>
|
---|
| 282 | <xsl:call-template name="apply-annotations"/>
|
---|
| 283 | </span>
|
---|
| 284 | </xsl:template>
|
---|
| 285 |
|
---|
| 286 | <xsl:template name="inline.italicseq">
|
---|
| 287 | <xsl:param name="content">
|
---|
| 288 | <xsl:call-template name="anchor"/>
|
---|
| 289 | <xsl:call-template name="simple.xlink">
|
---|
| 290 | <xsl:with-param name="content">
|
---|
| 291 | <xsl:apply-templates/>
|
---|
| 292 | </xsl:with-param>
|
---|
| 293 | </xsl:call-template>
|
---|
| 294 | </xsl:param>
|
---|
| 295 | <em>
|
---|
[15c7d39] | 296 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 297 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 298 | <xsl:copy-of select="$content"/>
|
---|
| 299 | <xsl:call-template name="apply-annotations"/>
|
---|
| 300 | </em>
|
---|
| 301 | </xsl:template>
|
---|
| 302 |
|
---|
| 303 | <xsl:template name="inline.boldmonoseq">
|
---|
| 304 | <xsl:param name="content">
|
---|
| 305 | <xsl:call-template name="anchor"/>
|
---|
| 306 | <xsl:call-template name="simple.xlink">
|
---|
| 307 | <xsl:with-param name="content">
|
---|
| 308 | <xsl:apply-templates/>
|
---|
| 309 | </xsl:with-param>
|
---|
| 310 | </xsl:call-template>
|
---|
| 311 | </xsl:param>
|
---|
| 312 | <!-- don't put <strong> inside figure, example, or table titles -->
|
---|
| 313 | <!-- or other titles that may already be represented with <strong>'s. -->
|
---|
| 314 | <xsl:choose>
|
---|
[15c7d39] | 315 | <xsl:when test="local-name(..) = 'title'
|
---|
| 316 | and (local-name(../..) = 'figure'
|
---|
| 317 | or local-name(../..) = 'example'
|
---|
| 318 | or local-name(../..) = 'table'
|
---|
| 319 | or local-name(../..) = 'formalpara')">
|
---|
[c873d807] | 320 | <code>
|
---|
[15c7d39] | 321 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 322 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 323 | <xsl:copy-of select="$content"/>
|
---|
| 324 | <xsl:call-template name="apply-annotations"/>
|
---|
| 325 | </code>
|
---|
| 326 | </xsl:when>
|
---|
| 327 | <xsl:otherwise>
|
---|
| 328 | <strong>
|
---|
[15c7d39] | 329 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 330 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 331 | <code>
|
---|
| 332 | <xsl:call-template name="generate.html.title"/>
|
---|
| 333 | <xsl:call-template name="dir"/>
|
---|
| 334 | <xsl:copy-of select="$content"/>
|
---|
| 335 | </code>
|
---|
| 336 | <xsl:call-template name="apply-annotations"/>
|
---|
| 337 | </strong>
|
---|
| 338 | </xsl:otherwise>
|
---|
| 339 | </xsl:choose>
|
---|
| 340 | </xsl:template>
|
---|
| 341 |
|
---|
| 342 | <xsl:template name="inline.italicmonoseq">
|
---|
| 343 | <xsl:param name="content">
|
---|
| 344 | <xsl:call-template name="anchor"/>
|
---|
| 345 | <xsl:call-template name="simple.xlink">
|
---|
| 346 | <xsl:with-param name="content">
|
---|
| 347 | <xsl:apply-templates/>
|
---|
| 348 | </xsl:with-param>
|
---|
| 349 | </xsl:call-template>
|
---|
| 350 | </xsl:param>
|
---|
| 351 | <em>
|
---|
[15c7d39] | 352 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 353 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 354 | <code>
|
---|
| 355 | <xsl:call-template name="generate.html.title"/>
|
---|
| 356 | <xsl:call-template name="dir"/>
|
---|
| 357 | <xsl:copy-of select="$content"/>
|
---|
| 358 | <xsl:call-template name="apply-annotations"/>
|
---|
| 359 | </code>
|
---|
| 360 | </em>
|
---|
| 361 | </xsl:template>
|
---|
| 362 |
|
---|
| 363 | <xsl:template name="inline.superscriptseq">
|
---|
| 364 | <xsl:param name="content">
|
---|
| 365 | <xsl:call-template name="anchor"/>
|
---|
| 366 | <xsl:call-template name="simple.xlink">
|
---|
| 367 | <xsl:with-param name="content">
|
---|
| 368 | <xsl:apply-templates/>
|
---|
| 369 | </xsl:with-param>
|
---|
| 370 | </xsl:call-template>
|
---|
| 371 | </xsl:param>
|
---|
| 372 | <sup>
|
---|
| 373 | <xsl:call-template name="generate.html.title"/>
|
---|
[15c7d39] | 374 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 375 | <xsl:call-template name="dir"/>
|
---|
| 376 | <xsl:copy-of select="$content"/>
|
---|
| 377 | <xsl:call-template name="apply-annotations"/>
|
---|
| 378 | </sup>
|
---|
| 379 | </xsl:template>
|
---|
| 380 |
|
---|
| 381 | <xsl:template name="inline.subscriptseq">
|
---|
| 382 | <xsl:param name="content">
|
---|
| 383 | <xsl:call-template name="anchor"/>
|
---|
| 384 | <xsl:call-template name="simple.xlink">
|
---|
| 385 | <xsl:with-param name="content">
|
---|
| 386 | <xsl:apply-templates/>
|
---|
| 387 | </xsl:with-param>
|
---|
| 388 | </xsl:call-template>
|
---|
| 389 | </xsl:param>
|
---|
| 390 | <sub>
|
---|
| 391 | <xsl:call-template name="generate.html.title"/>
|
---|
[15c7d39] | 392 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 393 | <xsl:call-template name="dir"/>
|
---|
| 394 | <xsl:copy-of select="$content"/>
|
---|
| 395 | <xsl:call-template name="apply-annotations"/>
|
---|
| 396 | </sub>
|
---|
| 397 | </xsl:template>
|
---|
| 398 |
|
---|
| 399 | <!-- ==================================================================== -->
|
---|
| 400 | <!-- some special cases -->
|
---|
| 401 |
|
---|
| 402 | <xsl:template match="author">
|
---|
| 403 | <xsl:param name="content">
|
---|
| 404 | <xsl:call-template name="anchor"/>
|
---|
| 405 | <xsl:call-template name="simple.xlink">
|
---|
| 406 | <xsl:with-param name="content">
|
---|
| 407 | <xsl:call-template name="person.name"/>
|
---|
| 408 | </xsl:with-param>
|
---|
| 409 | </xsl:call-template>
|
---|
| 410 | <xsl:call-template name="apply-annotations"/>
|
---|
| 411 | </xsl:param>
|
---|
| 412 |
|
---|
| 413 | <span>
|
---|
[15c7d39] | 414 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 415 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 416 | <xsl:copy-of select="$content"/>
|
---|
| 417 | </span>
|
---|
| 418 | </xsl:template>
|
---|
| 419 |
|
---|
| 420 | <xsl:template match="editor">
|
---|
| 421 | <xsl:param name="content">
|
---|
| 422 | <xsl:call-template name="anchor"/>
|
---|
| 423 | <xsl:call-template name="simple.xlink">
|
---|
| 424 | <xsl:with-param name="content">
|
---|
| 425 | <xsl:call-template name="person.name"/>
|
---|
| 426 | </xsl:with-param>
|
---|
| 427 | </xsl:call-template>
|
---|
| 428 | <xsl:call-template name="apply-annotations"/>
|
---|
| 429 | </xsl:param>
|
---|
| 430 |
|
---|
| 431 | <span>
|
---|
[15c7d39] | 432 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 433 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 434 | <xsl:copy-of select="$content"/>
|
---|
| 435 | </span>
|
---|
| 436 | </xsl:template>
|
---|
| 437 |
|
---|
| 438 | <xsl:template match="othercredit">
|
---|
| 439 | <xsl:param name="content">
|
---|
| 440 | <xsl:call-template name="anchor"/>
|
---|
| 441 | <xsl:call-template name="simple.xlink">
|
---|
| 442 | <xsl:with-param name="content">
|
---|
| 443 | <xsl:call-template name="person.name"/>
|
---|
| 444 | </xsl:with-param>
|
---|
| 445 | </xsl:call-template>
|
---|
| 446 | <xsl:call-template name="apply-annotations"/>
|
---|
| 447 | </xsl:param>
|
---|
| 448 |
|
---|
| 449 | <span>
|
---|
[15c7d39] | 450 | <xsl:call-template name="common.html.attributes"/>
|
---|
| 451 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 452 | <xsl:copy-of select="$content"/>
|
---|
| 453 | </span>
|
---|
| 454 | </xsl:template>
|
---|
| 455 |
|
---|
| 456 | <xsl:template match="authorinitials">
|
---|
| 457 | <xsl:call-template name="inline.charseq"/>
|
---|
| 458 | </xsl:template>
|
---|
| 459 |
|
---|
| 460 | <!-- ==================================================================== -->
|
---|
| 461 |
|
---|
| 462 | <xsl:template match="accel">
|
---|
| 463 | <xsl:call-template name="inline.charseq"/>
|
---|
| 464 | </xsl:template>
|
---|
| 465 |
|
---|
| 466 | <xsl:template match="action">
|
---|
| 467 | <xsl:call-template name="inline.charseq"/>
|
---|
| 468 | </xsl:template>
|
---|
| 469 |
|
---|
| 470 | <xsl:template match="application">
|
---|
| 471 | <xsl:call-template name="inline.charseq"/>
|
---|
| 472 | </xsl:template>
|
---|
| 473 |
|
---|
| 474 | <xsl:template match="classname">
|
---|
| 475 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 476 | </xsl:template>
|
---|
| 477 |
|
---|
| 478 | <xsl:template match="exceptionname">
|
---|
| 479 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 480 | </xsl:template>
|
---|
| 481 |
|
---|
| 482 | <xsl:template match="interfacename">
|
---|
| 483 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 484 | </xsl:template>
|
---|
| 485 |
|
---|
| 486 | <xsl:template match="methodname">
|
---|
| 487 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 488 | </xsl:template>
|
---|
| 489 |
|
---|
| 490 | <xsl:template match="command">
|
---|
| 491 | <xsl:call-template name="inline.boldseq"/>
|
---|
| 492 | </xsl:template>
|
---|
| 493 |
|
---|
| 494 | <xsl:template match="computeroutput">
|
---|
| 495 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 496 | </xsl:template>
|
---|
| 497 |
|
---|
| 498 | <xsl:template match="constant">
|
---|
| 499 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 500 | </xsl:template>
|
---|
| 501 |
|
---|
| 502 | <xsl:template match="database">
|
---|
| 503 | <xsl:call-template name="inline.charseq"/>
|
---|
| 504 | </xsl:template>
|
---|
| 505 |
|
---|
| 506 | <xsl:template match="date">
|
---|
| 507 | <!-- should this support locale-specific formatting? how? -->
|
---|
| 508 | <xsl:call-template name="inline.charseq"/>
|
---|
| 509 | </xsl:template>
|
---|
| 510 |
|
---|
| 511 | <xsl:template match="errorcode">
|
---|
| 512 | <xsl:call-template name="inline.charseq"/>
|
---|
| 513 | </xsl:template>
|
---|
| 514 |
|
---|
| 515 | <xsl:template match="errorname">
|
---|
| 516 | <xsl:call-template name="inline.charseq"/>
|
---|
| 517 | </xsl:template>
|
---|
| 518 |
|
---|
| 519 | <xsl:template match="errortype">
|
---|
| 520 | <xsl:call-template name="inline.charseq"/>
|
---|
| 521 | </xsl:template>
|
---|
| 522 |
|
---|
| 523 | <xsl:template match="errortext">
|
---|
| 524 | <xsl:call-template name="inline.charseq"/>
|
---|
| 525 | </xsl:template>
|
---|
| 526 |
|
---|
| 527 | <xsl:template match="envar">
|
---|
| 528 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 529 | </xsl:template>
|
---|
| 530 |
|
---|
| 531 | <xsl:template match="filename">
|
---|
| 532 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 533 | </xsl:template>
|
---|
| 534 |
|
---|
| 535 | <xsl:template match="function">
|
---|
| 536 | <xsl:choose>
|
---|
[15c7d39] | 537 | <xsl:when test="$function.parens != '0'
|
---|
| 538 | and (parameter or function or replaceable)">
|
---|
[c873d807] | 539 | <xsl:variable name="nodes" select="text()|*"/>
|
---|
| 540 | <xsl:call-template name="inline.monoseq">
|
---|
| 541 | <xsl:with-param name="content">
|
---|
| 542 | <xsl:call-template name="simple.xlink">
|
---|
| 543 | <xsl:with-param name="content">
|
---|
| 544 | <xsl:apply-templates select="$nodes[1]"/>
|
---|
| 545 | </xsl:with-param>
|
---|
| 546 | </xsl:call-template>
|
---|
| 547 | </xsl:with-param>
|
---|
| 548 | </xsl:call-template>
|
---|
| 549 | <xsl:text>(</xsl:text>
|
---|
[15c7d39] | 550 | <xsl:apply-templates select="$nodes[position()>1]"/>
|
---|
[c873d807] | 551 | <xsl:text>)</xsl:text>
|
---|
| 552 | </xsl:when>
|
---|
| 553 | <xsl:otherwise>
|
---|
| 554 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 555 | </xsl:otherwise>
|
---|
| 556 | </xsl:choose>
|
---|
| 557 | </xsl:template>
|
---|
| 558 |
|
---|
| 559 | <xsl:template match="function/parameter" priority="2">
|
---|
| 560 | <xsl:call-template name="inline.italicmonoseq"/>
|
---|
[15c7d39] | 561 | <xsl:if test="$function.parens != 0 and following-sibling::*">
|
---|
[c873d807] | 562 | <xsl:text>, </xsl:text>
|
---|
| 563 | </xsl:if>
|
---|
| 564 | </xsl:template>
|
---|
| 565 |
|
---|
| 566 | <xsl:template match="function/replaceable" priority="2">
|
---|
| 567 | <xsl:call-template name="inline.italicmonoseq"/>
|
---|
[15c7d39] | 568 | <xsl:if test="$function.parens != 0 and following-sibling::*">
|
---|
[c873d807] | 569 | <xsl:text>, </xsl:text>
|
---|
| 570 | </xsl:if>
|
---|
| 571 | </xsl:template>
|
---|
| 572 |
|
---|
| 573 | <xsl:template match="guibutton">
|
---|
| 574 | <xsl:call-template name="inline.charseq"/>
|
---|
| 575 | </xsl:template>
|
---|
| 576 |
|
---|
| 577 | <xsl:template match="guiicon">
|
---|
| 578 | <xsl:call-template name="inline.charseq"/>
|
---|
| 579 | </xsl:template>
|
---|
| 580 |
|
---|
| 581 | <xsl:template match="guilabel">
|
---|
| 582 | <xsl:call-template name="inline.charseq"/>
|
---|
| 583 | </xsl:template>
|
---|
| 584 |
|
---|
| 585 | <xsl:template match="guimenu">
|
---|
| 586 | <xsl:call-template name="inline.charseq"/>
|
---|
| 587 | </xsl:template>
|
---|
| 588 |
|
---|
| 589 | <xsl:template match="guimenuitem">
|
---|
| 590 | <xsl:call-template name="inline.charseq"/>
|
---|
| 591 | </xsl:template>
|
---|
| 592 |
|
---|
| 593 | <xsl:template match="guisubmenu">
|
---|
| 594 | <xsl:call-template name="inline.charseq"/>
|
---|
| 595 | </xsl:template>
|
---|
| 596 |
|
---|
| 597 | <xsl:template match="hardware">
|
---|
| 598 | <xsl:call-template name="inline.charseq"/>
|
---|
| 599 | </xsl:template>
|
---|
| 600 |
|
---|
| 601 | <xsl:template match="interface">
|
---|
| 602 | <xsl:call-template name="inline.charseq"/>
|
---|
| 603 | </xsl:template>
|
---|
| 604 |
|
---|
| 605 | <xsl:template match="interfacedefinition">
|
---|
| 606 | <xsl:call-template name="inline.charseq"/>
|
---|
| 607 | </xsl:template>
|
---|
| 608 |
|
---|
| 609 | <xsl:template match="keycap">
|
---|
[15c7d39] | 610 | <xsl:choose>
|
---|
| 611 | <xsl:when test="@function and normalize-space(.) = ''">
|
---|
| 612 | <xsl:call-template name="inline.boldseq">
|
---|
| 613 | <xsl:with-param name="content">
|
---|
| 614 | <xsl:call-template name="gentext.template">
|
---|
| 615 | <xsl:with-param name="context" select="'keycap'"/>
|
---|
| 616 | <xsl:with-param name="name" select="@function"/>
|
---|
| 617 | </xsl:call-template>
|
---|
| 618 | </xsl:with-param>
|
---|
| 619 | </xsl:call-template>
|
---|
| 620 | </xsl:when>
|
---|
| 621 | <xsl:otherwise>
|
---|
| 622 | <xsl:call-template name="inline.boldseq"/>
|
---|
| 623 | </xsl:otherwise>
|
---|
| 624 | </xsl:choose>
|
---|
[c873d807] | 625 | </xsl:template>
|
---|
| 626 |
|
---|
| 627 | <xsl:template match="keycode">
|
---|
| 628 | <xsl:call-template name="inline.charseq"/>
|
---|
| 629 | </xsl:template>
|
---|
| 630 |
|
---|
| 631 | <xsl:template match="keysym">
|
---|
| 632 | <xsl:call-template name="inline.charseq"/>
|
---|
| 633 | </xsl:template>
|
---|
| 634 |
|
---|
| 635 | <xsl:template match="literal">
|
---|
| 636 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 637 | </xsl:template>
|
---|
| 638 |
|
---|
| 639 | <xsl:template match="code">
|
---|
| 640 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 641 | </xsl:template>
|
---|
| 642 |
|
---|
| 643 | <xsl:template match="medialabel">
|
---|
| 644 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 645 | </xsl:template>
|
---|
| 646 |
|
---|
| 647 | <xsl:template match="shortcut">
|
---|
| 648 | <xsl:call-template name="inline.boldseq"/>
|
---|
| 649 | </xsl:template>
|
---|
| 650 |
|
---|
| 651 | <xsl:template match="mousebutton">
|
---|
| 652 | <xsl:call-template name="inline.charseq"/>
|
---|
| 653 | </xsl:template>
|
---|
| 654 |
|
---|
| 655 | <xsl:template match="option">
|
---|
| 656 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 657 | </xsl:template>
|
---|
| 658 |
|
---|
| 659 | <xsl:template match="package">
|
---|
| 660 | <xsl:call-template name="inline.charseq"/>
|
---|
| 661 | </xsl:template>
|
---|
| 662 |
|
---|
| 663 | <xsl:template match="parameter">
|
---|
| 664 | <xsl:call-template name="inline.italicmonoseq"/>
|
---|
| 665 | </xsl:template>
|
---|
| 666 |
|
---|
| 667 | <xsl:template match="property">
|
---|
| 668 | <xsl:call-template name="inline.charseq"/>
|
---|
| 669 | </xsl:template>
|
---|
| 670 |
|
---|
| 671 | <xsl:template match="prompt">
|
---|
| 672 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 673 | </xsl:template>
|
---|
| 674 |
|
---|
| 675 | <xsl:template match="replaceable" priority="1">
|
---|
| 676 | <xsl:call-template name="inline.italicmonoseq"/>
|
---|
| 677 | </xsl:template>
|
---|
| 678 |
|
---|
| 679 | <xsl:template match="returnvalue">
|
---|
| 680 | <xsl:call-template name="inline.charseq"/>
|
---|
| 681 | </xsl:template>
|
---|
| 682 |
|
---|
| 683 | <xsl:template match="structfield">
|
---|
| 684 | <xsl:call-template name="inline.italicmonoseq"/>
|
---|
| 685 | </xsl:template>
|
---|
| 686 |
|
---|
| 687 | <xsl:template match="structname">
|
---|
| 688 | <xsl:call-template name="inline.charseq"/>
|
---|
| 689 | </xsl:template>
|
---|
| 690 |
|
---|
| 691 | <xsl:template match="symbol">
|
---|
| 692 | <xsl:call-template name="inline.charseq"/>
|
---|
| 693 | </xsl:template>
|
---|
| 694 |
|
---|
| 695 | <xsl:template match="systemitem">
|
---|
| 696 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 697 | </xsl:template>
|
---|
| 698 |
|
---|
| 699 | <xsl:template match="token">
|
---|
| 700 | <xsl:call-template name="inline.charseq"/>
|
---|
| 701 | </xsl:template>
|
---|
| 702 |
|
---|
| 703 | <xsl:template match="type">
|
---|
| 704 | <xsl:call-template name="inline.charseq"/>
|
---|
| 705 | </xsl:template>
|
---|
| 706 |
|
---|
| 707 | <xsl:template match="userinput">
|
---|
| 708 | <xsl:call-template name="inline.boldmonoseq"/>
|
---|
| 709 | </xsl:template>
|
---|
| 710 |
|
---|
| 711 | <xsl:template match="abbrev">
|
---|
| 712 | <xsl:call-template name="inline.charseq">
|
---|
| 713 | <xsl:with-param name="wrapper-name">abbr</xsl:with-param>
|
---|
| 714 | </xsl:call-template>
|
---|
| 715 | </xsl:template>
|
---|
| 716 |
|
---|
| 717 | <xsl:template match="acronym">
|
---|
| 718 | <xsl:call-template name="inline.charseq">
|
---|
| 719 | <xsl:with-param name="wrapper-name">acronym</xsl:with-param>
|
---|
| 720 | </xsl:call-template>
|
---|
| 721 | </xsl:template>
|
---|
| 722 |
|
---|
| 723 | <xsl:template match="citerefentry">
|
---|
| 724 | <xsl:choose>
|
---|
| 725 | <xsl:when test="$citerefentry.link != '0'">
|
---|
| 726 | <a>
|
---|
[15c7d39] | 727 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 728 | <xsl:attribute name="href">
|
---|
| 729 | <xsl:call-template name="generate.citerefentry.link"/>
|
---|
| 730 | </xsl:attribute>
|
---|
| 731 | <xsl:call-template name="inline.charseq"/>
|
---|
| 732 | </a>
|
---|
| 733 | </xsl:when>
|
---|
| 734 | <xsl:otherwise>
|
---|
| 735 | <xsl:call-template name="inline.charseq"/>
|
---|
| 736 | </xsl:otherwise>
|
---|
| 737 | </xsl:choose>
|
---|
| 738 | </xsl:template>
|
---|
| 739 |
|
---|
| 740 | <xsl:template name="generate.citerefentry.link">
|
---|
| 741 | <!-- nop -->
|
---|
| 742 | </xsl:template>
|
---|
| 743 |
|
---|
| 744 | <xsl:template name="x.generate.citerefentry.link">
|
---|
| 745 | <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
|
---|
| 746 | <xsl:value-of select="refentrytitle"/>
|
---|
| 747 | <xsl:text>(</xsl:text>
|
---|
| 748 | <xsl:value-of select="manvolnum"/>
|
---|
| 749 | <xsl:text>)</xsl:text>
|
---|
| 750 | </xsl:template>
|
---|
| 751 |
|
---|
| 752 | <xsl:template match="citetitle">
|
---|
| 753 | <xsl:choose>
|
---|
| 754 | <xsl:when test="@pubwork = 'article'">
|
---|
| 755 | <xsl:call-template name="gentext.startquote"/>
|
---|
| 756 | <xsl:call-template name="inline.charseq"/>
|
---|
| 757 | <xsl:call-template name="gentext.endquote"/>
|
---|
| 758 | </xsl:when>
|
---|
| 759 | <xsl:otherwise>
|
---|
| 760 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 761 | </xsl:otherwise>
|
---|
| 762 | </xsl:choose>
|
---|
| 763 | </xsl:template>
|
---|
| 764 |
|
---|
| 765 | <xsl:template match="emphasis">
|
---|
| 766 | <span>
|
---|
[15c7d39] | 767 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 768 | <xsl:choose>
|
---|
[15c7d39] | 769 | <!-- We don't want empty @class values, so do not propagate empty @roles -->
|
---|
| 770 | <xsl:when test="@role and
|
---|
| 771 | normalize-space(@role) != '' and
|
---|
| 772 | $emphasis.propagates.style != 0">
|
---|
| 773 | <xsl:apply-templates select="." mode="common.html.attributes">
|
---|
[c873d807] | 774 | <xsl:with-param name="class" select="@role"/>
|
---|
| 775 | </xsl:apply-templates>
|
---|
| 776 | </xsl:when>
|
---|
| 777 | <xsl:otherwise>
|
---|
[15c7d39] | 778 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 779 | </xsl:otherwise>
|
---|
| 780 | </xsl:choose>
|
---|
| 781 | <xsl:call-template name="anchor"/>
|
---|
| 782 |
|
---|
| 783 | <xsl:call-template name="simple.xlink">
|
---|
| 784 | <xsl:with-param name="content">
|
---|
| 785 | <xsl:choose>
|
---|
| 786 | <xsl:when test="@role = 'bold' or @role='strong'">
|
---|
| 787 | <!-- backwards compatibility: make bold into b elements, but -->
|
---|
| 788 | <!-- don't put bold inside figure, example, or table titles -->
|
---|
| 789 | <xsl:choose>
|
---|
[15c7d39] | 790 | <xsl:when test="local-name(..) = 'title'
|
---|
| 791 | and (local-name(../..) = 'figure'
|
---|
| 792 | or local-name(../..) = 'example'
|
---|
| 793 | or local-name(../..) = 'table')">
|
---|
[c873d807] | 794 | <xsl:apply-templates/>
|
---|
| 795 | </xsl:when>
|
---|
| 796 | <xsl:otherwise>
|
---|
| 797 | <strong><xsl:apply-templates/></strong>
|
---|
| 798 | </xsl:otherwise>
|
---|
| 799 | </xsl:choose>
|
---|
| 800 | </xsl:when>
|
---|
| 801 | <xsl:when test="@role and $emphasis.propagates.style != 0">
|
---|
| 802 | <xsl:apply-templates/>
|
---|
| 803 | </xsl:when>
|
---|
| 804 | <xsl:otherwise>
|
---|
| 805 | <em><xsl:apply-templates/></em>
|
---|
| 806 | </xsl:otherwise>
|
---|
| 807 | </xsl:choose>
|
---|
| 808 | </xsl:with-param>
|
---|
| 809 | </xsl:call-template>
|
---|
| 810 | </span>
|
---|
| 811 | </xsl:template>
|
---|
| 812 |
|
---|
| 813 | <xsl:template match="foreignphrase">
|
---|
| 814 | <span>
|
---|
[15c7d39] | 815 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 816 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 817 | </span>
|
---|
| 818 | </xsl:template>
|
---|
| 819 |
|
---|
| 820 | <xsl:template match="markup">
|
---|
| 821 | <xsl:call-template name="inline.charseq"/>
|
---|
| 822 | </xsl:template>
|
---|
| 823 |
|
---|
| 824 | <xsl:template match="phrase">
|
---|
| 825 | <span>
|
---|
[15c7d39] | 826 | <xsl:call-template name="id.attribute"/>
|
---|
| 827 | <xsl:call-template name="locale.html.attributes"/>
|
---|
| 828 | <!-- We don't want empty @class values, so do not propagate empty @roles -->
|
---|
| 829 | <xsl:choose>
|
---|
| 830 | <xsl:when test="@role and
|
---|
| 831 | normalize-space(@role) != '' and
|
---|
| 832 | $phrase.propagates.style != 0">
|
---|
| 833 | <xsl:apply-templates select="." mode="class.attribute">
|
---|
| 834 | <xsl:with-param name="class" select="@role"/>
|
---|
| 835 | </xsl:apply-templates>
|
---|
| 836 | </xsl:when>
|
---|
| 837 | <xsl:otherwise>
|
---|
| 838 | <xsl:apply-templates select="." mode="class.attribute"/>
|
---|
| 839 | </xsl:otherwise>
|
---|
| 840 | </xsl:choose>
|
---|
[c873d807] | 841 | <xsl:call-template name="dir"/>
|
---|
| 842 | <xsl:call-template name="anchor"/>
|
---|
| 843 | <xsl:call-template name="simple.xlink">
|
---|
| 844 | <xsl:with-param name="content">
|
---|
| 845 | <xsl:apply-templates/>
|
---|
| 846 | </xsl:with-param>
|
---|
| 847 | </xsl:call-template>
|
---|
| 848 | <xsl:call-template name="apply-annotations"/>
|
---|
| 849 | </span>
|
---|
| 850 | </xsl:template>
|
---|
| 851 |
|
---|
| 852 | <xsl:template match="quote">
|
---|
| 853 | <xsl:variable name="depth">
|
---|
| 854 | <xsl:call-template name="dot.count">
|
---|
| 855 | <xsl:with-param name="string">
|
---|
| 856 | <xsl:number level="multiple"/>
|
---|
| 857 | </xsl:with-param>
|
---|
| 858 | </xsl:call-template>
|
---|
| 859 | </xsl:variable>
|
---|
[15c7d39] | 860 | <span>
|
---|
| 861 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 862 | <xsl:choose>
|
---|
| 863 | <xsl:when test="$depth mod 2 = 0">
|
---|
| 864 | <xsl:call-template name="gentext.startquote"/>
|
---|
| 865 | <xsl:call-template name="inline.charseq"/>
|
---|
| 866 | <xsl:call-template name="gentext.endquote"/>
|
---|
| 867 | </xsl:when>
|
---|
| 868 | <xsl:otherwise>
|
---|
| 869 | <xsl:call-template name="gentext.nestedstartquote"/>
|
---|
| 870 | <xsl:call-template name="inline.charseq"/>
|
---|
| 871 | <xsl:call-template name="gentext.nestedendquote"/>
|
---|
| 872 | </xsl:otherwise>
|
---|
| 873 | </xsl:choose>
|
---|
| 874 | </span>
|
---|
[c873d807] | 875 | </xsl:template>
|
---|
| 876 |
|
---|
| 877 | <xsl:template match="varname">
|
---|
| 878 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 879 | </xsl:template>
|
---|
| 880 |
|
---|
| 881 | <xsl:template match="wordasword">
|
---|
| 882 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 883 | </xsl:template>
|
---|
| 884 |
|
---|
| 885 | <xsl:template match="lineannotation">
|
---|
| 886 | <em>
|
---|
[15c7d39] | 887 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 888 | <xsl:call-template name="inline.charseq"/>
|
---|
| 889 | </em>
|
---|
| 890 | </xsl:template>
|
---|
| 891 |
|
---|
| 892 | <xsl:template match="superscript">
|
---|
| 893 | <xsl:call-template name="inline.superscriptseq"/>
|
---|
| 894 | </xsl:template>
|
---|
| 895 |
|
---|
| 896 | <xsl:template match="subscript">
|
---|
| 897 | <xsl:call-template name="inline.subscriptseq"/>
|
---|
| 898 | </xsl:template>
|
---|
| 899 |
|
---|
| 900 | <xsl:template match="trademark">
|
---|
| 901 | <xsl:call-template name="inline.charseq"/>
|
---|
| 902 | <xsl:choose>
|
---|
[15c7d39] | 903 | <xsl:when test="@class = 'copyright'
|
---|
| 904 | or @class = 'registered'">
|
---|
[c873d807] | 905 | <xsl:call-template name="dingbat">
|
---|
| 906 | <xsl:with-param name="dingbat" select="@class"/>
|
---|
| 907 | </xsl:call-template>
|
---|
| 908 | </xsl:when>
|
---|
| 909 | <xsl:when test="@class = 'service'">
|
---|
| 910 | <sup>SM</sup>
|
---|
| 911 | </xsl:when>
|
---|
| 912 | <xsl:otherwise>
|
---|
| 913 | <xsl:call-template name="dingbat">
|
---|
| 914 | <xsl:with-param name="dingbat" select="'trademark'"/>
|
---|
| 915 | </xsl:call-template>
|
---|
| 916 | </xsl:otherwise>
|
---|
| 917 | </xsl:choose>
|
---|
| 918 | </xsl:template>
|
---|
| 919 |
|
---|
| 920 | <xsl:template match="firstterm">
|
---|
| 921 | <xsl:call-template name="glossterm">
|
---|
| 922 | <xsl:with-param name="firstterm" select="1"/>
|
---|
| 923 | </xsl:call-template>
|
---|
| 924 | </xsl:template>
|
---|
| 925 |
|
---|
| 926 | <xsl:template match="glossterm" name="glossterm">
|
---|
| 927 | <xsl:param name="firstterm" select="0"/>
|
---|
| 928 |
|
---|
| 929 | <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
|
---|
| 930 | <xsl:variable name="content">
|
---|
| 931 | <xsl:apply-templates/>
|
---|
| 932 | </xsl:variable>
|
---|
| 933 |
|
---|
| 934 | <xsl:choose>
|
---|
| 935 | <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
|
---|
| 936 | <xsl:variable name="targets" select="key('id',@linkend)"/>
|
---|
| 937 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 938 |
|
---|
| 939 | <xsl:call-template name="check.id.unique">
|
---|
| 940 | <xsl:with-param name="linkend" select="@linkend"/>
|
---|
| 941 | </xsl:call-template>
|
---|
| 942 |
|
---|
| 943 | <xsl:choose>
|
---|
| 944 | <xsl:when test="$target">
|
---|
| 945 | <a>
|
---|
[15c7d39] | 946 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 947 | <xsl:if test="@id or @xml:id">
|
---|
[15c7d39] | 948 | <xsl:attribute name="name">
|
---|
[c873d807] | 949 | <xsl:value-of select="(@id|@xml:id)[1]"/>
|
---|
| 950 | </xsl:attribute>
|
---|
| 951 | </xsl:if>
|
---|
| 952 |
|
---|
| 953 | <xsl:attribute name="href">
|
---|
| 954 | <xsl:call-template name="href.target">
|
---|
| 955 | <xsl:with-param name="object" select="$target"/>
|
---|
| 956 | </xsl:call-template>
|
---|
| 957 | </xsl:attribute>
|
---|
| 958 |
|
---|
| 959 | <xsl:call-template name="inline.italicseq">
|
---|
| 960 | <xsl:with-param name="content" select="$content"/>
|
---|
| 961 | </xsl:call-template>
|
---|
| 962 | </a>
|
---|
| 963 | </xsl:when>
|
---|
| 964 | <xsl:otherwise>
|
---|
| 965 | <xsl:call-template name="inline.italicseq">
|
---|
| 966 | <xsl:with-param name="content" select="$content"/>
|
---|
| 967 | </xsl:call-template>
|
---|
| 968 | </xsl:otherwise>
|
---|
| 969 | </xsl:choose>
|
---|
| 970 | </xsl:when>
|
---|
| 971 |
|
---|
[15c7d39] | 972 | <xsl:when test="not(@linkend)
|
---|
| 973 | and ($firstterm.only.link = 0 or $firstterm = 1)
|
---|
| 974 | and ($glossterm.auto.link != 0)
|
---|
| 975 | and $glossary.collection != ''">
|
---|
[c873d807] | 976 | <xsl:variable name="term">
|
---|
| 977 | <xsl:choose>
|
---|
| 978 | <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
|
---|
| 979 | <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
---|
| 980 | </xsl:choose>
|
---|
| 981 | </xsl:variable>
|
---|
| 982 |
|
---|
[15c7d39] | 983 | <xsl:variable name="cterm"
|
---|
| 984 | select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
|
---|
[c873d807] | 985 |
|
---|
| 986 | <!-- HACK HACK HACK! But it works... -->
|
---|
| 987 | <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
|
---|
| 988 |
|
---|
| 989 | <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
|
---|
| 990 |
|
---|
| 991 | <xsl:if test="count($glossary) != 1">
|
---|
| 992 | <xsl:message>
|
---|
| 993 | <xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
|
---|
| 994 | <xsl:value-of select="count($glossary)"/>
|
---|
| 995 | <xsl:text> automatic glossaries</xsl:text>
|
---|
| 996 | </xsl:message>
|
---|
| 997 | </xsl:if>
|
---|
| 998 |
|
---|
| 999 | <xsl:variable name="glosschunk">
|
---|
| 1000 | <xsl:call-template name="href.target">
|
---|
| 1001 | <xsl:with-param name="object" select="$glossary"/>
|
---|
| 1002 | </xsl:call-template>
|
---|
| 1003 | </xsl:variable>
|
---|
| 1004 |
|
---|
| 1005 | <xsl:variable name="chunkbase">
|
---|
| 1006 | <xsl:choose>
|
---|
| 1007 | <xsl:when test="contains($glosschunk, '#')">
|
---|
| 1008 | <xsl:value-of select="substring-before($glosschunk, '#')"/>
|
---|
| 1009 | </xsl:when>
|
---|
| 1010 | <xsl:otherwise>
|
---|
| 1011 | <xsl:value-of select="$glosschunk"/>
|
---|
| 1012 | </xsl:otherwise>
|
---|
| 1013 | </xsl:choose>
|
---|
| 1014 | </xsl:variable>
|
---|
| 1015 |
|
---|
| 1016 | <xsl:choose>
|
---|
| 1017 | <xsl:when test="not($cterm)">
|
---|
| 1018 | <xsl:message>
|
---|
| 1019 | <xsl:text>There's no entry for </xsl:text>
|
---|
| 1020 | <xsl:value-of select="$term"/>
|
---|
| 1021 | <xsl:text> in </xsl:text>
|
---|
| 1022 | <xsl:value-of select="$glossary.collection"/>
|
---|
| 1023 | </xsl:message>
|
---|
| 1024 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 1025 | </xsl:when>
|
---|
| 1026 | <xsl:otherwise>
|
---|
| 1027 | <xsl:variable name="id">
|
---|
| 1028 | <xsl:call-template name="object.id">
|
---|
| 1029 | <xsl:with-param name="object" select="$cterm"/>
|
---|
| 1030 | </xsl:call-template>
|
---|
| 1031 | </xsl:variable>
|
---|
| 1032 | <a href="{$chunkbase}#{$id}">
|
---|
[15c7d39] | 1033 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 1034 | <xsl:call-template name="inline.italicseq">
|
---|
| 1035 | <xsl:with-param name="content" select="$content"/>
|
---|
| 1036 | </xsl:call-template>
|
---|
| 1037 | </a>
|
---|
| 1038 | </xsl:otherwise>
|
---|
| 1039 | </xsl:choose>
|
---|
| 1040 | </xsl:when>
|
---|
| 1041 |
|
---|
[15c7d39] | 1042 | <xsl:when test="not(@linkend)
|
---|
| 1043 | and ($firstterm.only.link = 0 or $firstterm = 1)
|
---|
| 1044 | and $glossterm.auto.link != 0">
|
---|
[c873d807] | 1045 | <xsl:variable name="term">
|
---|
| 1046 | <xsl:choose>
|
---|
| 1047 | <xsl:when test="@baseform">
|
---|
| 1048 | <xsl:value-of select="normalize-space(@baseform)"/>
|
---|
| 1049 | </xsl:when>
|
---|
| 1050 | <xsl:otherwise>
|
---|
| 1051 | <xsl:value-of select="normalize-space(.)"/>
|
---|
| 1052 | </xsl:otherwise>
|
---|
| 1053 | </xsl:choose>
|
---|
| 1054 | </xsl:variable>
|
---|
[15c7d39] | 1055 | <xsl:variable name="targets"
|
---|
| 1056 | select="key('glossentries', $term)"/>
|
---|
[c873d807] | 1057 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 1058 |
|
---|
| 1059 | <xsl:choose>
|
---|
| 1060 | <xsl:when test="count($targets)=0">
|
---|
| 1061 | <xsl:message>
|
---|
| 1062 | <xsl:text>Error: no glossentry for glossterm: </xsl:text>
|
---|
| 1063 | <xsl:value-of select="."/>
|
---|
| 1064 | <xsl:text>.</xsl:text>
|
---|
| 1065 | </xsl:message>
|
---|
| 1066 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 1067 | </xsl:when>
|
---|
| 1068 | <xsl:otherwise>
|
---|
| 1069 | <a>
|
---|
[15c7d39] | 1070 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 1071 | <xsl:if test="@id or @xml:id">
|
---|
[15c7d39] | 1072 | <xsl:attribute name="name">
|
---|
[c873d807] | 1073 | <xsl:value-of select="(@id|@xml:id)[1]"/>
|
---|
| 1074 | </xsl:attribute>
|
---|
| 1075 | </xsl:if>
|
---|
| 1076 |
|
---|
| 1077 | <xsl:attribute name="href">
|
---|
| 1078 | <xsl:call-template name="href.target">
|
---|
| 1079 | <xsl:with-param name="object" select="$target"/>
|
---|
| 1080 | </xsl:call-template>
|
---|
| 1081 | </xsl:attribute>
|
---|
| 1082 |
|
---|
| 1083 | <xsl:call-template name="inline.italicseq">
|
---|
| 1084 | <xsl:with-param name="content" select="$content"/>
|
---|
| 1085 | </xsl:call-template>
|
---|
| 1086 | </a>
|
---|
| 1087 | </xsl:otherwise>
|
---|
| 1088 | </xsl:choose>
|
---|
| 1089 | </xsl:when>
|
---|
| 1090 |
|
---|
| 1091 | <xsl:otherwise>
|
---|
| 1092 | <xsl:call-template name="inline.italicseq"/>
|
---|
| 1093 | </xsl:otherwise>
|
---|
| 1094 | </xsl:choose>
|
---|
| 1095 | </xsl:template>
|
---|
| 1096 |
|
---|
| 1097 | <xsl:template match="termdef">
|
---|
| 1098 | <span>
|
---|
[15c7d39] | 1099 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 1100 | <xsl:call-template name="gentext.template">
|
---|
| 1101 | <xsl:with-param name="context" select="'termdef'"/>
|
---|
| 1102 | <xsl:with-param name="name" select="'prefix'"/>
|
---|
| 1103 | </xsl:call-template>
|
---|
| 1104 | <xsl:apply-templates/>
|
---|
| 1105 | <xsl:call-template name="gentext.template">
|
---|
| 1106 | <xsl:with-param name="context" select="'termdef'"/>
|
---|
| 1107 | <xsl:with-param name="name" select="'suffix'"/>
|
---|
| 1108 | </xsl:call-template>
|
---|
| 1109 | </span>
|
---|
| 1110 | </xsl:template>
|
---|
| 1111 |
|
---|
| 1112 | <xsl:template match="sgmltag|tag">
|
---|
| 1113 | <xsl:call-template name="format.sgmltag"/>
|
---|
| 1114 | </xsl:template>
|
---|
| 1115 |
|
---|
| 1116 | <xsl:template name="format.sgmltag">
|
---|
| 1117 | <xsl:param name="class">
|
---|
| 1118 | <xsl:choose>
|
---|
| 1119 | <xsl:when test="@class">
|
---|
| 1120 | <xsl:value-of select="@class"/>
|
---|
| 1121 | </xsl:when>
|
---|
| 1122 | <xsl:otherwise>element</xsl:otherwise>
|
---|
| 1123 | </xsl:choose>
|
---|
| 1124 | </xsl:param>
|
---|
| 1125 |
|
---|
| 1126 | <xsl:variable name="content">
|
---|
| 1127 | <xsl:choose>
|
---|
| 1128 | <xsl:when test="$class='attribute'">
|
---|
| 1129 | <xsl:apply-templates/>
|
---|
| 1130 | </xsl:when>
|
---|
| 1131 | <xsl:when test="$class='attvalue'">
|
---|
| 1132 | <xsl:apply-templates/>
|
---|
| 1133 | </xsl:when>
|
---|
| 1134 | <xsl:when test="$class='element'">
|
---|
| 1135 | <xsl:apply-templates/>
|
---|
| 1136 | </xsl:when>
|
---|
| 1137 | <xsl:when test="$class='endtag'">
|
---|
| 1138 | <xsl:text></</xsl:text>
|
---|
| 1139 | <xsl:apply-templates/>
|
---|
| 1140 | <xsl:text>></xsl:text>
|
---|
| 1141 | </xsl:when>
|
---|
| 1142 | <xsl:when test="$class='genentity'">
|
---|
| 1143 | <xsl:text>&</xsl:text>
|
---|
| 1144 | <xsl:apply-templates/>
|
---|
| 1145 | <xsl:text>;</xsl:text>
|
---|
| 1146 | </xsl:when>
|
---|
| 1147 | <xsl:when test="$class='numcharref'">
|
---|
| 1148 | <xsl:text>&#</xsl:text>
|
---|
| 1149 | <xsl:apply-templates/>
|
---|
| 1150 | <xsl:text>;</xsl:text>
|
---|
| 1151 | </xsl:when>
|
---|
| 1152 | <xsl:when test="$class='paramentity'">
|
---|
| 1153 | <xsl:text>%</xsl:text>
|
---|
| 1154 | <xsl:apply-templates/>
|
---|
| 1155 | <xsl:text>;</xsl:text>
|
---|
| 1156 | </xsl:when>
|
---|
| 1157 | <xsl:when test="$class='pi'">
|
---|
| 1158 | <xsl:text><?</xsl:text>
|
---|
| 1159 | <xsl:apply-templates/>
|
---|
| 1160 | <xsl:text>></xsl:text>
|
---|
| 1161 | </xsl:when>
|
---|
| 1162 | <xsl:when test="$class='xmlpi'">
|
---|
| 1163 | <xsl:text><?</xsl:text>
|
---|
| 1164 | <xsl:apply-templates/>
|
---|
| 1165 | <xsl:text>?></xsl:text>
|
---|
| 1166 | </xsl:when>
|
---|
| 1167 | <xsl:when test="$class='starttag'">
|
---|
| 1168 | <xsl:text><</xsl:text>
|
---|
| 1169 | <xsl:apply-templates/>
|
---|
| 1170 | <xsl:text>></xsl:text>
|
---|
| 1171 | </xsl:when>
|
---|
| 1172 | <xsl:when test="$class='emptytag'">
|
---|
| 1173 | <xsl:text><</xsl:text>
|
---|
| 1174 | <xsl:apply-templates/>
|
---|
| 1175 | <xsl:text>/></xsl:text>
|
---|
| 1176 | </xsl:when>
|
---|
| 1177 | <xsl:when test="$class='sgmlcomment' or $class='comment'">
|
---|
| 1178 | <xsl:text><!--</xsl:text>
|
---|
| 1179 | <xsl:apply-templates/>
|
---|
| 1180 | <xsl:text>--></xsl:text>
|
---|
| 1181 | </xsl:when>
|
---|
| 1182 | <xsl:otherwise>
|
---|
| 1183 | <xsl:apply-templates/>
|
---|
| 1184 | </xsl:otherwise>
|
---|
| 1185 | </xsl:choose>
|
---|
| 1186 | </xsl:variable>
|
---|
| 1187 |
|
---|
| 1188 | <code>
|
---|
[15c7d39] | 1189 | <xsl:apply-templates select="." mode="common.html.attributes">
|
---|
[c873d807] | 1190 | <xsl:with-param name="class" select="concat('sgmltag-', $class)"/>
|
---|
| 1191 | </xsl:apply-templates>
|
---|
| 1192 | <xsl:call-template name="simple.xlink">
|
---|
| 1193 | <xsl:with-param name="content" select="$content"/>
|
---|
| 1194 | </xsl:call-template>
|
---|
| 1195 | </code>
|
---|
| 1196 | </xsl:template>
|
---|
| 1197 |
|
---|
| 1198 | <xsl:template match="email">
|
---|
| 1199 | <xsl:call-template name="inline.monoseq">
|
---|
| 1200 | <xsl:with-param name="content">
|
---|
| 1201 | <xsl:if test="not($email.delimiters.enabled = 0)">
|
---|
| 1202 | <xsl:text><</xsl:text>
|
---|
| 1203 | </xsl:if>
|
---|
| 1204 | <a>
|
---|
[15c7d39] | 1205 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1206 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1207 | <xsl:attribute name="href">
|
---|
| 1208 | <xsl:text>mailto:</xsl:text>
|
---|
| 1209 | <xsl:value-of select="."/>
|
---|
| 1210 | </xsl:attribute>
|
---|
| 1211 | <xsl:apply-templates/>
|
---|
| 1212 | </a>
|
---|
| 1213 | <xsl:if test="not($email.delimiters.enabled = 0)">
|
---|
| 1214 | <xsl:text>></xsl:text>
|
---|
| 1215 | </xsl:if>
|
---|
| 1216 | </xsl:with-param>
|
---|
| 1217 | </xsl:call-template>
|
---|
| 1218 | </xsl:template>
|
---|
| 1219 |
|
---|
| 1220 | <xsl:template match="keycombo">
|
---|
| 1221 | <xsl:variable name="action" select="@action"/>
|
---|
| 1222 | <xsl:variable name="joinchar">
|
---|
| 1223 | <xsl:choose>
|
---|
| 1224 | <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
|
---|
| 1225 | <xsl:when test="$action='simul'">+</xsl:when>
|
---|
| 1226 | <xsl:when test="$action='press'">-</xsl:when>
|
---|
| 1227 | <xsl:when test="$action='click'">-</xsl:when>
|
---|
| 1228 | <xsl:when test="$action='double-click'">-</xsl:when>
|
---|
[15c7d39] | 1229 | <xsl:when test="$action='other'"></xsl:when>
|
---|
[c873d807] | 1230 | <xsl:otherwise>+</xsl:otherwise>
|
---|
| 1231 | </xsl:choose>
|
---|
| 1232 | </xsl:variable>
|
---|
| 1233 | <xsl:for-each select="*">
|
---|
[15c7d39] | 1234 | <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
|
---|
[c873d807] | 1235 | <xsl:apply-templates select="."/>
|
---|
| 1236 | </xsl:for-each>
|
---|
| 1237 | </xsl:template>
|
---|
| 1238 |
|
---|
| 1239 | <xsl:template match="uri">
|
---|
| 1240 | <xsl:call-template name="inline.monoseq"/>
|
---|
| 1241 | </xsl:template>
|
---|
| 1242 |
|
---|
| 1243 | <!-- ==================================================================== -->
|
---|
| 1244 |
|
---|
| 1245 | <xsl:template match="menuchoice">
|
---|
| 1246 | <xsl:variable name="shortcut" select="./shortcut"/>
|
---|
| 1247 | <xsl:call-template name="process.menuchoice"/>
|
---|
| 1248 | <xsl:if test="$shortcut">
|
---|
| 1249 | <xsl:text> (</xsl:text>
|
---|
| 1250 | <xsl:apply-templates select="$shortcut"/>
|
---|
| 1251 | <xsl:text>)</xsl:text>
|
---|
| 1252 | </xsl:if>
|
---|
| 1253 | </xsl:template>
|
---|
| 1254 |
|
---|
| 1255 | <xsl:template name="process.menuchoice">
|
---|
| 1256 | <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
|
---|
| 1257 | <xsl:param name="count" select="1"/>
|
---|
| 1258 |
|
---|
| 1259 | <xsl:choose>
|
---|
[15c7d39] | 1260 | <xsl:when test="$count>count($nodelist)"></xsl:when>
|
---|
[c873d807] | 1261 | <xsl:when test="$count=1">
|
---|
| 1262 | <xsl:apply-templates select="$nodelist[$count=position()]"/>
|
---|
| 1263 | <xsl:call-template name="process.menuchoice">
|
---|
| 1264 | <xsl:with-param name="nodelist" select="$nodelist"/>
|
---|
| 1265 | <xsl:with-param name="count" select="$count+1"/>
|
---|
| 1266 | </xsl:call-template>
|
---|
| 1267 | </xsl:when>
|
---|
| 1268 | <xsl:otherwise>
|
---|
| 1269 | <xsl:variable name="node" select="$nodelist[$count=position()]"/>
|
---|
| 1270 | <xsl:choose>
|
---|
[15c7d39] | 1271 | <xsl:when test="local-name($node)='guimenuitem'
|
---|
| 1272 | or local-name($node)='guisubmenu'">
|
---|
[c873d807] | 1273 | <xsl:value-of select="$menuchoice.menu.separator"/>
|
---|
| 1274 | </xsl:when>
|
---|
| 1275 | <xsl:otherwise>
|
---|
| 1276 | <xsl:value-of select="$menuchoice.separator"/>
|
---|
| 1277 | </xsl:otherwise>
|
---|
| 1278 | </xsl:choose>
|
---|
| 1279 | <xsl:apply-templates select="$node"/>
|
---|
| 1280 | <xsl:call-template name="process.menuchoice">
|
---|
| 1281 | <xsl:with-param name="nodelist" select="$nodelist"/>
|
---|
| 1282 | <xsl:with-param name="count" select="$count+1"/>
|
---|
| 1283 | </xsl:call-template>
|
---|
| 1284 | </xsl:otherwise>
|
---|
| 1285 | </xsl:choose>
|
---|
| 1286 | </xsl:template>
|
---|
| 1287 |
|
---|
| 1288 | <!-- ==================================================================== -->
|
---|
| 1289 |
|
---|
| 1290 | <xsl:template match="optional">
|
---|
| 1291 | <xsl:value-of select="$arg.choice.opt.open.str"/>
|
---|
| 1292 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1293 | <xsl:value-of select="$arg.choice.opt.close.str"/>
|
---|
| 1294 | </xsl:template>
|
---|
| 1295 |
|
---|
| 1296 | <xsl:template match="citation">
|
---|
| 1297 | <!-- todo: integrate with bibliography collection -->
|
---|
| 1298 | <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
|
---|
| 1299 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 1300 |
|
---|
| 1301 | <xsl:choose>
|
---|
| 1302 | <!-- try automatic linking based on match to abbrev -->
|
---|
| 1303 | <xsl:when test="$target and not(xref) and not(link)">
|
---|
| 1304 |
|
---|
| 1305 | <xsl:text>[</xsl:text>
|
---|
| 1306 | <a>
|
---|
[15c7d39] | 1307 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 1308 | <xsl:attribute name="href">
|
---|
| 1309 | <xsl:call-template name="href.target">
|
---|
| 1310 | <xsl:with-param name="object" select="$target"/>
|
---|
| 1311 | </xsl:call-template>
|
---|
| 1312 | </xsl:attribute>
|
---|
| 1313 |
|
---|
[15c7d39] | 1314 | <xsl:choose>
|
---|
| 1315 | <xsl:when test="$bibliography.numbered != 0">
|
---|
| 1316 | <xsl:call-template name="id.attribute"/>
|
---|
| 1317 | <xsl:apply-templates select="$target" mode="citation"/>
|
---|
| 1318 | </xsl:when>
|
---|
| 1319 | <xsl:otherwise>
|
---|
| 1320 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1321 | </xsl:otherwise>
|
---|
| 1322 | </xsl:choose>
|
---|
| 1323 |
|
---|
| 1324 | </a>
|
---|
| 1325 | <xsl:text>]</xsl:text>
|
---|
| 1326 | </xsl:when>
|
---|
| 1327 | <xsl:otherwise>
|
---|
| 1328 | <xsl:text>[</xsl:text>
|
---|
| 1329 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1330 | <xsl:text>]</xsl:text>
|
---|
| 1331 | </xsl:otherwise>
|
---|
| 1332 | </xsl:choose>
|
---|
| 1333 | </xsl:template>
|
---|
| 1334 |
|
---|
| 1335 | <xsl:template match="citebiblioid">
|
---|
| 1336 | <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
|
---|
| 1337 | <xsl:variable name="target" select="$targets[1]"/>
|
---|
| 1338 |
|
---|
| 1339 | <xsl:choose>
|
---|
| 1340 | <!-- try automatic linking based on match to parent of biblioid -->
|
---|
| 1341 | <xsl:when test="$target and not(xref) and not(link)">
|
---|
| 1342 |
|
---|
| 1343 | <xsl:text>[</xsl:text>
|
---|
| 1344 | <a>
|
---|
| 1345 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1346 | <xsl:attribute name="href">
|
---|
| 1347 | <xsl:call-template name="href.target">
|
---|
| 1348 | <xsl:with-param name="object" select="$target"/>
|
---|
| 1349 | </xsl:call-template>
|
---|
| 1350 | </xsl:attribute>
|
---|
| 1351 |
|
---|
| 1352 | <xsl:call-template name="inline.charseq"/>
|
---|
[c873d807] | 1353 |
|
---|
| 1354 | </a>
|
---|
| 1355 | <xsl:text>]</xsl:text>
|
---|
| 1356 | </xsl:when>
|
---|
| 1357 | <xsl:otherwise>
|
---|
| 1358 | <xsl:text>[</xsl:text>
|
---|
| 1359 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1360 | <xsl:text>]</xsl:text>
|
---|
| 1361 | </xsl:otherwise>
|
---|
| 1362 | </xsl:choose>
|
---|
| 1363 | </xsl:template>
|
---|
| 1364 |
|
---|
| 1365 | <xsl:template match="biblioentry|bibliomixed" mode="citation">
|
---|
[15c7d39] | 1366 | <xsl:number from="bibliography" count="biblioentry|bibliomixed"
|
---|
| 1367 | level="any" format="1"/>
|
---|
[c873d807] | 1368 | </xsl:template>
|
---|
| 1369 |
|
---|
| 1370 | <!-- ==================================================================== -->
|
---|
| 1371 |
|
---|
[15c7d39] | 1372 | <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
|
---|
[c873d807] | 1373 | <xsl:if test="$show.comments != 0">
|
---|
[15c7d39] | 1374 | <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p>
|
---|
[c873d807] | 1375 | </xsl:if>
|
---|
| 1376 | </xsl:template>
|
---|
| 1377 |
|
---|
| 1378 | <xsl:template match="comment|remark">
|
---|
| 1379 | <xsl:if test="$show.comments != 0">
|
---|
| 1380 | <em><xsl:call-template name="inline.charseq"/></em>
|
---|
| 1381 | </xsl:if>
|
---|
| 1382 | </xsl:template>
|
---|
| 1383 |
|
---|
| 1384 | <!-- ==================================================================== -->
|
---|
| 1385 |
|
---|
| 1386 | <xsl:template match="productname">
|
---|
| 1387 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1388 | <xsl:if test="@class">
|
---|
| 1389 | <xsl:call-template name="dingbat">
|
---|
| 1390 | <xsl:with-param name="dingbat" select="@class"/>
|
---|
| 1391 | </xsl:call-template>
|
---|
| 1392 | </xsl:if>
|
---|
| 1393 | </xsl:template>
|
---|
| 1394 |
|
---|
| 1395 | <xsl:template match="productnumber">
|
---|
| 1396 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1397 | </xsl:template>
|
---|
| 1398 |
|
---|
| 1399 | <!-- ==================================================================== -->
|
---|
| 1400 |
|
---|
| 1401 | <xsl:template match="pob|street|city|state|postcode|country|otheraddr">
|
---|
| 1402 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1403 | </xsl:template>
|
---|
| 1404 |
|
---|
| 1405 | <xsl:template match="phone|fax">
|
---|
| 1406 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1407 | </xsl:template>
|
---|
| 1408 |
|
---|
| 1409 | <!-- in Addresses, for example -->
|
---|
| 1410 | <xsl:template match="honorific|firstname|surname|lineage|othername">
|
---|
| 1411 | <xsl:call-template name="inline.charseq"/>
|
---|
| 1412 | </xsl:template>
|
---|
| 1413 |
|
---|
| 1414 | <!-- ==================================================================== -->
|
---|
| 1415 |
|
---|
| 1416 | <xsl:template match="person">
|
---|
| 1417 | <xsl:param name="content">
|
---|
| 1418 | <xsl:call-template name="anchor"/>
|
---|
| 1419 | <xsl:call-template name="simple.xlink">
|
---|
| 1420 | <xsl:with-param name="content">
|
---|
| 1421 | <xsl:apply-templates select="personname"/>
|
---|
| 1422 | </xsl:with-param>
|
---|
| 1423 | </xsl:call-template>
|
---|
| 1424 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1425 | </xsl:param>
|
---|
| 1426 |
|
---|
| 1427 | <span>
|
---|
[15c7d39] | 1428 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1429 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1430 | <xsl:copy-of select="$content"/>
|
---|
| 1431 | </span>
|
---|
| 1432 | </xsl:template>
|
---|
| 1433 |
|
---|
| 1434 | <xsl:template match="personname">
|
---|
| 1435 | <xsl:param name="content">
|
---|
| 1436 | <xsl:call-template name="anchor"/>
|
---|
| 1437 | <xsl:call-template name="simple.xlink">
|
---|
| 1438 | <xsl:with-param name="content">
|
---|
| 1439 | <xsl:call-template name="person.name"/>
|
---|
| 1440 | </xsl:with-param>
|
---|
| 1441 | </xsl:call-template>
|
---|
| 1442 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1443 | </xsl:param>
|
---|
| 1444 |
|
---|
| 1445 | <span>
|
---|
[15c7d39] | 1446 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1447 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1448 | <xsl:copy-of select="$content"/>
|
---|
| 1449 | </span>
|
---|
| 1450 | </xsl:template>
|
---|
| 1451 |
|
---|
| 1452 | <!-- ==================================================================== -->
|
---|
| 1453 |
|
---|
| 1454 | <xsl:template match="org">
|
---|
| 1455 | <xsl:param name="content">
|
---|
| 1456 | <xsl:call-template name="anchor"/>
|
---|
| 1457 | <xsl:call-template name="simple.xlink">
|
---|
| 1458 | <xsl:with-param name="content">
|
---|
| 1459 | <xsl:apply-templates/>
|
---|
| 1460 | </xsl:with-param>
|
---|
| 1461 | </xsl:call-template>
|
---|
| 1462 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1463 | </xsl:param>
|
---|
| 1464 |
|
---|
| 1465 | <span>
|
---|
[15c7d39] | 1466 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1467 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1468 | <xsl:copy-of select="$content"/>
|
---|
| 1469 | </span>
|
---|
| 1470 | </xsl:template>
|
---|
| 1471 |
|
---|
| 1472 | <xsl:template match="orgname">
|
---|
| 1473 | <xsl:param name="content">
|
---|
| 1474 | <xsl:call-template name="anchor"/>
|
---|
| 1475 | <xsl:call-template name="simple.xlink">
|
---|
| 1476 | <xsl:with-param name="content">
|
---|
| 1477 | <xsl:apply-templates/>
|
---|
| 1478 | </xsl:with-param>
|
---|
| 1479 | </xsl:call-template>
|
---|
| 1480 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1481 | </xsl:param>
|
---|
| 1482 |
|
---|
| 1483 | <span>
|
---|
[15c7d39] | 1484 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1485 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1486 | <xsl:copy-of select="$content"/>
|
---|
| 1487 | </span>
|
---|
| 1488 | </xsl:template>
|
---|
| 1489 |
|
---|
| 1490 | <xsl:template match="orgdiv">
|
---|
| 1491 | <xsl:param name="content">
|
---|
| 1492 | <xsl:call-template name="anchor"/>
|
---|
| 1493 | <xsl:call-template name="simple.xlink">
|
---|
| 1494 | <xsl:with-param name="content">
|
---|
| 1495 | <xsl:apply-templates/>
|
---|
| 1496 | </xsl:with-param>
|
---|
| 1497 | </xsl:call-template>
|
---|
| 1498 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1499 | </xsl:param>
|
---|
| 1500 |
|
---|
| 1501 | <span>
|
---|
[15c7d39] | 1502 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
[c873d807] | 1503 | <xsl:copy-of select="$content"/>
|
---|
| 1504 | </span>
|
---|
| 1505 | </xsl:template>
|
---|
| 1506 |
|
---|
| 1507 | <xsl:template match="affiliation">
|
---|
| 1508 | <xsl:param name="content">
|
---|
| 1509 | <xsl:call-template name="anchor"/>
|
---|
| 1510 | <xsl:call-template name="simple.xlink">
|
---|
| 1511 | <xsl:with-param name="content">
|
---|
| 1512 | <xsl:call-template name="person.name"/>
|
---|
| 1513 | </xsl:with-param>
|
---|
| 1514 | </xsl:call-template>
|
---|
| 1515 | <xsl:call-template name="apply-annotations"/>
|
---|
| 1516 | </xsl:param>
|
---|
| 1517 |
|
---|
| 1518 | <span>
|
---|
[15c7d39] | 1519 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
| 1520 | <xsl:call-template name="id.attribute"/>
|
---|
[c873d807] | 1521 | <xsl:copy-of select="$content"/>
|
---|
| 1522 | </span>
|
---|
| 1523 | </xsl:template>
|
---|
| 1524 |
|
---|
| 1525 | <!-- ==================================================================== -->
|
---|
| 1526 |
|
---|
| 1527 | <xsl:template match="beginpage">
|
---|
| 1528 | <!-- does nothing; this *is not* markup to force a page break. -->
|
---|
| 1529 | </xsl:template>
|
---|
| 1530 |
|
---|
| 1531 | </xsl:stylesheet>
|
---|
[15c7d39] | 1532 |
|
---|