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