Changeset b1a51ac1 for stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml
- Timestamp:
- 12/10/2013 11:37:38 PM (11 years ago)
- Branches:
- 7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
- Children:
- 112db9d
- Parents:
- f2a5108
- Location:
- stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml
- Files:
-
- 47 added
- 14 moved
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/autotoc.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: autotoc.xsl 9692 2012-12-16 02:31:34Z dcramer $ 8 8 ******************************************************************** 9 9 … … 38 38 <xsl:variable name="toc.title"> 39 39 <xsl:if test="$toc.title.p"> 40 <p> 41 <b> 42 <xsl:call-template name="gentext"> 43 <xsl:with-param name="key">TableofContents</xsl:with-param> 44 </xsl:call-template> 45 </b> 46 </p> 40 <xsl:choose> 41 <xsl:when test="$make.clean.html != 0"> 42 <div class="toc-title"> 43 <xsl:call-template name="gentext"> 44 <xsl:with-param name="key">TableofContents</xsl:with-param> 45 </xsl:call-template> 46 </div> 47 </xsl:when> 48 <xsl:otherwise> 49 <p> 50 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> 51 <xsl:call-template name="gentext"> 52 <xsl:with-param name="key">TableofContents</xsl:with-param> 53 </xsl:call-template> 54 </strong> 55 </p> 56 </xsl:otherwise> 57 </xsl:choose> 47 58 </xsl:if> 48 59 </xsl:variable> … … 59 70 <xsl:copy-of select="$toc.title"/> 60 71 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> 72 <xsl:call-template name="toc.list.attributes"> 73 <xsl:with-param name="toc-context" select="$toc-context"/> 74 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 75 <xsl:with-param name="nodes" select="$nodes"/> 76 </xsl:call-template> 61 77 <xsl:call-template name="manual-toc"> 62 78 <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> … … 73 89 <xsl:copy-of select="$toc.title"/> 74 90 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> 91 <xsl:call-template name="toc.list.attributes"> 92 <xsl:with-param name="toc-context" select="$toc-context"/> 93 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 94 <xsl:with-param name="nodes" select="$nodes"/> 95 </xsl:call-template> 75 96 <xsl:apply-templates select="$nodes.plus" mode="toc"> 76 97 <xsl:with-param name="toc-context" select="$toc-context"/> … … 85 106 <xsl:copy-of select="$toc.title"/> 86 107 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> 108 <xsl:call-template name="toc.list.attributes"> 109 <xsl:with-param name="toc-context" select="$toc-context"/> 110 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 111 <xsl:with-param name="nodes" select="$nodes"/> 112 </xsl:call-template> 87 113 <xsl:apply-templates select="$nodes" mode="toc"> 88 114 <xsl:with-param name="toc-context" select="$toc-context"/> … … 98 124 </xsl:template> 99 125 126 <xsl:template name="toc.list.attributes"> 127 <xsl:param name="toc-context" select="."/> 128 <xsl:param name="toc.title.p" select="true()"/> 129 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> 130 131 <xsl:attribute name="class">toc</xsl:attribute> 132 </xsl:template> 133 100 134 <xsl:template name="make.lots"> 101 135 <xsl:param name="toc.params" select="''"/> … … 116 150 <xsl:call-template name="list.of.titles"> 117 151 <xsl:with-param name="titles" select="'table'"/> 118 <xsl:with-param name="nodes" select=".//table "/>152 <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/> 119 153 </xsl:call-template> 120 154 </xsl:if> … … 151 185 <xsl:with-param name="toc-context" select="$toc-context"/> 152 186 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 153 <xsl:with-param name="nodes" select="book|setindex "/>187 <xsl:with-param name="nodes" select="book|setindex|set"/> 154 188 </xsl:call-template> 155 189 </xsl:template> … … 162 196 <xsl:with-param name="toc-context" select="$toc-context"/> 163 197 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 164 <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article | bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/>198 <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |topic |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> 165 199 166 200 </xsl:call-template> … … 174 208 <xsl:with-param name="toc-context" select="$toc-context"/> 175 209 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 176 <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] | refentry |article|bibliography|glossary |appendix|index |bridgehead[not(@renderas) and $bridgehead.in.toc != 0] |.//bridgehead[@renderas='sect1' and $bridgehead.in.toc != 0]"/>210 <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] |topic |refentry |article|bibliography|glossary |appendix|index |bridgehead[not(@renderas) and $bridgehead.in.toc != 0] |.//bridgehead[@renderas='sect1' and $bridgehead.in.toc != 0]"/> 177 211 </xsl:call-template> 178 212 </xsl:template> … … 237 271 <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when> 238 272 <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when> 273 <xsl:when test="local-name(.) = 'topic'">1</xsl:when> 239 274 <xsl:when test="local-name(.) = 'simplesect'"> 240 275 <!-- sigh... --> … … 248 283 <xsl:when test="local-name(..) = 'sect4'">5</xsl:when> 249 284 <xsl:when test="local-name(..) = 'sect5'">6</xsl:when> 285 <xsl:when test="local-name(..) = 'topic'">2</xsl:when> 250 286 <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when> 251 287 <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when> … … 277 313 <xsl:with-param name="toc-context" select="$toc-context"/> 278 314 </xsl:call-template> 279 <xsl:if test="$toc.listitem.type = 'li' and $toc.section.depth > $depthand ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context">315 <xsl:if test="$toc.listitem.type = 'li' and ( (self::set or self::book or self::part) or $toc.section.depth > $depth) and ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context"> 280 316 <xsl:copy-of select="$subtoc.list"/> 281 317 </xsl:if> 282 318 </xsl:element> 283 <xsl:if test="$toc.listitem.type != 'li' and $toc.section.depth > $depthand ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context">319 <xsl:if test="$toc.listitem.type != 'li' and ( (self::set or self::book or self::part) or $toc.section.depth > $depth) and ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context"> 284 320 <xsl:copy-of select="$subtoc.list"/> 285 321 </xsl:if> … … 336 372 <xsl:call-template name="subtoc"> 337 373 <xsl:with-param name="toc-context" select="$toc-context"/> 338 <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article | bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/>374 <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |topic |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> 339 375 </xsl:call-template> 340 376 </xsl:template> … … 356 392 <xsl:call-template name="subtoc"> 357 393 <xsl:with-param name="toc-context" select="$toc-context"/> 358 <xsl:with-param name="nodes" select="appendix|chapter|article |index|glossary|bibliography |preface|reference|refentry |bridgehead[$bridgehead.in.toc != 0]"/>359 </xsl:call-template> 360 </xsl:template> 361 362 <xsl:template match="preface|chapter|appendix|article " mode="toc">363 <xsl:param name="toc-context" select="."/> 364 365 <xsl:call-template name="subtoc"> 366 <xsl:with-param name="toc-context" select="$toc-context"/> 367 <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] | refentry |glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/>394 <xsl:with-param name="nodes" select="appendix|chapter|article|topic |index|glossary|bibliography |preface|reference|refentry |bridgehead[$bridgehead.in.toc != 0]"/> 395 </xsl:call-template> 396 </xsl:template> 397 398 <xsl:template match="preface|chapter|appendix|article|topic" mode="toc"> 399 <xsl:param name="toc-context" select="."/> 400 401 <xsl:call-template name="subtoc"> 402 <xsl:with-param name="toc-context" select="$toc-context"/> 403 <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] |topic |refentry |glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/> 368 404 </xsl:call-template> 369 405 </xsl:template> … … 425 461 <xsl:call-template name="subtoc"> 426 462 <xsl:with-param name="toc-context" select="$toc-context"/> 427 <xsl:with-param name="nodes" select="section |bridgehead[$bridgehead.in.toc != 0]"/> 463 <xsl:with-param name="nodes" select="section|refentry |simplesect[$simplesect.in.toc != 0] |bridgehead[$bridgehead.in.toc != 0]"/> 464 </xsl:call-template> 465 </xsl:template> 466 467 <xsl:template match="topic" mode="toc"> 468 <xsl:param name="toc-context" select="."/> 469 470 <xsl:call-template name="subtoc"> 471 <xsl:with-param name="toc-context" select="$toc-context"/> 472 <xsl:with-param name="nodes" select="section|refentry |simplesect[$simplesect.in.toc != 0] |bridgehead[$bridgehead.in.toc != 0]"/> 428 473 </xsl:call-template> 429 474 </xsl:template> … … 496 541 <!-- * is allowed in refpurpose; so we need to run --> 497 542 <!-- * apply-templates on refpurpose here, instead of value-of --> 498 <xsl:apply-templates select="refnamediv/refpurpose" />543 <xsl:apply-templates select="refnamediv/refpurpose" mode="no.anchor.mode"/> 499 544 </xsl:if> 500 545 </span> … … 519 564 <xsl:param name="toc-context" select="."/> 520 565 <xsl:param name="tocentry"/> 566 <xsl:param name="toc.title.p" select="true()"/> 567 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> 521 568 522 569 <!-- be careful, we don't want to change the current document to the other tree! --> … … 546 593 <xsl:if test="$tocentry/*"> 547 594 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> 595 <xsl:call-template name="toc.list.attributes"> 596 <xsl:with-param name="toc-context" select="$toc-context"/> 597 <xsl:with-param name="toc.title.p" select="$toc.title.p"/> 598 <xsl:with-param name="nodes" select="$nodes"/> 599 </xsl:call-template> 548 600 <xsl:call-template name="manual-toc"> 549 601 <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> … … 569 621 <xsl:if test="$nodes"> 570 622 <div class="list-of-{$titles}s"> 571 <p> 572 <b> 573 <xsl:call-template name="gentext"> 574 <xsl:with-param name="key"> 575 <xsl:choose> 576 <xsl:when test="$titles='table'">ListofTables</xsl:when> 577 <xsl:when test="$titles='figure'">ListofFigures</xsl:when> 578 <xsl:when test="$titles='equation'">ListofEquations</xsl:when> 579 <xsl:when test="$titles='example'">ListofExamples</xsl:when> 580 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when> 581 <xsl:otherwise>ListofUnknown</xsl:otherwise> 582 </xsl:choose> 583 </xsl:with-param> 584 </xsl:call-template> 585 </b> 586 </p> 623 <xsl:choose> 624 <xsl:when test="$make.clean.html != 0"> 625 <div class="toc-title"> 626 <xsl:call-template name="gentext"> 627 <xsl:with-param name="key"> 628 <xsl:choose> 629 <xsl:when test="$titles='table'">ListofTables</xsl:when> 630 <xsl:when test="$titles='figure'">ListofFigures</xsl:when> 631 <xsl:when test="$titles='equation'">ListofEquations</xsl:when> 632 <xsl:when test="$titles='example'">ListofExamples</xsl:when> 633 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when> 634 <xsl:otherwise>ListofUnknown</xsl:otherwise> 635 </xsl:choose> 636 </xsl:with-param> 637 </xsl:call-template> 638 </div> 639 </xsl:when> 640 <xsl:otherwise> 641 <p> 642 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> 643 <xsl:call-template name="gentext"> 644 <xsl:with-param name="key"> 645 <xsl:choose> 646 <xsl:when test="$titles='table'">ListofTables</xsl:when> 647 <xsl:when test="$titles='figure'">ListofFigures</xsl:when> 648 <xsl:when test="$titles='equation'">ListofEquations</xsl:when> 649 <xsl:when test="$titles='example'">ListofExamples</xsl:when> 650 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when> 651 <xsl:otherwise>ListofUnknown</xsl:otherwise> 652 </xsl:choose> 653 </xsl:with-param> 654 </xsl:call-template> 655 </strong> 656 </p> 657 </xsl:otherwise> 658 </xsl:choose> 587 659 588 660 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/chunk.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: chunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ 8 8 ******************************************************************** 9 9 … … 23 23 customization should import mydocbook.xsl instead of 24 24 docbook.xsl. --> 25 <xsl:import href="docbook .xsl"/>25 <xsl:import href="docbook-no-doctype.xsl"/> 26 26 27 27 <!-- chunk-common.xsl contains all the named templates for chunking. … … 48 48 apply the chunking version instead of the original 49 49 non-chunking version to format an element. --> 50 <xsl:include href=" profile-chunk-code.xsl"/>50 <xsl:include href="chunk-code.xsl"/> 51 51 52 52 </xsl:stylesheet> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/chunker.xsl
rf2a5108 rb1a51ac1 2 2 <!--This file was created automatically by html2xhtml--> 3 3 <!--from the HTML stylesheets.--> 4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes=" doc" extension-element-prefixes="saxon redirect lxslt exsl">4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="saxon lxslt redirect exsl doc" extension-element-prefixes="saxon redirect lxslt exsl"> 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: chunker.xsl 9656 2012-10-29 18:09:53Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 29 29 <xsl:param name="chunker.output.media-type" select="''"/> 30 30 <xsl:param name="chunker.output.cdata-section-elements" select="''"/> 31 <xsl:param name="chunker.output.quiet" select="0"/> 31 32 <!-- Make sure base.dir has a trailing slash now --> 33 <xsl:param name="chunk.base.dir"> 34 <xsl:choose> 35 <xsl:when test="string-length($base.dir) = 0"/> 36 <!-- make sure to add trailing slash if omitted by user --> 37 <xsl:when test="substring($base.dir, string-length($base.dir), 1) = '/'"> 38 <xsl:value-of select="$base.dir"/> 39 </xsl:when> 40 <xsl:otherwise> 41 <xsl:value-of select="concat($base.dir, '/')"/> 42 </xsl:otherwise> 43 </xsl:choose> 44 </xsl:param> 32 45 33 46 <xsl:param name="saxon.character.representation" select="'entity;decimal'"/> … … 71 84 <xsl:template name="write.chunk"> 72 85 <xsl:param name="filename" select="''"/> 73 <xsl:param name="quiet" select="$chunk er.output.quiet"/>86 <xsl:param name="quiet" select="$chunk.quietly"/> 74 87 <xsl:param name="suppress-context-node-name" select="0"/> 75 88 <xsl:param name="message-prolog"/> … … 239 252 <xsl:template name="write.chunk.with.doctype"> 240 253 <xsl:param name="filename" select="''"/> 241 <xsl:param name="quiet" select="$chunk er.output.quiet"/>254 <xsl:param name="quiet" select="$chunk.quietly"/> 242 255 243 256 <xsl:param name="method" select="$chunker.output.method"/> … … 271 284 <xsl:template name="write.text.chunk"> 272 285 <xsl:param name="filename" select="''"/> 273 <xsl:param name="quiet" select="$chunk er.output.quiet"/>286 <xsl:param name="quiet" select="$chunk.quietly"/> 274 287 <xsl:param name="suppress-context-node-name" select="0"/> 275 288 <xsl:param name="message-prolog"/> … … 289 302 <xsl:with-param name="encoding" select="$encoding"/> 290 303 <xsl:with-param name="indent" select="'no'"/> 291 <xsl:with-param name="omit-xml-declaration" select="' no'"/>304 <xsl:with-param name="omit-xml-declaration" select="'yes'"/> 292 305 <xsl:with-param name="standalone" select="'no'"/> 293 306 <xsl:with-param name="doctype-public"/> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/division.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: division.xsl 9366 2012-05-12 23:44:25Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 19 19 <xsl:call-template name="id.warning"/> 20 20 21 <div> 22 <xsl:apply-templates select="." mode="class.attribute"/> 21 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> 22 <xsl:apply-templates select="." mode="common.html.attributes"/> 23 <xsl:call-template name="id.attribute"> 24 <xsl:with-param name="conditional" select="0"/> 25 </xsl:call-template> 23 26 <xsl:call-template name="dir"> 24 27 <xsl:with-param name="inherit" select="1"/> … … 49 52 50 53 <xsl:apply-templates/> 51 </ div>54 </xsl:element> 52 55 </xsl:template> 53 56 … … 63 66 64 67 <div> 65 <xsl:apply-templates select="." mode="class.attribute"/> 66 <xsl:call-template name="dir"> 67 <xsl:with-param name="inherit" select="1"/> 68 </xsl:call-template> 69 <xsl:call-template name="language.attribute"/> 70 <xsl:if test="$generate.id.attributes != 0"> 71 <xsl:attribute name="id"> 72 <xsl:call-template name="object.id"/> 73 </xsl:attribute> 74 </xsl:if> 68 <xsl:apply-templates select="." mode="common.html.attributes"/> 69 <xsl:call-template name="id.attribute"> 70 <xsl:with-param name="conditional" select="0"/> 71 </xsl:call-template> 75 72 76 73 <xsl:call-template name="book.titlepage"/> 77 74 78 75 <xsl:apply-templates select="dedication" mode="dedication"/> 76 <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/> 79 77 80 78 <xsl:variable name="toc.params"> … … 109 107 110 108 <div> 111 <xsl:apply-templates select="." mode="class.attribute"/> 112 <xsl:call-template name="dir"> 113 <xsl:with-param name="inherit" select="1"/> 114 </xsl:call-template> 115 <xsl:call-template name="language.attribute"/> 116 <xsl:if test="$generate.id.attributes != 0"> 117 <xsl:attribute name="id"> 118 <xsl:call-template name="object.id"/> 119 </xsl:attribute> 120 </xsl:if> 109 <xsl:apply-templates select="." mode="common.html.attributes"/> 110 <xsl:call-template name="id.attribute"> 111 <xsl:with-param name="conditional" select="0"/> 112 </xsl:call-template> 121 113 122 114 <xsl:call-template name="part.titlepage"/> … … 153 145 154 146 <div> 155 <xsl:apply-templates select="." mode="class.attribute"/> 156 <xsl:call-template name="dir"> 157 <xsl:with-param name="inherit" select="1"/> 158 </xsl:call-template> 159 <xsl:call-template name="language.attribute"/> 160 <xsl:if test="$generate.id.attributes != 0"> 161 <xsl:attribute name="id"> 162 <xsl:call-template name="object.id"/> 163 </xsl:attribute> 164 </xsl:if> 147 <xsl:call-template name="common.html.attributes"/> 148 <xsl:call-template name="id.attribute"> 149 <xsl:with-param name="conditional" select="0"/> 150 </xsl:call-template> 165 151 166 152 <xsl:call-template name="partintro.titlepage"/> … … 193 179 <xsl:template match="partintro/subtitle" mode="partintro.title.mode"> 194 180 <h3> 195 < i><xsl:apply-templates/></i>181 <em xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></em> 196 182 </h3> 197 183 </xsl:template> … … 214 200 <h1> 215 201 <xsl:attribute name="class">title</xsl:attribute> 216 <xsl:if test="$generate.id.attributes = 0"> 217 <xsl:call-template name="anchor"> 218 <xsl:with-param name="node" select="$node"/> 219 <xsl:with-param name="conditional" select="0"/> 220 </xsl:call-template> 221 </xsl:if> 222 <xsl:apply-templates select="$node" mode="object.title.markup"> 202 <xsl:call-template name="anchor"> 203 <xsl:with-param name="node" select="$node"/> 204 <xsl:with-param name="conditional" select="0"/> 205 </xsl:call-template> 206 <xsl:apply-templates select="$node" mode="object.title.markup"> 223 207 <xsl:with-param name="allow-anchors" select="1"/> 224 208 </xsl:apply-templates> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/ebnf.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 17 17 <referenceinfo xmlns="http://www.w3.org/1999/xhtml"> 18 18 <releaseinfo role="meta"> 19 $Id $19 $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $ 20 20 </releaseinfo> 21 21 <author><surname>Walsh</surname> … … 65 65 <xsl:attribute name="summary"> 66 66 <xsl:text>EBNF</xsl:text> 67 <xsl:if test="title ">67 <xsl:if test="title|info/title"> 68 68 <xsl:text> for </xsl:text> 69 <xsl:value-of select="title "/>69 <xsl:value-of select="title|info/title[1]"/> 70 70 </xsl:if> 71 71 </xsl:attribute> 72 72 73 <xsl:if test="title ">73 <xsl:if test="title|info/title"> 74 74 <tr> 75 <th align=" left" valign="top">75 <th align="{$direction.align.start}" valign="top"> 76 76 <xsl:apply-templates select="." mode="class.attribute"/> 77 <xsl:apply-templates select="title "/>77 <xsl:apply-templates select="title|info/title[1]"/> 78 78 </th> 79 79 </tr> … … 105 105 <xsl:param name="recap" select="false()"/> 106 106 <tr> 107 <td align=" left" valign="top" width="3%">107 <td align="{$direction.align.start}" valign="top" width="3%"> 108 108 <xsl:text>[</xsl:text> 109 <xsl: number count="production" level="any"/>109 <xsl:apply-templates select="." mode="label.markup"/> 110 110 <xsl:text>]</xsl:text> 111 111 </td> 112 <td align=" right" valign="top" width="10%">112 <td align="{$direction.align.end}" valign="top" width="10%"> 113 113 <xsl:choose> 114 114 <xsl:when test="$recap"> … … 123 123 </xsl:when> 124 124 <xsl:otherwise> 125 <xsl:call-template name="id.attribute"/> 125 126 <xsl:call-template name="anchor"/> 126 127 <xsl:apply-templates select="lhs"/> … … 135 136 <xsl:copy-of select="$ebnf.statement.terminator"/> 136 137 </td> 137 <td align=" left" valign="top" width="30%">138 <td align="{$direction.align.start}" valign="top" width="30%"> 138 139 <xsl:choose> 139 140 <xsl:when test="rhs/lineannotation|constraint"> … … 315 316 <div> 316 317 <xsl:apply-templates select="." mode="class.attribute"/> 318 <xsl:call-template name="id.attribute"/> 317 319 <xsl:call-template name="anchor"/> 318 320 <xsl:apply-templates/> … … 321 323 322 324 <xsl:template match="constraintdef/title"> 323 <p>< b><xsl:apply-templates/></b></p>325 <p><strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong></p> 324 326 </xsl:template> 325 327 -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/graphics.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: graphics.xsl 9710 2013-01-22 19:34:18Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 31 31 <xsl:param name="ext"/> 32 32 <xsl:variable name="lcext" select="translate($ext, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/> 33 <xsl:if test="$lcext = 'svg' or $lcext = 'png' or $lcext = 'jpeg' or $lcext = 'jpg' or $lcext = 'avi' or $lcext = 'mpg' or $lcext = 'mp eg' or $lcext = 'qt' or $lcext = 'gif' or $lcext = 'bmp'">1</xsl:if>33 <xsl:if test="$lcext = 'svg' or $lcext = 'png' or $lcext = 'jpeg' or $lcext = 'jpg' or $lcext = 'avi' or $lcext = 'mpg' or $lcext = 'mp4' or $lcext = 'mpeg' or $lcext = 'qt' or $lcext = 'gif' or $lcext = 'acc' or $lcext = 'mp1' or $lcext = 'mp2' or $lcext = 'mp3' or $lcext = 'mp4' or $lcext = 'm4v' or $lcext = 'm4a' or $lcext = 'wav' or $lcext = 'ogv' or $lcext = 'ogg' or $lcext = 'webm' or $lcext = 'bmp'">1</xsl:if> 34 34 </xsl:template> 35 35 … … 38 38 <xsl:template match="screenshot"> 39 39 <div> 40 <xsl:apply-templates select="." mode="class.attribute"/> 40 <xsl:apply-templates select="." mode="common.html.attributes"/> 41 <xsl:call-template name="id.attribute"/> 42 <xsl:call-template name="anchor"/> 41 43 <xsl:apply-templates/> 42 44 </div> 45 </xsl:template> 46 47 <xsl:template match="screenshot/title"> 48 <xsl:call-template name="formal.object.heading"> 49 <xsl:with-param name="object" select=".."/> 50 </xsl:call-template> 43 51 </xsl:template> 44 52 … … 108 116 109 117 Scale can be problematic. Scale applies to the contentwidth, so 110 a scale of 50 when a contentwidth is not specified is anal ogous to a118 a scale of 50 when a contentwidth is not specified is analagous to a 111 119 width of 50%. (If a contentwidth is specified, the scaling factor can 112 120 be applied to that value and no problem exists.) … … 244 252 <!-- This funny compound test works around a bug in XSLTC --> 245 253 <xsl:choose> 246 <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0 ">254 <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0 and not(@format='SVG')"> 247 255 <xsl:choose> 248 256 <xsl:when test="function-available('simg:getWidth')"> … … 277 285 <!-- This funny compound test works around a bug in XSLTC --> 278 286 <xsl:choose> 279 <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0 ">287 <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0 and not(@format='SVG')"> 280 288 <xsl:choose> 281 289 <xsl:when test="function-available('simg:getDepth')"> … … 339 347 </xsl:call-template> 340 348 </xsl:variable> 341 <xsl:value-of select=" $cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/>349 <xsl:value-of select="round($cwidth.in.points div 72.0 * $pixels.per.inch * $scale)"/> 342 350 </xsl:if> 343 351 </xsl:variable> … … 406 414 </xsl:call-template> 407 415 </xsl:variable> 408 <xsl:value-of select=" $cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/>416 <xsl:value-of select="round($cdepth.in.points div 72.0 * $pixels.per.inch * $scale)"/> 409 417 </xsl:if> 410 418 </xsl:variable> … … 487 495 <xsl:choose> 488 496 <xsl:when test="@format = 'SVG'"> 489 <object data="{$output_filename}" type="image/svg+xml"> 490 <xsl:call-template name="process.image.attributes"> 497 <object type="image/svg+xml"> 498 <xsl:attribute name="data"> 499 <xsl:choose> 500 <xsl:when test="$img.src.path != '' and $tag = 'img' and not(starts-with($output_filename, '/')) and not(contains($output_filename, '://'))"> 501 <xsl:value-of select="$img.src.path"/> 502 </xsl:when> 503 </xsl:choose> 504 <xsl:value-of select="$output_filename"/> 505 </xsl:attribute> 506 <xsl:call-template name="process.image.attributes"> 491 507 <!--xsl:with-param name="alt" select="$alt"/ there's no alt here--> 492 508 <xsl:with-param name="html.depth" select="$html.depth"/> … … 510 526 </xsl:if> 511 527 <xsl:if test="$use.embed.for.svg != 0"> 512 <embed src="{$output_filename}" type="image/svg+xml"> 528 <embed type="image/svg+xml"> 529 <xsl:attribute name="src"> 530 <xsl:choose> 531 <xsl:when test="$img.src.path != '' and $tag = 'img' and not(starts-with($output_filename, '/')) and not(contains($output_filename, '://'))"> 532 <xsl:value-of select="$img.src.path"/> 533 </xsl:when> 534 </xsl:choose> 535 <xsl:value-of select="$output_filename"/> 536 </xsl:attribute> 513 537 <xsl:call-template name="process.image.attributes"> 514 538 <!--xsl:with-param name="alt" select="$alt"/ there's no alt here --> … … 579 603 </xsl:when> 580 604 <xsl:when test="ancestor::figure"> 581 <xsl:value-of select="normalize-space(ancestor::figure/title)"/> 605 <xsl:variable name="fig.title"> 606 <xsl:apply-templates select="ancestor::figure/title/node()"/> 607 </xsl:variable> 608 <xsl:value-of select="normalize-space($fig.title)"/> 582 609 </xsl:when> 583 610 </xsl:choose> … … 607 634 <xsl:choose> 608 635 <xsl:when test="$use.viewport"> 609 <table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0"> 636 <table border="{$table.border.off}"> 637 <xsl:if test="$div.element != 'section'"> 638 <xsl:attribute name="summary">manufactured viewport for HTML img</xsl:attribute> 639 </xsl:if> 640 <xsl:if test="$css.decoration != ''"> 641 <xsl:attribute name="style">cellpadding: 0; cellspacing: 0;</xsl:attribute> 642 </xsl:if> 610 643 <xsl:if test="$html.width != ''"> 611 644 <xsl:attribute name="width"> … … 939 972 </xsl:if> 940 973 974 <!-- Turn off longdesc attribute since not supported by browsers 941 975 <xsl:if test="$longdesc != ''"> 942 976 <xsl:attribute name="longdesc"> … … 944 978 </xsl:attribute> 945 979 </xsl:if> 980 --> 946 981 947 982 <xsl:if test="@align and $viewport = 0"> … … 955 990 </xsl:attribute> 956 991 </xsl:if> 957 </xsl:template> 992 993 <xsl:call-template name="extension.process.image.attributes"/> 994 </xsl:template> 995 996 <xsl:template name="extension.process.image.attributes"/> 958 997 959 998 <!-- ==================================================================== --> … … 962 1001 <xsl:choose> 963 1002 <xsl:when test="parent::inlineequation"> 964 <xsl:call-template name="anchor"/> 965 <xsl:call-template name="process.image"/> 1003 <span> 1004 <xsl:call-template name="id.attribute"/> 1005 <xsl:call-template name="anchor"/> 1006 <xsl:call-template name="process.image"/> 1007 </span> 966 1008 </xsl:when> 967 1009 <xsl:otherwise> 968 1010 <div> 1011 <xsl:call-template name="id.attribute"/> 969 1012 <xsl:if test="@align"> 970 1013 <xsl:attribute name="align"> … … 1012 1055 </xsl:when> 1013 1056 <xsl:otherwise> 1014 <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/> 1015 </xsl:otherwise> 1057 <xsl:message terminate="yes"> 1058 <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/> 1059 <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> 1060 </xsl:message> 1061 </xsl:otherwise> 1016 1062 </xsl:choose> 1017 1063 </xsl:when> … … 1042 1088 1043 1089 <div> 1044 <xsl:apply-templates select="." mode="c lass.attribute"/>1090 <xsl:apply-templates select="." mode="common.html.attributes"/> 1045 1091 <xsl:if test="$align != '' "> 1046 1092 <xsl:attribute name="align"> … … 1048 1094 </xsl:attribute> 1049 1095 </xsl:if> 1096 <xsl:call-template name="id.attribute"/> 1050 1097 <xsl:call-template name="anchor"/> 1051 1098 … … 1057 1104 <xsl:template match="inlinemediaobject"> 1058 1105 <span> 1059 <xsl:apply-templates select="." mode="class.attribute"/> 1106 <xsl:apply-templates select="." mode="common.html.attributes"/> 1107 <xsl:call-template name="id.attribute"/> 1060 1108 <xsl:call-template name="anchor"/> 1061 1109 <xsl:call-template name="select.mediaobject"/> … … 1072 1120 <xsl:template match="imageobjectco"> 1073 1121 <xsl:call-template name="anchor"/> 1074 <xsl:apply-templates select="imageobject"/> 1122 <xsl:choose> 1123 <!-- select one imageobject? --> 1124 <xsl:when test="$use.role.for.mediaobject != 0 and count(imageobject) > 1 and imageobject[@role]"> 1125 <xsl:variable name="olist" select="imageobject"/> 1126 1127 <xsl:variable name="object.index"> 1128 <xsl:call-template name="select.mediaobject.index"> 1129 <xsl:with-param name="olist" select="$olist"/> 1130 <xsl:with-param name="count" select="1"/> 1131 </xsl:call-template> 1132 </xsl:variable> 1133 1134 <xsl:variable name="object" select="$olist[position() = $object.index]"/> 1135 1136 <xsl:apply-templates select="$object"/> 1137 </xsl:when> 1138 <xsl:otherwise> 1139 <!-- otherwise process them all --> 1140 <xsl:apply-templates select="imageobject"/> 1141 </xsl:otherwise> 1142 </xsl:choose> 1143 1075 1144 <xsl:apply-templates select="calloutlist"/> 1145 1076 1146 </xsl:template> 1077 1147 … … 1130 1200 <xsl:call-template name="process.image"> 1131 1201 <xsl:with-param name="alt"> 1132 <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/> 1202 <xsl:choose> 1203 <xsl:when test="ancestor::mediaobject/alt"> 1204 <xsl:apply-templates select="ancestor::mediaobject/alt"/> 1205 </xsl:when> 1206 <xsl:otherwise> 1207 <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/> 1208 </xsl:otherwise> 1209 </xsl:choose> 1133 1210 </xsl:with-param> 1134 1211 <xsl:with-param name="longdesc"> … … 1165 1242 </xsl:when> 1166 1243 <xsl:otherwise> 1167 <xsl:value-of select="$ base.dir"/>1244 <xsl:value-of select="$chunk.base.dir"/> 1168 1245 </xsl:otherwise> 1169 1246 </xsl:choose> … … 1242 1319 <xsl:variable name="this.uri"> 1243 1320 <xsl:call-template name="make-relative-filename"> 1244 <xsl:with-param name="base.dir" select="$ base.dir"/>1321 <xsl:with-param name="base.dir" select="$chunk.base.dir"/> 1245 1322 <xsl:with-param name="base.name"> 1246 1323 <xsl:call-template name="href.target.uri"/> … … 1257 1334 </xsl:variable> 1258 1335 1259 <div class="longdesc-link" align=" right">1336 <div class="longdesc-link" align="{$direction.align.end}"> 1260 1337 <br clear="all"/> 1261 1338 <span class="longdesc-link"> … … 1269 1346 <!-- ==================================================================== --> 1270 1347 1348 <xsl:template match="mediaobject/alt"> 1349 <xsl:apply-templates/> 1350 </xsl:template> 1351 1271 1352 <xsl:template match="videoobject"> 1272 1353 <xsl:apply-templates select="videodata"/> … … 1277 1358 <xsl:with-param name="tag" select="'embed'"/> 1278 1359 <xsl:with-param name="alt"> 1279 <xsl:apply-templates select="(../../textobject/phrase)[1]"/> 1360 <xsl:choose> 1361 <xsl:when test="ancestor::mediaobject/alt"> 1362 <xsl:apply-templates select="ancestor::mediaobject/alt"/> 1363 </xsl:when> 1364 <xsl:otherwise> 1365 <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/> 1366 </xsl:otherwise> 1367 </xsl:choose> 1280 1368 </xsl:with-param> 1281 1369 </xsl:call-template> … … 1292 1380 <xsl:with-param name="tag" select="'embed'"/> 1293 1381 <xsl:with-param name="alt"> 1294 <xsl:apply-templates select="(../../textobject/phrase)[1]"/> 1382 <xsl:choose> 1383 <xsl:when test="ancestor::mediaobject/alt"> 1384 <xsl:apply-templates select="ancestor::mediaobject/alt"/> 1385 </xsl:when> 1386 <xsl:otherwise> 1387 <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/> 1388 </xsl:otherwise> 1389 </xsl:choose> 1295 1390 </xsl:with-param> 1296 1391 </xsl:call-template> … … 1343 1438 </xsl:when> 1344 1439 <xsl:otherwise> 1345 <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/> 1440 <xsl:message terminate="yes"> 1441 <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/> 1442 <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text> 1443 </xsl:message> 1346 1444 </xsl:otherwise> 1347 1445 </xsl:choose> … … 1352 1450 <xsl:template match="caption"> 1353 1451 <div> 1354 <xsl:apply-templates select="." mode="class.attribute"/> 1452 <xsl:apply-templates select="." mode="common.html.attributes"/> 1453 <xsl:call-template name="id.attribute"/> 1355 1454 <xsl:if test="@align = 'right' or @align = 'left' or @align='center'"> 1356 1455 <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/inline.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: inline.xsl 9663 2012-11-06 19:09:16Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 13 13 14 14 ******************************************************************** --> 15 16 <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/> 17 <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/> 18 15 19 <xsl:template name="simple.xlink"> 16 20 <xsl:param name="node" select="."/> … … 18 22 <xsl:apply-templates/> 19 23 </xsl:param> 20 <xsl:param name="a.target"/>21 24 <xsl:param name="linkend" select="$node/@linkend"/> 22 25 <xsl:param name="xhref" select="$node/@xlink:href"/> 26 27 <!-- Support for @xlink:show --> 28 <xsl:variable name="target.show"> 29 <xsl:choose> 30 <xsl:when test="$node/@xlink:show = 'new'">_blank</xsl:when> 31 <xsl:when test="$node/@xlink:show = 'replace'">_top</xsl:when> 32 <xsl:otherwise/> 33 </xsl:choose> 34 </xsl:variable> 23 35 24 36 <xsl:variable name="link"> … … 39 51 <xsl:variable name="is.olink"> 40 52 <xsl:choose> 41 53 <!-- If xlink:role="http://docbook.org/xlink/role/olink" --> 42 54 <!-- and if the href contains # --> 43 <xsl:when test="contains($xhref,'#') and @xlink:role = $xolink.role">1</xsl:when>55 <xsl:when test="contains($xhref,'#') and @xlink:role = $xolink.role">1</xsl:when> 44 56 <xsl:otherwise>0</xsl:otherwise> 45 57 </xsl:choose> … … 47 59 48 60 <xsl:choose> 61 <xsl:when test="$is.olink = 1"> 62 <xsl:call-template name="olink"> 63 <xsl:with-param name="content" select="$content"/> 64 </xsl:call-template> 65 </xsl:when> 66 49 67 <xsl:when test="$is.idref = 1"> 50 68 … … 73 91 <xsl:otherwise> 74 92 <a> 75 <xsl:apply-templates select="." mode="class.attribute"/> 93 <xsl:apply-templates select="." mode="common.html.attributes"/> 94 <xsl:call-template name="id.attribute"/> 76 95 77 96 <xsl:attribute name="href"> … … 92 111 </xsl:choose> 93 112 94 <xsl:if test="$ a.target">113 <xsl:if test="$target.show !=''"> 95 114 <xsl:attribute name="target"> 96 <xsl:value-of select="$ a.target"/>115 <xsl:value-of select="$target.show"/> 97 116 </xsl:attribute> 98 117 </xsl:if> … … 105 124 </xsl:when> 106 125 107 <xsl:when test="$is.olink = 1">108 <xsl:call-template name="olink">109 <xsl:with-param name="content" select="$content"/>110 </xsl:call-template>111 </xsl:when>112 113 126 <!-- otherwise it's a URI --> 114 127 <xsl:otherwise> 115 128 <a> 116 <xsl:apply-templates select="." mode="class.attribute"/> 129 <xsl:apply-templates select="." mode="common.html.attributes"/> 130 <xsl:call-template name="id.attribute"/> 117 131 <xsl:attribute name="href"> 118 132 <xsl:value-of select="$xhref"/> … … 123 137 </xsl:attribute> 124 138 </xsl:if> 139 140 <!-- For URIs, use @xlink:show if defined, otherwise use ulink.target --> 141 <xsl:choose> 142 <xsl:when test="$target.show !=''"> 143 <xsl:attribute name="target"> 144 <xsl:value-of select="$target.show"/> 145 </xsl:attribute> 146 </xsl:when> 147 <xsl:when test="$ulink.target !=''"> 148 <xsl:attribute name="target"> 149 <xsl:value-of select="$ulink.target"/> 150 </xsl:attribute> 151 </xsl:when> 152 </xsl:choose> 153 125 154 <xsl:copy-of select="$content"/> 126 155 </a> … … 138 167 139 168 <a> 140 <xsl:apply-templates select="." mode="class.attribute"/> 169 <xsl:apply-templates select="." mode="common.html.attributes"/> 170 <xsl:call-template name="id.attribute"/> 141 171 <xsl:attribute name="href"> 142 172 <xsl:call-template name="href.target"> … … 184 214 <xsl:value-of select="local-name(.)"/> 185 215 </xsl:attribute> 216 <xsl:call-template name="id.attribute"/> 186 217 <xsl:call-template name="dir"/> 187 218 <xsl:call-template name="generate.html.title"/> … … 201 232 </xsl:param> 202 233 <code> 203 <xsl:apply-templates select="." mode="class.attribute"/> 204 <xsl:call-template name="dir"/> 205 <xsl:call-template name="generate.html.title"/> 234 <xsl:apply-templates select="." mode="common.html.attributes"/> 235 <xsl:call-template name="id.attribute"/> 206 236 <xsl:copy-of select="$content"/> 207 237 <xsl:call-template name="apply-annotations"/> … … 220 250 221 251 <span> 222 <xsl:apply-templates select="." mode="class.attribute"/> 223 <xsl:call-template name="generate.html.title"/> 224 <xsl:call-template name="dir"/> 252 <xsl:apply-templates select="." mode="common.html.attributes"/> 253 <xsl:call-template name="id.attribute"/> 225 254 226 255 <!-- don't put <strong> inside figure, example, or table titles --> … … 249 278 </xsl:param> 250 279 <em> 251 <xsl:apply-templates select="." mode="class.attribute"/> 252 <xsl:call-template name="generate.html.title"/> 253 <xsl:call-template name="dir"/> 280 <xsl:call-template name="common.html.attributes"/> 281 <xsl:call-template name="id.attribute"/> 254 282 <xsl:copy-of select="$content"/> 255 283 <xsl:call-template name="apply-annotations"/> … … 271 299 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')"> 272 300 <code> 273 <xsl:apply-templates select="." mode="class.attribute"/> 274 <xsl:call-template name="generate.html.title"/> 275 <xsl:call-template name="dir"/> 301 <xsl:call-template name="common.html.attributes"/> 302 <xsl:call-template name="id.attribute"/> 276 303 <xsl:copy-of select="$content"/> 277 304 <xsl:call-template name="apply-annotations"/> … … 280 307 <xsl:otherwise> 281 308 <strong> 282 <xsl:apply-templates select="." mode="class.attribute"/> 309 <xsl:call-template name="common.html.attributes"/> 310 <xsl:call-template name="id.attribute"/> 283 311 <code> 284 312 <xsl:call-template name="generate.html.title"/> … … 302 330 </xsl:param> 303 331 <em> 304 <xsl:apply-templates select="." mode="class.attribute"/> 332 <xsl:call-template name="common.html.attributes"/> 333 <xsl:call-template name="id.attribute"/> 305 334 <code> 306 335 <xsl:call-template name="generate.html.title"/> … … 323 352 <sup> 324 353 <xsl:call-template name="generate.html.title"/> 354 <xsl:call-template name="id.attribute"/> 325 355 <xsl:call-template name="dir"/> 326 356 <xsl:copy-of select="$content"/> … … 340 370 <sub> 341 371 <xsl:call-template name="generate.html.title"/> 372 <xsl:call-template name="id.attribute"/> 342 373 <xsl:call-template name="dir"/> 343 374 <xsl:copy-of select="$content"/> … … 361 392 362 393 <span> 363 <xsl:apply-templates select="." mode="class.attribute"/> 394 <xsl:call-template name="common.html.attributes"/> 395 <xsl:call-template name="id.attribute"/> 364 396 <xsl:copy-of select="$content"/> 365 397 </span> … … 378 410 379 411 <span> 380 <xsl:apply-templates select="." mode="class.attribute"/> 412 <xsl:call-template name="common.html.attributes"/> 413 <xsl:call-template name="id.attribute"/> 381 414 <xsl:copy-of select="$content"/> 382 415 </span> … … 395 428 396 429 <span> 397 <xsl:apply-templates select="." mode="class.attribute"/> 430 <xsl:call-template name="common.html.attributes"/> 431 <xsl:call-template name="id.attribute"/> 398 432 <xsl:copy-of select="$content"/> 399 433 </span> … … 504 538 <xsl:template match="function/parameter" priority="2"> 505 539 <xsl:call-template name="inline.italicmonoseq"/> 506 <xsl:if test=" following-sibling::*">540 <xsl:if test="$function.parens != 0 and following-sibling::*"> 507 541 <xsl:text>, </xsl:text> 508 542 </xsl:if> … … 511 545 <xsl:template match="function/replaceable" priority="2"> 512 546 <xsl:call-template name="inline.italicmonoseq"/> 513 <xsl:if test=" following-sibling::*">547 <xsl:if test="$function.parens != 0 and following-sibling::*"> 514 548 <xsl:text>, </xsl:text> 515 549 </xsl:if> … … 553 587 554 588 <xsl:template match="keycap"> 555 <xsl:call-template name="inline.boldseq"/> 589 <xsl:choose> 590 <xsl:when test="@function and normalize-space(.) = ''"> 591 <xsl:call-template name="inline.boldseq"> 592 <xsl:with-param name="content"> 593 <xsl:call-template name="gentext.template"> 594 <xsl:with-param name="context" select="'keycap'"/> 595 <xsl:with-param name="name" select="@function"/> 596 </xsl:call-template> 597 </xsl:with-param> 598 </xsl:call-template> 599 </xsl:when> 600 <xsl:otherwise> 601 <xsl:call-template name="inline.boldseq"/> 602 </xsl:otherwise> 603 </xsl:choose> 556 604 </xsl:template> 557 605 … … 656 704 <xsl:when test="$citerefentry.link != '0'"> 657 705 <a> 658 <xsl:apply-templates select="." mode="c lass.attribute"/>706 <xsl:apply-templates select="." mode="common.html.attributes"/> 659 707 <xsl:attribute name="href"> 660 708 <xsl:call-template name="generate.citerefentry.link"/> … … 696 744 <xsl:template match="emphasis"> 697 745 <span> 746 <xsl:call-template name="id.attribute"/> 698 747 <xsl:choose> 699 <xsl:when test="@role and $emphasis.propagates.style != 0"> 700 <xsl:apply-templates select="." mode="class.attribute"> 748 <!-- We don't want empty @class values, so do not propagate empty @roles --> 749 <xsl:when test="@role and normalize-space(@role) != '' and $emphasis.propagates.style != 0"> 750 <xsl:apply-templates select="." mode="common.html.attributes"> 701 751 <xsl:with-param name="class" select="@role"/> 702 752 </xsl:apply-templates> 703 753 </xsl:when> 704 754 <xsl:otherwise> 705 <xsl:apply-templates select="." mode="c lass.attribute"/>755 <xsl:apply-templates select="." mode="common.html.attributes"/> 706 756 </xsl:otherwise> 707 757 </xsl:choose> … … 737 787 <xsl:template match="foreignphrase"> 738 788 <span> 739 <xsl:apply-templates select="." mode="class.attribute"/> 740 <xsl:if test="@lang or @xml:lang"> 741 <xsl:call-template name="language.attribute"/> 742 </xsl:if> 789 <xsl:apply-templates select="." mode="common.html.attributes"/> 743 790 <xsl:call-template name="inline.italicseq"/> 744 791 </span> … … 751 798 <xsl:template match="phrase"> 752 799 <span> 753 <xsl:call-template name="generate.html.title"/> 754 <xsl:if test="@lang or @xml:lang"> 755 <xsl:call-template name="language.attribute"/> 756 </xsl:if> 757 <xsl:if test="@role and $phrase.propagates.style != 0"> 758 <xsl:apply-templates select="." mode="class.attribute"> 759 <xsl:with-param name="class" select="@role"/> 760 </xsl:apply-templates> 761 </xsl:if> 800 <xsl:call-template name="id.attribute"/> 801 <xsl:call-template name="locale.html.attributes"/> 802 <!-- We don't want empty @class values, so do not propagate empty @roles --> 803 <xsl:choose> 804 <xsl:when test="@role and normalize-space(@role) != '' and $phrase.propagates.style != 0"> 805 <xsl:apply-templates select="." mode="class.attribute"> 806 <xsl:with-param name="class" select="@role"/> 807 </xsl:apply-templates> 808 </xsl:when> 809 <xsl:otherwise> 810 <xsl:apply-templates select="." mode="class.attribute"/> 811 </xsl:otherwise> 812 </xsl:choose> 762 813 <xsl:call-template name="dir"/> 763 814 <xsl:call-template name="anchor"/> … … 779 830 </xsl:call-template> 780 831 </xsl:variable> 781 <xsl:choose> 782 <xsl:when test="$depth mod 2 = 0"> 783 <xsl:call-template name="gentext.startquote"/> 784 <xsl:call-template name="inline.charseq"/> 785 <xsl:call-template name="gentext.endquote"/> 786 </xsl:when> 787 <xsl:otherwise> 788 <xsl:call-template name="gentext.nestedstartquote"/> 789 <xsl:call-template name="inline.charseq"/> 790 <xsl:call-template name="gentext.nestedendquote"/> 791 </xsl:otherwise> 792 </xsl:choose> 832 <span> 833 <xsl:apply-templates select="." mode="common.html.attributes"/> 834 <xsl:choose> 835 <xsl:when test="$depth mod 2 = 0"> 836 <xsl:call-template name="gentext.startquote"/> 837 <xsl:call-template name="inline.charseq"/> 838 <xsl:call-template name="gentext.endquote"/> 839 </xsl:when> 840 <xsl:otherwise> 841 <xsl:call-template name="gentext.nestedstartquote"/> 842 <xsl:call-template name="inline.charseq"/> 843 <xsl:call-template name="gentext.nestedendquote"/> 844 </xsl:otherwise> 845 </xsl:choose> 846 </span> 793 847 </xsl:template> 794 848 … … 803 857 <xsl:template match="lineannotation"> 804 858 <em> 805 <xsl:apply-templates select="." mode="c lass.attribute"/>859 <xsl:apply-templates select="." mode="common.html.attributes"/> 806 860 <xsl:call-template name="inline.charseq"/> 807 861 </em> … … 861 915 <xsl:when test="$target"> 862 916 <a> 863 <xsl:apply-templates select="." mode="c lass.attribute"/>917 <xsl:apply-templates select="." mode="common.html.attributes"/> 864 918 <xsl:if test="@id or @xml:id"> 865 919 <xsl:attribute name="id"> … … 944 998 </xsl:variable> 945 999 <a href="{$chunkbase}#{$id}"> 946 <xsl:apply-templates select="." mode="c lass.attribute"/>1000 <xsl:apply-templates select="." mode="common.html.attributes"/> 947 1001 <xsl:call-template name="inline.italicseq"> 948 1002 <xsl:with-param name="content" select="$content"/> … … 964 1018 </xsl:choose> 965 1019 </xsl:variable> 966 <xsl:variable name="targets" select=" //glossentry[normalize-space(glossterm)=$term or normalize-space(glossterm/@baseform)=$term]"/>1020 <xsl:variable name="targets" select="key('glossentries', $term)"/> 967 1021 <xsl:variable name="target" select="$targets[1]"/> 968 1022 … … 978 1032 <xsl:otherwise> 979 1033 <a> 980 <xsl:apply-templates select="." mode="c lass.attribute"/>1034 <xsl:apply-templates select="." mode="common.html.attributes"/> 981 1035 <xsl:if test="@id or @xml:id"> 982 1036 <xsl:attribute name="id"> … … 1007 1061 <xsl:template match="termdef"> 1008 1062 <span> 1009 <xsl:apply-templates select="." mode="class.attribute"/> 1010 <xsl:call-template name="generate.html.title"/> 1063 <xsl:apply-templates select="." mode="common.html.attributes"/> 1011 1064 <xsl:call-template name="gentext.template"> 1012 1065 <xsl:with-param name="context" select="'termdef'"/> … … 1098 1151 1099 1152 <code> 1100 <xsl:apply-templates select="." mode="c lass.attribute">1153 <xsl:apply-templates select="." mode="common.html.attributes"> 1101 1154 <xsl:with-param name="class" select="concat('sgmltag-', $class)"/> 1102 1155 </xsl:apply-templates> 1103 <xsl:call-template name="generate.html.title"/>1104 1156 <xsl:call-template name="simple.xlink"> 1105 1157 <xsl:with-param name="content" select="$content"/> … … 1115 1167 </xsl:if> 1116 1168 <a> 1117 <xsl:apply-templates select="." mode="class.attribute"/> 1169 <xsl:apply-templates select="." mode="common.html.attributes"/> 1170 <xsl:call-template name="id.attribute"/> 1118 1171 <xsl:attribute name="href"> 1119 1172 <xsl:text>mailto:</xsl:text> … … 1215 1268 <xsl:text>[</xsl:text> 1216 1269 <a> 1217 <xsl:apply-templates select="." mode="c lass.attribute"/>1270 <xsl:apply-templates select="." mode="common.html.attributes"/> 1218 1271 <xsl:attribute name="href"> 1219 1272 <xsl:call-template name="href.target"> … … 1222 1275 </xsl:attribute> 1223 1276 1224 <xsl:choose> 1225 <xsl:when test="$bibliography.numbered != 0"> 1226 <xsl:apply-templates select="$target" mode="citation"/> 1227 </xsl:when> 1228 <xsl:otherwise> 1229 <xsl:call-template name="inline.charseq"/> 1230 </xsl:otherwise> 1231 </xsl:choose> 1277 <xsl:choose> 1278 <xsl:when test="$bibliography.numbered != 0"> 1279 <xsl:call-template name="id.attribute"/> 1280 <xsl:apply-templates select="$target" mode="citation"/> 1281 </xsl:when> 1282 <xsl:otherwise> 1283 <xsl:call-template name="inline.charseq"/> 1284 </xsl:otherwise> 1285 </xsl:choose> 1232 1286 1233 1287 </a> … … 1242 1296 </xsl:template> 1243 1297 1298 <xsl:template match="citebiblioid"> 1299 <xsl:variable name="targets" select="//*[biblioid = string(current())]"/> 1300 <xsl:variable name="target" select="$targets[1]"/> 1301 1302 <xsl:choose> 1303 <!-- try automatic linking based on match to parent of biblioid --> 1304 <xsl:when test="$target and not(xref) and not(link)"> 1305 1306 <xsl:text>[</xsl:text> 1307 <a> 1308 <xsl:apply-templates select="." mode="common.html.attributes"/> 1309 <xsl:attribute name="href"> 1310 <xsl:call-template name="href.target"> 1311 <xsl:with-param name="object" select="$target"/> 1312 </xsl:call-template> 1313 </xsl:attribute> 1314 1315 <xsl:call-template name="inline.charseq"/> 1316 1317 </a> 1318 <xsl:text>]</xsl:text> 1319 </xsl:when> 1320 <xsl:otherwise> 1321 <xsl:text>[</xsl:text> 1322 <xsl:call-template name="inline.charseq"/> 1323 <xsl:text>]</xsl:text> 1324 </xsl:otherwise> 1325 </xsl:choose> 1326 </xsl:template> 1327 1244 1328 <xsl:template match="biblioentry|bibliomixed" mode="citation"> 1245 1329 <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/> … … 1248 1332 <!-- ==================================================================== --> 1249 1333 1250 <xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv| parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv|parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]">1334 <xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv| parent::bibliography|parent::blockquote|parent::caution|parent::chapter| parent::glossary|parent::glossdiv|parent::important|parent::index| parent::indexdiv|parent::listitem|parent::note|parent::orderedlist| parent::partintro|parent::preface|parent::procedure|parent::qandadiv| parent::qandaset|parent::question|parent::refentry|parent::refnamediv| parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection| parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4| parent::sect5|parent::section|parent::setindex|parent::sidebar| parent::simplesect|parent::taskprerequisites|parent::taskrelated| parent::tasksummary|parent::warning|parent::topic]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv| parent::bibliography|parent::blockquote|parent::caution|parent::chapter| parent::glossary|parent::glossdiv|parent::important|parent::index| parent::indexdiv|parent::listitem|parent::note|parent::orderedlist| parent::partintro|parent::preface|parent::procedure|parent::qandadiv| parent::qandaset|parent::question|parent::refentry|parent::refnamediv| parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection| parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4| parent::sect5|parent::section|parent::setindex|parent::sidebar| parent::simplesect|parent::taskprerequisites|parent::taskrelated| parent::tasksummary|parent::warning|parent::topic]"> 1251 1335 <xsl:if test="$show.comments != 0"> 1252 <p class="remark">< i><xsl:call-template name="inline.charseq"/></i></p>1336 <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p> 1253 1337 </xsl:if> 1254 1338 </xsl:template> … … 1304 1388 1305 1389 <span> 1306 <xsl:apply-templates select="." mode="class.attribute"/> 1390 <xsl:apply-templates select="." mode="common.html.attributes"/> 1391 <xsl:call-template name="id.attribute"/> 1307 1392 <xsl:copy-of select="$content"/> 1308 1393 </span> … … 1321 1406 1322 1407 <span> 1323 <xsl:apply-templates select="." mode="class.attribute"/> 1408 <xsl:apply-templates select="." mode="common.html.attributes"/> 1409 <xsl:call-template name="id.attribute"/> 1324 1410 <xsl:copy-of select="$content"/> 1325 1411 </span> … … 1340 1426 1341 1427 <span> 1342 <xsl:apply-templates select="." mode="class.attribute"/> 1428 <xsl:apply-templates select="." mode="common.html.attributes"/> 1429 <xsl:call-template name="id.attribute"/> 1343 1430 <xsl:copy-of select="$content"/> 1344 1431 </span> … … 1357 1444 1358 1445 <span> 1359 <xsl:apply-templates select="." mode="class.attribute"/> 1446 <xsl:apply-templates select="." mode="common.html.attributes"/> 1447 <xsl:call-template name="id.attribute"/> 1360 1448 <xsl:copy-of select="$content"/> 1361 1449 </span> … … 1374 1462 1375 1463 <span> 1376 <xsl:apply-templates select="." mode="c lass.attribute"/>1464 <xsl:apply-templates select="." mode="common.html.attributes"/> 1377 1465 <xsl:copy-of select="$content"/> 1378 1466 </span> … … 1391 1479 1392 1480 <span> 1393 <xsl:apply-templates select="." mode="class.attribute"/> 1481 <xsl:apply-templates select="." mode="common.html.attributes"/> 1482 <xsl:call-template name="id.attribute"/> 1394 1483 <xsl:copy-of select="$content"/> 1395 1484 </span> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/lists.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: lists.xsl 9307 2012-04-28 03:55:07Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 17 17 18 18 <xsl:template match="itemizedlist"> 19 <!-- Handle spacing="compact" as multiple class attribute instead 20 of the deprecated HTML compact attribute --> 21 <xsl:variable name="default.class"> 22 <xsl:value-of select="local-name()"/> 23 <xsl:if test="@spacing = 'compact'"> 24 <xsl:text> compact</xsl:text> 25 </xsl:if> 26 </xsl:variable> 27 28 <xsl:variable name="style.value"> 29 <xsl:variable name="type"> 30 <xsl:call-template name="list.itemsymbol"/> 31 </xsl:variable> 32 33 <xsl:text>list-style-type: </xsl:text> 34 <xsl:value-of select="$type"/> 35 <xsl:text>; </xsl:text> 36 </xsl:variable> 37 19 38 <div> 20 <xsl:apply-templates select="." mode="class.attribute"/> 39 <xsl:call-template name="common.html.attributes"/> 40 <xsl:call-template name="id.attribute"/> 21 41 <xsl:call-template name="anchor"/> 22 <xsl:if test="title ">42 <xsl:if test="title|info/title"> 23 43 <xsl:call-template name="formal.object.heading"/> 24 44 </xsl:if> … … 28 48 29 49 <ul> 30 <xsl:if test="$css.decoration != 0"> 31 <xsl:attribute name="type"> 32 <xsl:call-template name="list.itemsymbol"/> 33 </xsl:attribute> 34 </xsl:if> 35 36 <xsl:if test="@spacing='compact'"> 37 <xsl:attribute name="compact"> 38 <xsl:value-of select="@spacing"/> 39 </xsl:attribute> 40 </xsl:if> 50 <xsl:call-template name="generate.class.attribute"> 51 <xsl:with-param name="class" select="$default.class"/> 52 </xsl:call-template> 53 <xsl:choose> 54 <xsl:when test="$css.decoration != 0"> 55 <xsl:attribute name="style"> 56 <xsl:value-of select="$style.value"/> 57 </xsl:attribute> 58 </xsl:when> 59 <xsl:when test="$make.clean.html != 0"> 60 <!-- styled by separate css only --> 61 </xsl:when> 62 <xsl:otherwise> 63 <!-- use the old @type attribute --> 64 <xsl:attribute name="type"> 65 <xsl:call-template name="list.itemsymbol"/> 66 </xsl:attribute> 67 </xsl:otherwise> 68 </xsl:choose> 69 41 70 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/> 42 71 </ul> … … 75 104 76 105 <li> 106 <xsl:call-template name="common.html.attributes"/> 107 <xsl:call-template name="id.attribute"/> 77 108 <xsl:if test="$css.decoration = '1' and $cssmark != ''"> 78 109 <xsl:attribute name="style"> … … 104 135 105 136 <xsl:template match="orderedlist"> 137 <!-- Handle spacing="compact" as multiple class attribute instead 138 of the deprecated HTML compact attribute --> 139 <xsl:variable name="default.class"> 140 <xsl:value-of select="local-name()"/> 141 <xsl:if test="@spacing = 'compact'"> 142 <xsl:text> compact</xsl:text> 143 </xsl:if> 144 </xsl:variable> 145 106 146 <xsl:variable name="start"> 107 147 <xsl:call-template name="orderedlist-starting-number"/> … … 131 171 132 172 <div> 133 <xsl:apply-templates select="." mode="class.attribute"/> 173 <xsl:call-template name="common.html.attributes"/> 174 <xsl:call-template name="id.attribute"/> 134 175 <xsl:call-template name="anchor"/> 135 176 136 <xsl:if test="title ">177 <xsl:if test="title|info/title"> 137 178 <xsl:call-template name="formal.object.heading"/> 138 179 </xsl:if> … … 141 182 <xsl:apply-templates select="*[not(self::listitem or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::listitem)] |processing-instruction()[not(preceding-sibling::listitem)]"/> 142 183 143 <ol> 144 <xsl:if test="$start != '1'"> 145 <xsl:attribute name="start"> 146 <xsl:value-of select="$start"/> 147 </xsl:attribute> 148 </xsl:if> 149 <xsl:if test="$numeration != ''"> 150 <xsl:attribute name="type"> 151 <xsl:value-of select="$type"/> 152 </xsl:attribute> 153 </xsl:if> 154 <xsl:if test="@spacing='compact'"> 155 <xsl:attribute name="compact"> 156 <xsl:value-of select="@spacing"/> 157 </xsl:attribute> 158 </xsl:if> 159 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/> 160 </ol> 184 <xsl:choose> 185 <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]"> 186 <table border="{$table.border.off}"> 187 <xsl:call-template name="generate.class.attribute"> 188 <xsl:with-param name="class" select="$default.class"/> 189 </xsl:call-template> 190 <colgroup> 191 <col align="{$direction.align.start}" valign="top"/> 192 <col/> 193 </colgroup> 194 <tbody> 195 <xsl:apply-templates mode="orderedlist-table" select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/> 196 </tbody> 197 </table> 198 </xsl:when> 199 <xsl:otherwise> 200 <ol> 201 <xsl:call-template name="generate.class.attribute"> 202 <xsl:with-param name="class" select="$default.class"/> 203 </xsl:call-template> 204 <xsl:if test="$start != '1'"> 205 <xsl:attribute name="start"> 206 <xsl:value-of select="$start"/> 207 </xsl:attribute> 208 </xsl:if> 209 <xsl:if test="$numeration != ''"> 210 <xsl:attribute name="type"> 211 <xsl:value-of select="$type"/> 212 </xsl:attribute> 213 </xsl:if> 214 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/> 215 </ol> 216 </xsl:otherwise> 217 </xsl:choose> 161 218 </div> 162 219 </xsl:template> … … 168 225 <xsl:template match="orderedlist/listitem"> 169 226 <li> 227 <xsl:call-template name="common.html.attributes"/> 228 <xsl:call-template name="id.attribute"/> 170 229 <xsl:if test="@override"> 171 230 <xsl:attribute name="value"> … … 195 254 </xsl:template> 196 255 256 <xsl:template match="orderedlist/listitem" mode="orderedlist-table"> 257 <tr> 258 <td> 259 <xsl:apply-templates select="." mode="item-number"/> 260 </td> 261 <td> 262 <xsl:if test="local-name(child::*[1]) != 'para'"> 263 <xsl:call-template name="id.attribute"/> 264 <xsl:call-template name="anchor"/> 265 </xsl:if> 266 267 <xsl:choose> 268 <xsl:when test="$show.revisionflag != 0 and @revisionflag"> 269 <div class="{@revisionflag}"> 270 <xsl:apply-templates/> 271 </div> 272 </xsl:when> 273 <xsl:otherwise> 274 <xsl:apply-templates/> 275 </xsl:otherwise> 276 </xsl:choose> 277 </td> 278 </tr> 279 </xsl:template> 280 197 281 <xsl:template match="variablelist"> 198 282 <xsl:variable name="pi-presentation"> 199 283 <xsl:call-template name="pi.dbhtml_list-presentation"/> 200 284 </xsl:variable> 285 <!-- Handle spacing="compact" as multiple class attribute instead 286 of the deprecated HTML compact attribute --> 287 <xsl:variable name="default.class"> 288 <xsl:value-of select="local-name()"/> 289 <xsl:if test="@spacing = 'compact'"> 290 <xsl:text> compact</xsl:text> 291 </xsl:if> 292 </xsl:variable> 293 201 294 202 295 <xsl:variable name="presentation"> … … 227 320 228 321 <div> 229 <xsl:apply-templates select="." mode="class.attribute"/> 322 <xsl:call-template name="common.html.attributes"/> 323 <xsl:call-template name="id.attribute"/> 230 324 <xsl:call-template name="anchor"/> 231 <xsl:if test="title ">325 <xsl:if test="title|info/title"> 232 326 <xsl:call-template name="formal.object.heading"/> 233 327 </xsl:if> … … 237 331 <!-- Preserve order of PIs and comments --> 238 332 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/> 239 <table border="0"> 333 <table border="{$table.border.off}"> 334 <xsl:call-template name="generate.class.attribute"> 335 <xsl:with-param name="class" select="$default.class"/> 336 </xsl:call-template> 240 337 <xsl:if test="$list-width != ''"> 241 338 <xsl:attribute name="width"> … … 248 345 </xsl:attribute> 249 346 </xsl:if> 250 <col align="left" valign="top"> 251 <xsl:if test="$term-width != ''"> 252 <xsl:attribute name="width"> 253 <xsl:value-of select="$term-width"/> 254 </xsl:attribute> 255 </xsl:if> 256 </col> 347 <colgroup> 348 <col align="{$direction.align.start}" valign="top"> 349 <xsl:if test="$term-width != ''"> 350 <xsl:attribute name="width"> 351 <xsl:value-of select="$term-width"/> 352 </xsl:attribute> 353 </xsl:if> 354 </col> 355 <col/> 356 </colgroup> 257 357 <tbody> 258 358 <xsl:apply-templates mode="varlist-table" select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/> … … 264 364 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/> 265 365 <dl> 366 <xsl:call-template name="generate.class.attribute"> 367 <xsl:with-param name="class" select="$default.class"/> 368 </xsl:call-template> 266 369 <xsl:apply-templates select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/> 267 370 </dl> … … 298 401 <xsl:otherwise> 299 402 <p> 300 <xsl:if test="@role and $para.propagates.style != 0"> 301 <xsl:apply-templates select="." mode="class.attribute"> 302 <xsl:with-param name="class" select="@role"/> 303 </xsl:apply-templates> 304 </xsl:if> 403 <xsl:call-template name="id.attribute"/> 404 <xsl:choose> 405 <xsl:when test="@role and $para.propagates.style != 0"> 406 <xsl:call-template name="common.html.attributes"> 407 <xsl:with-param name="class" select="@role"/> 408 </xsl:call-template> 409 </xsl:when> 410 <xsl:otherwise> 411 <xsl:call-template name="common.html.attributes"/> 412 </xsl:otherwise> 413 </xsl:choose> 305 414 306 415 <xsl:call-template name="anchor"/> … … 313 422 <xsl:template match="varlistentry"> 314 423 <dt> 424 <xsl:call-template name="id.attribute"/> 315 425 <xsl:call-template name="anchor"/> 316 426 <xsl:apply-templates select="term"/> … … 341 451 342 452 <td> 453 <xsl:call-template name="id.attribute"/> 343 454 <p> 344 455 <xsl:call-template name="anchor"/> 345 456 <xsl:choose> 346 457 <xsl:when test="$presentation = 'bold'"> 347 < b>458 <strong> 348 459 <xsl:apply-templates select="term"/> 349 460 <xsl:value-of select="$separator"/> 350 </ b>461 </strong> 351 462 </xsl:when> 352 463 <xsl:when test="$presentation = 'italic'"> 353 < i>464 <em> 354 465 <xsl:apply-templates select="term"/> 355 466 <xsl:value-of select="$separator"/> 356 </ i>467 </em> 357 468 </xsl:when> 358 469 <xsl:when test="$presentation = 'bold-italic'"> 359 < b>360 < i>470 <strong> 471 <em> 361 472 <xsl:apply-templates select="term"/> 362 473 <xsl:value-of select="$separator"/> 363 </ i>364 </ b>474 </em> 475 </strong> 365 476 </xsl:when> 366 477 <xsl:otherwise> … … 378 489 379 490 <xsl:template match="varlistentry/term"> 380 <span class="term"> 491 <span> 492 <xsl:call-template name="common.html.attributes"/> 493 <xsl:call-template name="id.attribute"/> 381 494 <xsl:call-template name="anchor"/> 382 495 <xsl:call-template name="simple.xlink"> … … 426 539 <!-- with no type specified, the default is 'vert' --> 427 540 <xsl:call-template name="anchor"/> 428 <table class="simplelist" border="0" summary="Simple list"> 541 <table border="{$table.border.off}"> 542 <xsl:if test="$div.element != 'section'"> 543 <xsl:attribute name="summary">Simple list</xsl:attribute> 544 </xsl:if> 545 <xsl:call-template name="common.html.attributes"/> 546 <xsl:call-template name="id.attribute"/> 429 547 <xsl:call-template name="simplelist.vert"> 430 548 <xsl:with-param name="cols"> … … 442 560 <xsl:template match="simplelist[@type='inline']"> 443 561 <span> 444 <xsl:apply-templates select="." mode="class.attribute"/> 445 <!-- if dbchoice PI exists, use that to determine the choice separator --> 446 <!-- (that is, equivalent of "and" or "or" in current locale), or literal --> 447 <!-- value of "choice" otherwise --> 448 <xsl:variable name="localized-choice-separator"> 449 <xsl:choose> 450 <xsl:when test="processing-instruction('dbchoice')"> 451 <xsl:call-template name="select.choice.separator"/> 452 </xsl:when> 453 <xsl:otherwise> 454 <!-- empty --> 455 </xsl:otherwise> 456 </xsl:choose> 457 </xsl:variable> 458 459 <xsl:for-each select="member"> 460 <xsl:call-template name="simple.xlink"> 461 <xsl:with-param name="content"> 462 <xsl:apply-templates/> 463 </xsl:with-param> 464 </xsl:call-template> 465 <xsl:choose> 466 <xsl:when test="position() = last()"/> <!-- do nothing --> 467 <xsl:otherwise> 468 <xsl:text>, </xsl:text> 469 <xsl:if test="position() = last() - 1"> 470 <xsl:if test="$localized-choice-separator != ''"> 471 <xsl:value-of select="$localized-choice-separator"/> 472 <xsl:text> </xsl:text> 473 </xsl:if> 474 </xsl:if> 475 </xsl:otherwise> 476 </xsl:choose> 477 </xsl:for-each> 562 <xsl:call-template name="common.html.attributes"/> 563 <xsl:call-template name="id.attribute"/> 564 <!-- if dbchoice PI exists, use that to determine the choice separator --> 565 <!-- (that is, equivalent of "and" or "or" in current locale), or literal --> 566 <!-- value of "choice" otherwise --> 567 <xsl:variable name="localized-choice-separator"> 568 <xsl:choose> 569 <xsl:when test="processing-instruction('dbchoice')"> 570 <xsl:call-template name="select.choice.separator"/> 571 </xsl:when> 572 <xsl:otherwise> 573 <!-- empty --> 574 </xsl:otherwise> 575 </xsl:choose> 576 </xsl:variable> 577 578 <xsl:for-each select="member"> 579 <xsl:call-template name="simple.xlink"> 580 <xsl:with-param name="content"> 581 <xsl:apply-templates/> 582 </xsl:with-param> 583 </xsl:call-template> 584 <xsl:choose> 585 <xsl:when test="position() = last()"/> <!-- do nothing --> 586 <xsl:otherwise> 587 <xsl:text>, </xsl:text> 588 <xsl:if test="position() = last() - 1"> 589 <xsl:if test="$localized-choice-separator != ''"> 590 <xsl:value-of select="$localized-choice-separator"/> 591 <xsl:text> </xsl:text> 592 </xsl:if> 593 </xsl:if> 594 </xsl:otherwise> 595 </xsl:choose> 596 </xsl:for-each> 478 597 </span> 479 598 </xsl:template> … … 481 600 <xsl:template match="simplelist[@type='horiz']"> 482 601 <xsl:call-template name="anchor"/> 483 <table class="simplelist" border="0" summary="Simple list"> 602 <table border="{$table.border.off}"> 603 <xsl:if test="$div.element != 'section'"> 604 <xsl:attribute name="summary">Simple list</xsl:attribute> 605 </xsl:if> 606 <xsl:call-template name="common.html.attributes"/> 607 <xsl:call-template name="id.attribute"/> 484 608 <xsl:call-template name="simplelist.horiz"> 485 609 <xsl:with-param name="cols"> … … 497 621 <xsl:template match="simplelist[@type='vert']"> 498 622 <xsl:call-template name="anchor"/> 499 <table class="simplelist" border="0" summary="Simple list"> 623 <table border="{$table.border.off}"> 624 <xsl:if test="$div.element != 'section'"> 625 <xsl:attribute name="summary">Simple list</xsl:attribute> 626 </xsl:if> 627 <xsl:call-template name="common.html.attributes"/> 628 <xsl:call-template name="id.attribute"/> 500 629 <xsl:call-template name="simplelist.vert"> 501 630 <xsl:with-param name="cols"> … … 650 779 651 780 <div> 652 <xsl:apply-templates select="." mode="class.attribute"/> 781 <xsl:call-template name="common.html.attributes"/> 782 <xsl:call-template name="id.attribute"> 783 <xsl:with-param name="conditional"> 784 <xsl:choose> 785 <xsl:when test="title">0</xsl:when> 786 <xsl:otherwise>1</xsl:otherwise> 787 </xsl:choose> 788 </xsl:with-param> 789 </xsl:call-template> 653 790 <xsl:call-template name="anchor"> 654 791 <xsl:with-param name="conditional"> 655 792 <xsl:choose> 656 657 658 793 <xsl:when test="title">0</xsl:when> 794 <xsl:otherwise>1</xsl:otherwise> 795 </xsl:choose> 659 796 </xsl:with-param> 660 797 </xsl:call-template> 661 798 662 <xsl:if test=" titleand $placement = 'before'">799 <xsl:if test="(title or info/title) and $placement = 'before'"> 663 800 <xsl:call-template name="formal.object.heading"/> 664 801 </xsl:if> … … 669 806 <xsl:when test="count(step) = 1"> 670 807 <ul> 808 <xsl:call-template name="generate.class.attribute"/> 671 809 <xsl:apply-templates select="step |comment()[preceding-sibling::step] |processing-instruction()[preceding-sibling::step]"/> 672 810 </ul> … … 674 812 <xsl:otherwise> 675 813 <ol> 814 <xsl:call-template name="generate.class.attribute"/> 676 815 <xsl:attribute name="type"> 677 816 <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/> … … 682 821 </xsl:choose> 683 822 684 <xsl:if test=" titleand $placement != 'before'">823 <xsl:if test="(title or info/title) and $placement != 'before'"> 685 824 <xsl:call-template name="formal.object.heading"/> 686 825 </xsl:if> … … 700 839 701 840 <ol type="{$numeration}"> 841 <xsl:call-template name="common.html.attributes"/> 842 <xsl:call-template name="id.attribute"/> 702 843 <xsl:apply-templates/> 703 844 </ol> … … 706 847 <xsl:template match="step"> 707 848 <li> 849 <xsl:call-template name="common.html.attributes"/> 850 <xsl:call-template name="id.attribute"/> 708 851 <xsl:call-template name="anchor"/> 709 852 <xsl:apply-templates/> … … 714 857 <xsl:call-template name="anchor"/> 715 858 <ul> 859 <xsl:call-template name="common.html.attributes"/> 860 <xsl:call-template name="id.attribute"/> 716 861 <xsl:apply-templates/> 717 862 </ul> … … 719 864 720 865 <xsl:template match="step/title"> 721 <p class="title"> 722 <b> 866 <p> 867 <xsl:call-template name="common.html.attributes"/> 868 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> 723 869 <xsl:apply-templates/> 724 </ b>870 </strong> 725 871 </p> 726 872 </xsl:template> … … 734 880 735 881 <div> 736 <xsl:apply-templates select="." mode="class.attribute"/> 882 <xsl:call-template name="common.html.attributes"/> 883 <xsl:call-template name="id.attribute"/> 737 884 <xsl:call-template name="anchor"/> 738 885 … … 755 902 756 903 <xsl:template match="segmentedlist/title"> 757 <div class="title"> 758 <strong><span class="title"><xsl:apply-templates/></span></strong> 904 <div> 905 <xsl:call-template name="common.html.attributes"/> 906 <strong> 907 <span> 908 <xsl:call-template name="generate.class.attribute"/> 909 <xsl:apply-templates/> 910 </span> 911 </strong> 759 912 </div> 760 913 </xsl:template> … … 768 921 769 922 <xsl:template match="seglistitem"> 770 <div class="seglistitem"> 923 <div> 924 <xsl:call-template name="common.html.attributes"/> 925 <xsl:call-template name="id.attribute"/> 771 926 <xsl:call-template name="anchor"/> 772 927 <xsl:apply-templates/> … … 785 940 --> 786 941 787 <div class="seg"> 942 <div> 943 <xsl:call-template name="common.html.attributes"/> 944 <xsl:call-template name="id.attribute"/> 788 945 <strong> 789 946 <span class="segtitle"> … … 807 964 <xsl:apply-templates select="title"/> 808 965 809 <table border=" 0">966 <table border="{$table.border.off}"> 810 967 <xsl:if test="$list-width != ''"> 811 968 <xsl:attribute name="width"> … … 813 970 </xsl:attribute> 814 971 </xsl:if> 815 <xsl:if test="$table-summary != '' ">972 <xsl:if test="$table-summary != '' and $div.element != 'section'"> 816 973 <xsl:attribute name="summary"> 817 974 <xsl:value-of select="$table-summary"/> … … 842 999 </xsl:variable> 843 1000 844 <tr class="seglistitem"> 1001 <tr> 1002 <xsl:call-template name="common.html.attributes"/> 1003 <xsl:call-template name="id.attribute"/> 845 1004 <xsl:call-template name="tr.attributes"> 846 1005 <xsl:with-param name="rownum" select="$seglinum + 1"/> … … 851 1010 852 1011 <xsl:template match="seg" mode="seglist-table"> 853 <td class="seg"><xsl:apply-templates/></td> 1012 <td> 1013 <xsl:call-template name="common.html.attributes"/> 1014 <xsl:call-template name="id.attribute"/> 1015 <xsl:apply-templates/> 1016 </td> 854 1017 </xsl:template> 855 1018 856 1019 <xsl:template match="seg[1]" mode="seglist-table"> 857 <td class="seg"> 1020 <td> 1021 <xsl:call-template name="common.html.attributes"/> 1022 <xsl:call-template name="id.attribute"/> 858 1023 <xsl:call-template name="anchor"> 859 1024 <xsl:with-param name="node" select="ancestor::seglistitem"/> … … 867 1032 <xsl:template match="calloutlist"> 868 1033 <div> 869 <xsl:apply-templates select="." mode="class.attribute"/> 1034 <xsl:call-template name="common.html.attributes"/> 1035 <xsl:call-template name="id.attribute"/> 870 1036 <xsl:call-template name="anchor"/> 871 1037 <xsl:if test="title|info/title"> … … 874 1040 875 1041 <!-- Preserve order of PIs and comments --> 876 <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::callout)] |processing-instruction()[not(preceding-sibling::callout)]"/>1042 <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::callout)] |processing-instruction()[not(preceding-sibling::callout)]"/> 877 1043 878 1044 <xsl:choose> 879 1045 <xsl:when test="$callout.list.table != 0"> 880 <table border="0" summary="Callout list"> 881 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/> 882 </table> 883 </xsl:when> 884 <xsl:otherwise> 885 <dl compact="compact"> 886 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/> 887 </dl> 1046 <table border="{$table.border.off}"> 1047 <xsl:if test="$div.element != 'section'"> 1048 <xsl:attribute name="summary">Callout list</xsl:attribute> 1049 </xsl:if> 1050 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/> 1051 </table> 1052 </xsl:when> 1053 <xsl:otherwise> 1054 <dl> 1055 <xsl:apply-templates select="." mode="class.attribute"/> 1056 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/> 1057 </dl> 888 1058 </xsl:otherwise> 889 1059 </xsl:choose> … … 904 1074 </xsl:call-template> 905 1075 906 <td width="5%" valign="top" align="left"> 1076 <td width="5%" valign="top" align="{$direction.align.start}"> 1077 <xsl:call-template name="id.attribute"/> 907 1078 <p> 908 1079 <xsl:call-template name="anchor"/> … … 912 1083 </p> 913 1084 </td> 914 <td valign="top" align=" left">1085 <td valign="top" align="{$direction.align.start}"> 915 1086 <xsl:apply-templates/> 916 1087 </td> … … 919 1090 <xsl:otherwise> 920 1091 <dt> 1092 <xsl:call-template name="id.attribute"/> 921 1093 <xsl:call-template name="anchor"/> 922 1094 <xsl:call-template name="callout.arearefs"> … … 940 1112 <xsl:otherwise> 941 1113 <p> 1114 <xsl:call-template name="id.attribute"/> 942 1115 <xsl:if test="@role and $para.propagates.style != 0"> 943 <xsl:apply-templates select="." mode="class.attribute"> 944 <xsl:with-param name="class" select="@role"/> 945 </xsl:apply-templates> 1116 <xsl:choose> 1117 <xsl:when test="@role and $para.propagates.style != 0"> 1118 <xsl:call-template name="common.html.attributes"> 1119 <xsl:with-param name="class" select="@role"/> 1120 </xsl:call-template> 1121 </xsl:when> 1122 <xsl:otherwise> 1123 <xsl:call-template name="common.html.attributes"/> 1124 </xsl:otherwise> 1125 </xsl:choose> 946 1126 </xsl:if> 947 1127 -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/maketoc.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: maketoc.xsl 6910 2007-06-28 23:23:30Z xmldoc $ 8 8 ******************************************************************** 9 9 -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/onechunk.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: onechunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $ 8 8 ******************************************************************** 9 9 … … 16 16 <!-- ==================================================================== --> 17 17 18 <xsl:import href=" profile-chunk.xsl"/>18 <xsl:import href="chunk.xsl"/> 19 19 20 20 <!-- Ok, using the onechunk parameter makes this all work again. --> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/param.xsl
rf2a5108 rb1a51ac1 6 6 7 7 <!-- ******************************************************************** 8 $Id $8 $Id: param.xweb 9658 2012-10-29 22:28:34Z bobstayton $ 9 9 ******************************************************************** 10 10 … … 15 15 ******************************************************************** --> 16 16 17 <xsl:param name="abstract.notitle.enabled" select="0"/> 18 <xsl:param name="activate.external.olinks" select="1"/> 17 19 <xsl:param name="admon.graphics.extension">.png</xsl:param> 18 20 <xsl:param name="admon.graphics" select="0"/> 19 21 <xsl:param name="admon.graphics.path">images/</xsl:param> 20 22 <xsl:param name="admon.style"> 21 <xsl: text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>23 <xsl:value-of select="concat('margin-', $direction.align.start, ': 0.5in; margin-', $direction.align.end, ': 0.5in;')"/> 22 24 </xsl:param> 23 25 <xsl:param name="admon.textlabel" select="1"/> … … 66 68 } 67 69 </xsl:param> 70 <xsl:param name="annotation.graphic.close"> 71 http://docbook.sourceforge.net/release/images/annot-close.png</xsl:param> 72 <xsl:param name="annotation.graphic.open">http://docbook.sourceforge.net/release/images/annot-open.png</xsl:param> 68 73 69 74 <xsl:param name="annotation.js"> 70 75 <xsl:text>http://docbook.sourceforge.net/release/script/AnchorPosition.js http://docbook.sourceforge.net/release/script/PopupWindow.js</xsl:text></xsl:param> 71 76 72 <xsl:param name="annotation.graphic.open">http://docbook.sourceforge.net/release/images/annot-open.png</xsl:param>73 <xsl:param name="annotation.graphic.close">74 http://docbook.sourceforge.net/release/images/annot-close.png</xsl:param>75 77 <xsl:param name="annotation.support" select="0"/> 76 78 <xsl:param name="appendix.autolabel">A</xsl:param> 77 79 <xsl:param name="author.othername.in.middle" select="1"/> 80 <xsl:param name="autotoc.label.in.hyperlink" select="1"/> 78 81 <xsl:param name="autotoc.label.separator">. </xsl:param> 79 <xsl:param name="autotoc.label.in.hyperlink" select="1"/>80 82 <xsl:param name="base.dir"/> 81 83 <xsl:param name="biblioentry.item.separator">. </xsl:param> … … 103 105 <xsl:param name="chunk.quietly" select="0"/> 104 106 <xsl:param name="chunk.section.depth" select="1"/> 107 <xsl:param name="chunk.separate.lots" select="0"/> 105 108 <xsl:param name="chunk.toc"/> 106 109 <xsl:param name="chunk.tocs.and.lots" select="0"/> 107 110 <xsl:param name="chunk.tocs.and.lots.has.title" select="1"/> 108 <xsl:param name="chunk .separate.lots" select="0"/>111 <xsl:param name="chunked.filename.prefix"/> 109 112 <xsl:param name="citerefentry.link" select="0"/> 110 113 <xsl:param name="collect.xref.targets">no</xsl:param> … … 113 116 <xsl:param name="css.decoration" select="1"/> 114 117 <xsl:param name="current.docid"/> 118 <xsl:param name="custom.css.source"/> 115 119 <xsl:param name="default.float.class"> 116 120 <xsl:choose> … … 120 124 </xsl:param> 121 125 <xsl:param name="default.image.width"/> 126 <xsl:param name="default.table.frame">all</xsl:param> 122 127 <xsl:param name="default.table.width"/> 123 <xsl:param name="default.table.frame">all</xsl:param> 124 <xsl:param name="draft.mode">maybe</xsl:param> 125 <xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param> 128 <xsl:param name="docbook.css.link" select="1"/> 129 <xsl:param name="docbook.css.source">docbook.css.xml</xsl:param> 130 <xsl:param name="draft.mode">no</xsl:param> 131 <xsl:param name="draft.watermark.image">images/draft.png</xsl:param> 132 <xsl:param name="ebnf.assignment"> 133 <code>::=</code> 134 </xsl:param> 135 136 <xsl:param name="ebnf.statement.terminator"/> 137 126 138 <xsl:param name="ebnf.table.bgcolor">#F5DCB3</xsl:param> 127 139 <xsl:param name="ebnf.table.border" select="1"/> 128 <xsl:param name="ebnf.assignment">129 <code>::=</code>130 </xsl:param>131 132 <xsl:param name="ebnf.statement.terminator"/>133 134 140 <xsl:param name="eclipse.autolabel" select="0"/> 141 <xsl:param name="eclipse.plugin.id">com.example.help</xsl:param> 135 142 <xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param> 136 <xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>137 143 <xsl:param name="eclipse.plugin.provider">Example provider</xsl:param> 138 144 <xsl:param name="editedby.enabled">1</xsl:param> … … 140 146 <xsl:param name="emphasis.propagates.style" select="1"/> 141 147 <xsl:param name="entry.propagates.style" select="1"/> 148 <xsl:param name="exsl.node.set.available"> 149 <xsl:choose> 150 <xsl:when xmlns:exsl="http://exslt.org/common" exsl:foo="" test="function-available('exsl:node-set') or contains(system-property('xsl:vendor'), 'Apache Software Foundation')">1</xsl:when> 151 <xsl:otherwise>0</xsl:otherwise> 152 </xsl:choose> 153 </xsl:param> 142 154 <xsl:param name="firstterm.only.link" select="0"/> 143 155 <xsl:param name="footer.rule" select="1"/> … … 155 167 <xsl:param name="funcsynopsis.decoration" select="1"/> 156 168 <xsl:param name="funcsynopsis.style">kr</xsl:param> 157 <xsl:param name="funcsynopsis.tabular.threshold">40</xsl:param>158 169 <xsl:param name="function.parens" select="0"/> 170 <xsl:param name="generate.consistent.ids" select="0"/> 171 <xsl:param name="generate.css.header" select="0"/> 159 172 <xsl:param name="generate.id.attributes" select="0"/> 160 173 <xsl:param name="generate.index" select="1"/> 161 174 <xsl:param name="generate.legalnotice.link" select="0"/> 162 <xsl:param name="generate.revhistory.link" select="0"/>163 175 <xsl:param name="generate.manifest" select="0"/> 164 176 <xsl:param name="generate.meta.abstract" select="1"/> 177 <xsl:param name="generate.revhistory.link" select="0"/> 165 178 <xsl:param name="generate.section.toc.level" select="0"/> 166 179 <xsl:param name="generate.toc"> … … 194 207 <xsl:param name="highlight.default.language"/> 195 208 <xsl:param name="highlight.source" select="0"/> 209 <xsl:param name="highlight.xslthl.config"/> 196 210 <xsl:param name="html.append"/> 197 211 <xsl:param name="html.base"/> … … 201 215 <xsl:param name="html.ext">.html</xsl:param> 202 216 <xsl:param name="html.extra.head.links" select="0"/> 217 <xsl:param name="html.head.legalnotice.link.multiple" select="1"/> 203 218 <xsl:param name="html.head.legalnotice.link.types">copyright</xsl:param> 204 <xsl:param name="html.head.legalnotice.link.multiple" select="1"/>205 219 <xsl:param name="html.longdesc" select="1"/> 206 220 <xsl:param name="html.longdesc.link" select="$html.longdesc"/> 221 <xsl:param name="html.script"/> 222 <xsl:param name="html.script.type">text/javascript</xsl:param> 207 223 <xsl:param name="html.stylesheet"/> 208 224 <xsl:param name="html.stylesheet.type">text/css</xsl:param> … … 256 272 <xsl:param name="htmlhelp.use.hhk" select="0"/> 257 273 <xsl:param name="htmlhelp.window.geometry"/> 274 <xsl:param name="id.warnings" select="0"/> 275 <xsl:param name="ignore.image.scaling" select="0"/> 258 276 <xsl:param name="img.src.path"/> 259 <xsl:param name="i d.warnings" select="0"/>277 <xsl:param name="index.links.to.section" select="1"/> 260 278 <xsl:param name="index.method">basic</xsl:param> 279 <xsl:param name="index.number.separator"/> 261 280 <xsl:param name="index.on.role" select="0"/> 262 281 <xsl:param name="index.on.type" select="0"/> 263 <xsl:param name="index.number.separator"/> 282 <xsl:param name="index.prefer.titleabbrev" select="0"/> 283 <xsl:param name="index.range.separator"/> 264 284 <xsl:param name="index.term.separator"/> 265 <xsl:param name="index.range.separator"/>266 <xsl:param name="index.prefer.titleabbrev" select="0"/>267 <xsl:param name="ignore.image.scaling" select="0"/>268 285 <xsl:param name="inherit.keywords" select="1"/> 286 <xsl:param name="insert.olink.page.number">no</xsl:param> 287 <xsl:param name="insert.olink.pdf.frag" select="0"/> 269 288 <xsl:param name="insert.xref.page.number">no</xsl:param> 270 289 <xsl:param name="javahelp.encoding">iso-8859-1</xsl:param> … … 281 300 <xsl:param name="linenumbering.width">3</xsl:param> 282 301 <xsl:param name="link.mailto.url"/> 302 <xsl:param name="make.clean.html" select="0"/> 283 303 <xsl:param name="make.graphic.viewport" select="1"/> 284 304 <xsl:param name="make.single.year.ranges" select="0"/> … … 300 320 <xsl:param name="olink.base.uri"/> 301 321 <xsl:param name="olink.debug" select="0"/> 322 <xsl:param name="olink.doctitle">no</xsl:param> 323 <xsl:param name="olink.lang.fallback.sequence"/> 302 324 <xsl:attribute-set name="olink.properties"> 303 325 <xsl:attribute name="show-destination">replace</xsl:attribute> 304 326 </xsl:attribute-set> 305 <xsl:param name="insert.olink.page.number">no</xsl:param>306 <xsl:param name="insert.olink.pdf.frag" select="0"/>307 <xsl:param name="prefer.internal.olink" select="0"/>308 <xsl:param name="olink.lang.fallback.sequence"/>309 <xsl:param name="olink.doctitle">no</xsl:param>310 <xsl:param name="olink.fragid">fragid=</xsl:param>311 <xsl:param name="olink.outline.ext">.olink</xsl:param>312 <xsl:param name="olink.pubid">pubid</xsl:param>313 <xsl:param name="olink.resolver">/cgi-bin/olink</xsl:param>314 <xsl:param name="olink.sysid">sysid</xsl:param>315 <xsl:param name="abstract.notitle.enabled" select="0"/>316 327 <xsl:param name="othercredit.like.author.enabled">0</xsl:param> 317 328 <xsl:param name="para.propagates.style" select="1"/> … … 321 332 <xsl:param name="points.per.em">10</xsl:param> 322 333 <xsl:param name="preface.autolabel" select="0"/> 334 <xsl:param name="prefer.internal.olink" select="0"/> 323 335 <xsl:param name="preferred.mediaobject.role"/> 324 336 <xsl:param name="process.empty.source.toc" select="0"/> 325 337 <xsl:param name="process.source.toc" select="0"/> 326 338 <xsl:param name="profile.arch"/> 339 <xsl:param name="profile.attribute"/> 327 340 <xsl:param name="profile.audience"/> 328 <xsl:param name="profile.attribute"/>329 341 <xsl:param name="profile.condition"/> 330 342 <xsl:param name="profile.conformance"/> … … 343 355 <xsl:param name="punct.honorific">.</xsl:param> 344 356 <xsl:param name="qanda.defaultlabel">number</xsl:param> 357 <xsl:param name="qanda.in.toc" select="0"/> 345 358 <xsl:param name="qanda.inherit.numeration" select="1"/> 346 <xsl:param name="qanda.in.toc" select="0"/>347 359 <xsl:param name="qanda.nested.in.toc" select="0"/> 348 360 <xsl:param name="qandadiv.autolabel" select="1"/> 361 <xsl:param name="refclass.suppress" select="0"/> 349 362 <xsl:param name="refentry.generate.name" select="1"/> 350 363 <xsl:param name="refentry.generate.title" select="0"/> … … 352 365 <xsl:param name="refentry.xref.manvolnum" select="1"/> 353 366 <xsl:param name="reference.autolabel">I</xsl:param> 354 <xsl:param name="refclass.suppress" select="0"/>355 367 <xsl:param name="root.filename">index</xsl:param> 356 368 <xsl:param name="rootid"/> … … 388 400 <xsl:param name="target.database.document">olinkdb.xml</xsl:param> 389 401 <xsl:param name="targets.filename">target.db</xsl:param> 390 <xsl:param name="textdata.default.encoding"/>391 402 <xsl:param name="tex.math.delims" select="1"/> 392 403 <xsl:param name="tex.math.file">tex-math-equations.tex</xsl:param> 393 404 <xsl:param name="tex.math.in.alt"/> 405 <xsl:param name="textdata.default.encoding"/> 394 406 <xsl:param name="textinsert.extension" select="1"/> 395 407 <xsl:param name="toc.list.type">dl</xsl:param> 408 <xsl:param name="toc.max.depth">8</xsl:param> 396 409 <xsl:param name="toc.section.depth">2</xsl:param> 397 <xsl:param name="toc.max.depth">8</xsl:param>398 410 <xsl:param name="ulink.target">_top</xsl:param> 399 411 <xsl:param name="use.embed.for.svg" select="0"/> … … 405 417 <xsl:param name="use.svg" select="1"/> 406 418 <xsl:param name="variablelist.as.table" select="0"/> 419 <xsl:param name="variablelist.term.break.after">0</xsl:param> 407 420 <xsl:param name="variablelist.term.separator">, </xsl:param> 408 <xsl:param name="variablelist.term.break.after">0</xsl:param> 421 <xsl:param name="webhelp.autolabel">0</xsl:param> 422 <xsl:param name="webhelp.base.dir">docs</xsl:param> 423 <xsl:param name="webhelp.common.dir">../common/</xsl:param> 424 <xsl:param name="webhelp.default.topic">index.html</xsl:param> 425 <xsl:param name="webhelp.include.search.tab">1</xsl:param> 426 <xsl:param name="webhelp.indexer.language">en</xsl:param> 427 <xsl:param name="webhelp.start.filename">index.html</xsl:param> 428 <xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/> 429 <xsl:param name="writing.mode"> 430 <xsl:call-template name="gentext"> 431 <xsl:with-param name="key">writing-mode</xsl:with-param> 432 <xsl:with-param name="lang"> 433 <xsl:call-template name="l10n.language"> 434 <xsl:with-param name="target" select="/*[1]"/> 435 </xsl:call-template> 436 </xsl:with-param> 437 </xsl:call-template> 438 </xsl:param> 439 <xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param> 440 <xsl:param name="xref.label-title.separator">: </xsl:param> 441 <xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param> 409 442 <xsl:param name="xref.with.number.and.title" select="1"/> 410 <xsl:param name="xref.label-title.separator">: </xsl:param>411 <xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>412 <xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>413 443 414 444 </xsl:stylesheet> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/table.xsl
rf2a5108 rb1a51ac1 7 7 8 8 <!-- ******************************************************************** 9 $Id $9 $Id: table.xsl 9297 2012-04-22 03:56:16Z bobstayton $ 10 10 ******************************************************************** 11 11 … … 167 167 <xsl:when test="../title"> 168 168 <xsl:attribute name="summary"> 169 <!-- This screws up on inline markup and footnotes, oh well... --> 169 170 <xsl:value-of select="string(../title)"/> 170 171 </xsl:attribute> … … 293 294 </xsl:attribute> 294 295 </xsl:when> 295 296 297 298 299 296 <xsl:when test="../@frame='none'"> 297 <xsl:attribute name="style"> 298 <xsl:text>border: none;</xsl:text> 299 </xsl:attribute> 300 </xsl:when> 300 301 <xsl:otherwise> 301 302 <xsl:attribute name="style"> … … 398 399 <xsl:apply-templates select="tbody"/> 399 400 400 <xsl:if test=".//footnote ">401 <xsl:if test=".//footnote|../title//footnote"> 401 402 <tbody class="footnotes"> 402 403 <tr> 403 404 <td colspan="{@cols}"> 404 <xsl:apply-templates select=".//footnote " mode="table.footnote.mode"/>405 <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/> 405 406 </td> 406 407 </tr> … … 450 451 </xsl:if> 451 452 452 <xsl:apply-templates select="row[1]"> 453 <xsl:with-param name="spans"> 454 <xsl:call-template name="blank.spans"> 455 <xsl:with-param name="cols" select="../@cols"/> 456 </xsl:call-template> 457 </xsl:with-param> 458 </xsl:apply-templates> 453 <xsl:choose> 454 <!-- recurse on rows only if @morerows is present --> 455 <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows"> 456 <xsl:apply-templates select="row[1]"> 457 <xsl:with-param name="spans"> 458 <xsl:call-template name="blank.spans"> 459 <xsl:with-param name="cols" select="../@cols"/> 460 </xsl:call-template> 461 </xsl:with-param> 462 <xsl:with-param name="browserows" select="'recurse'"/> 463 </xsl:apply-templates> 464 </xsl:when> 465 <xsl:otherwise> 466 <xsl:apply-templates select="row"> 467 <xsl:with-param name="spans"> 468 <xsl:call-template name="blank.spans"> 469 <xsl:with-param name="cols" select="../@cols"/> 470 </xsl:call-template> 471 </xsl:with-param> 472 <xsl:with-param name="browserows" select="'loop'"/> 473 </xsl:apply-templates> 474 </xsl:otherwise> 475 </xsl:choose> 459 476 460 477 </xsl:element> … … 484 501 </xsl:if> 485 502 486 <xsl:apply-templates select="row[1]"> 487 <xsl:with-param name="spans"> 488 <xsl:call-template name="blank.spans"> 489 <xsl:with-param name="cols" select="../@cols"/> 490 </xsl:call-template> 491 </xsl:with-param> 492 </xsl:apply-templates> 503 <xsl:choose> 504 <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows"> 505 <xsl:apply-templates select="row[1]"> 506 <xsl:with-param name="spans"> 507 <xsl:call-template name="blank.spans"> 508 <xsl:with-param name="cols" select="../@cols"/> 509 </xsl:call-template> 510 </xsl:with-param> 511 <xsl:with-param name="browserows" select="'recurse'"/> 512 </xsl:apply-templates> 513 </xsl:when> 514 <xsl:otherwise> 515 <xsl:apply-templates select="row"> 516 <xsl:with-param name="spans"> 517 <xsl:call-template name="blank.spans"> 518 <xsl:with-param name="cols" select="../@cols"/> 519 </xsl:call-template> 520 </xsl:with-param> 521 <xsl:with-param name="browserows" select="'loop'"/> 522 </xsl:apply-templates> 523 </xsl:otherwise> 524 </xsl:choose> 493 525 494 526 </tbody> … … 497 529 <xsl:template match="row"> 498 530 <xsl:param name="spans"/> 531 <xsl:param name="browserows"/> 499 532 500 533 <xsl:choose> 501 534 <xsl:when test="contains($spans, '0')"> 502 535 <xsl:call-template name="normal-row"> 503 <xsl:with-param name="spans" select="$spans"/> 536 <xsl:with-param name="spans" select="$spans"/> 537 <xsl:with-param name="browserows" select="$browserows"/> 504 538 </xsl:call-template> 505 539 </xsl:when> … … 507 541 <!-- 508 542 <xsl:message> 509 510 511 512 513 514 543 <xsl:text>Ignoring row: </xsl:text> 544 <xsl:value-of select="$spans"/> 545 <xsl:text> = </xsl:text> 546 <xsl:call-template name="consume-row"> 547 <xsl:with-param name="spans" select="$spans"/> 548 </xsl:call-template> 515 549 </xsl:message> 516 550 --> 517 551 518 552 <xsl:if test="normalize-space(.//text()) != ''"> 519 553 <xsl:message>Warning: overlapped row contains content!</xsl:message> 520 554 </xsl:if> 521 555 522 556 <tr><xsl:comment> This row intentionally left blank </xsl:comment></tr> 523 557 524 <xsl:apply-templates select="following-sibling::row[1]"> 525 <xsl:with-param name="spans"> 526 <xsl:call-template name="consume-row"> 527 <xsl:with-param name="spans" select="$spans"/> 528 </xsl:call-template> 529 </xsl:with-param> 530 </xsl:apply-templates> 558 <xsl:if test="$browserows = 'recurse'"> 559 <xsl:apply-templates select="following-sibling::row[1]"> 560 <xsl:with-param name="spans"> 561 <xsl:call-template name="consume-row"> 562 <xsl:with-param name="spans" select="$spans"/> 563 </xsl:call-template> 564 </xsl:with-param> 565 <xsl:with-param name="browserows" select="$browserows"/> 566 </xsl:apply-templates> 567 </xsl:if> 531 568 </xsl:otherwise> 532 569 </xsl:choose> … … 535 572 <xsl:template name="normal-row"> 536 573 <xsl:param name="spans"/> 574 <xsl:param name="browserows"/> 537 575 538 576 <xsl:variable name="row-height"> … … 555 593 556 594 <tr> 595 <xsl:call-template name="id.attribute"/> 557 596 <xsl:call-template name="tr.attributes"> 558 597 <xsl:with-param name="rownum"> … … 615 654 </tr> 616 655 617 <xsl:if test="following-sibling::row"> 618 <xsl:variable name="nextspans"> 619 <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span"> 620 <xsl:with-param name="spans" select="$spans"/> 656 <xsl:if test="$browserows = 'recurse'"> 657 <xsl:if test="following-sibling::row"> 658 <xsl:variable name="nextspans"> 659 <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span"> 660 <xsl:with-param name="spans" select="$spans"/> 661 </xsl:apply-templates> 662 </xsl:variable> 663 664 <xsl:apply-templates select="following-sibling::row[1]"> 665 <xsl:with-param name="spans" select="$nextspans"/> 666 <xsl:with-param name="browserows" select="$browserows"/> 621 667 </xsl:apply-templates> 622 </xsl:variable> 623 624 <xsl:apply-templates select="following-sibling::row[1]"> 625 <xsl:with-param name="spans" select="$nextspans"/> 626 </xsl:apply-templates> 668 </xsl:if> 627 669 </xsl:if> 628 670 </xsl:template> 629 671 630 672 <xsl:template match="entry|entrytbl" name="entry"> 631 <xsl:param name="col" select="1"/> 673 <xsl:param name="col"> 674 <xsl:choose> 675 <xsl:when test="@revisionflag"> 676 <xsl:number from="row"/> 677 </xsl:when> 678 <xsl:otherwise>1</xsl:otherwise> 679 </xsl:choose> 680 </xsl:param> 681 632 682 <xsl:param name="spans"/> 633 683 … … 636 686 <xsl:when test="ancestor::thead">th</xsl:when> 637 687 <xsl:when test="ancestor::tfoot">th</xsl:when> 688 <xsl:when test="ancestor::tbody and (ancestor::table[@rowheader = 'firstcol'] or ancestor::informaltable[@rowheader = 'firstcol']) and ancestor-or-self::entry[1][count(preceding-sibling::entry) = 0]"> 689 <xsl:text>th</xsl:text> 690 </xsl:when> 638 691 <xsl:otherwise>td</xsl:otherwise> 639 692 </xsl:choose> … … 676 729 <xsl:choose> 677 730 <!-- If this is the last row, rowsep never applies. --> 678 <xsl:when test="ancestor::entrytbl and not (ancestor-or-self::row[1]/following-sibling::row) ">731 <xsl:when test="ancestor::entrytbl and not (ancestor-or-self::row[1]/following-sibling::row) and not (ancestor::thead)"> 679 732 <xsl:value-of select="0"/> 680 733 </xsl:when> … … 765 818 766 819 <xsl:element name="{$cellgi}" namespace="http://www.w3.org/1999/xhtml"> 820 <xsl:call-template name="id.attribute"/> 767 821 <xsl:if test="$bgcolor != ''"> 768 822 <xsl:attribute name="bgcolor"> … … 771 825 </xsl:if> 772 826 773 <xsl:if test="$entry.propagates.style != 0 and @role"> 774 <xsl:apply-templates select="." mode="class.attribute"> 775 <xsl:with-param name="class" select="@role"/> 776 </xsl:apply-templates> 777 </xsl:if> 827 <xsl:call-template name="locale.html.attributes"/> 828 <xsl:choose> 829 <xsl:when test="$entry.propagates.style != 0 and @role"> 830 <xsl:apply-templates select="." mode="class.attribute"> 831 <xsl:with-param name="class" select="@role"/> 832 </xsl:apply-templates> 833 </xsl:when> 834 <xsl:otherwise> 835 <xsl:apply-templates select="." mode="class.attribute"> 836 <xsl:with-param name="class" select="''"/> 837 </xsl:apply-templates> 838 </xsl:otherwise> 839 </xsl:choose> 778 840 779 841 <xsl:if test="$show.revisionflag and @revisionflag"> … … 910 972 <xsl:text>0:</xsl:text> 911 973 <xsl:call-template name="sentry"> 912 <xsl:with-param name="col" select="$col +$entry.colspan"/>913 <xsl:with-param name="spans" select=" $following.spans"/>974 <xsl:with-param name="col" select="$col + 1"/> 975 <xsl:with-param name="spans" select="substring-after($spans,':')"/> 914 976 </xsl:call-template> 915 977 </xsl:when> … … 989 1051 <xsl:when test="$colspec.colnum=$countcol"> 990 1052 <col> 991 <xsl:if test="$colspec/@colwidth and $use.extensions != 0 and $tablecolumns.extension != 0"> 992 <xsl:attribute name="width"> 993 <xsl:choose> 994 <xsl:when test="normalize-space($colspec/@colwidth) = '*'"> 995 <xsl:value-of select="'1*'"/> 996 </xsl:when> 997 <xsl:otherwise> 998 <xsl:value-of select="$colspec/@colwidth"/> 999 </xsl:otherwise> 1000 </xsl:choose> 1001 </xsl:attribute> 1002 </xsl:if> 1053 <xsl:choose> 1054 <xsl:when test="$colspec/@colwidth and $use.extensions != 0 and $tablecolumns.extension != 0"> 1055 <xsl:attribute name="width"> 1056 <xsl:choose> 1057 <xsl:when test="normalize-space($colspec/@colwidth) = '*'"> 1058 <xsl:value-of select="'1*'"/> 1059 </xsl:when> 1060 <xsl:otherwise> 1061 <xsl:value-of select="$colspec/@colwidth"/> 1062 </xsl:otherwise> 1063 </xsl:choose> 1064 </xsl:attribute> 1065 </xsl:when> 1066 <!-- pass through to HTML if no * in colspecs --> 1067 <xsl:when test="$colspec/@colwidth and not($colspec/parent::*/colspec/@colwidth[contains(.,'*')])"> 1068 <xsl:attribute name="width"> 1069 <xsl:choose> 1070 <xsl:when test="normalize-space($colspec/@colwidth) = '*'"> 1071 <xsl:value-of select="'1*'"/> 1072 </xsl:when> 1073 <xsl:otherwise> 1074 <xsl:value-of select="$colspec/@colwidth"/> 1075 </xsl:otherwise> 1076 </xsl:choose> 1077 </xsl:attribute> 1078 </xsl:when> 1079 </xsl:choose> 1003 1080 1004 1081 <xsl:choose> … … 1021 1098 </xsl:attribute> 1022 1099 </xsl:if> 1100 1023 1101 <xsl:if test="$colspec/@charoff"> 1024 1102 <xsl:attribute name="charoff"> 1025 1103 <xsl:value-of select="$colspec/@charoff"/> 1104 </xsl:attribute> 1105 </xsl:if> 1106 1107 <xsl:if test="$colspec/@colname"> 1108 <xsl:attribute name="class"> 1109 <xsl:value-of select="$colspec/@colname"/> 1026 1110 </xsl:attribute> 1027 1111 </xsl:if> -
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/xref.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: xref.xsl 9713 2013-01-22 22:08:30Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 20 20 21 21 <xsl:template match="anchor"> 22 <xsl:call-template name="anchor"/> 22 <xsl:choose> 23 <xsl:when test="$generate.id.attributes = 0"> 24 <xsl:call-template name="anchor"/> 25 </xsl:when> 26 <xsl:otherwise> 27 <span> 28 <xsl:call-template name="id.attribute"/> 29 </span> 30 </xsl:otherwise> 31 </xsl:choose> 23 32 </xsl:template> 24 33 … … 152 161 </xsl:message> 153 162 <a href="{$href}"> 154 <xsl:apply-templates select="." mode="class.attribute"/> 163 <xsl:apply-templates select="." mode="common.html.attributes"/> 164 <xsl:call-template name="id.attribute"/> 155 165 <xsl:text>???</xsl:text> 156 166 </a> … … 158 168 <xsl:otherwise> 159 169 <a href="{$href}"> 160 <xsl:apply-templates select="." mode="class.attribute"/> 170 <xsl:apply-templates select="." mode="common.html.attributes"/> 171 <xsl:call-template name="id.attribute"/> 161 172 <xsl:apply-templates select="$etarget" mode="endterm"/> 162 173 </a> … … 167 178 <xsl:when test="$target/@xreflabel"> 168 179 <a> 169 <xsl:apply-templates select="." mode="c lass.attribute"/>180 <xsl:apply-templates select="." mode="common.html.attributes"/> 170 181 <xsl:attribute name="href"> 171 182 <xsl:call-template name="href.target"> … … 192 203 <a href="{$href}"> 193 204 <xsl:apply-templates select="." mode="class.attribute"/> 194 <xsl:if test="$target/title or $target/ */title">205 <xsl:if test="$target/title or $target/info/title"> 195 206 <xsl:attribute name="title"> 196 207 <xsl:apply-templates select="$target" mode="xref-title"/> … … 224 235 <!-- Process the children of the endterm element --> 225 236 <xsl:variable name="endterm"> 226 <xsl:apply-templates select="child::node()" />237 <xsl:apply-templates select="child::node()" mode="no.anchor.mode"/> 227 238 </xsl:variable> 228 239 229 240 <xsl:choose> 230 <xsl:when test=" function-available('exsl:node-set')">241 <xsl:when test="$exsl.node.set.available != 0"> 231 242 <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/> 232 243 </xsl:when> … … 328 339 </xsl:template> 329 340 330 <xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset |biblioset|blockquote|calloutlist|caution|colophon |constraintdef|formalpara|glossdiv|important|indexdiv |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain |msgrel|msgset|msgsub|note|orderedlist|partintro |productionset|qandadiv|refsynopsisdiv|s egmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to">341 <xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset |biblioset|blockquote|calloutlist|caution|colophon |constraintdef|formalpara|glossdiv|important|indexdiv |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain |msgrel|msgset|msgsub|note|orderedlist|partintro |productionset|qandadiv|refsynopsisdiv|screenshot|segmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to"> 331 342 <xsl:param name="referrer"/> 332 343 <xsl:param name="xrefstyle"/> … … 403 414 </xsl:template> 404 415 405 <xsl:template match="dedication| preface|chapter|appendix|article" mode="xref-to">416 <xsl:template match="dedication|acknowledgements|preface|chapter|appendix|article" mode="xref-to"> 406 417 <xsl:param name="referrer"/> 407 418 <xsl:param name="xrefstyle"/> … … 455 466 </xsl:when> 456 467 <xsl:when test="local-name($entry/*[1]) = 'abbrev'"> 457 <xsl:apply-templates select="$entry/*[1]" />468 <xsl:apply-templates select="$entry/*[1]" mode="no.anchor.mode"/> 458 469 </xsl:when> 459 470 <xsl:otherwise> … … 479 490 </xsl:when> 480 491 <xsl:when test="local-name(*[1]) = 'abbrev'"> 481 <xsl:apply-templates select="*[1]" />492 <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/> 482 493 </xsl:when> 483 494 <xsl:otherwise> … … 510 521 <xsl:choose> 511 522 <xsl:when test="acronym|abbrev"> 512 <xsl:apply-templates select="(acronym|abbrev)[1]" />523 <xsl:apply-templates select="(acronym|abbrev)[1]" mode="no.anchor.mode"/> 513 524 </xsl:when> 514 525 <xsl:otherwise> … … 531 542 </xsl:template> 532 543 533 <xsl:template match="glossterm " mode="xref-to">534 <xsl:apply-templates />544 <xsl:template match="glossterm|firstterm" mode="xref-to"> 545 <xsl:apply-templates mode="no.anchor.mode"/> 535 546 </xsl:template> 536 547 … … 575 586 </xsl:template> 576 587 588 <xsl:template match="topic" mode="xref-to"> 589 <xsl:param name="referrer"/> 590 <xsl:param name="xrefstyle"/> 591 <xsl:param name="verbose" select="1"/> 592 593 <xsl:apply-templates select="." mode="object.xref.markup"> 594 <xsl:with-param name="purpose" select="'xref'"/> 595 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 596 <xsl:with-param name="referrer" select="$referrer"/> 597 <xsl:with-param name="verbose" select="$verbose"/> 598 </xsl:apply-templates> 599 </xsl:template> 600 577 601 <xsl:template match="bridgehead" mode="xref-to"> 578 602 <xsl:param name="referrer"/> … … 602 626 </xsl:template> 603 627 604 <xsl:template match="qandadiv" mode="xref-to">605 <xsl:param name="referrer"/>606 <xsl:param name="xrefstyle"/>607 <xsl:param name="verbose" select="1"/>608 609 <xsl:apply-templates select="." mode="object.xref.markup">610 <xsl:with-param name="purpose" select="'xref'"/>611 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>612 <xsl:with-param name="referrer" select="$referrer"/>613 <xsl:with-param name="verbose" select="$verbose"/>614 </xsl:apply-templates>615 </xsl:template>616 617 628 <xsl:template match="qandaentry" mode="xref-to"> 618 629 <xsl:param name="referrer"/> … … 620 631 <xsl:param name="verbose" select="1"/> 621 632 622 <xsl:apply-templates select="question[1]" mode="object.xref.markup"> 623 <xsl:with-param name="purpose" select="'xref'"/> 633 <xsl:apply-templates select="question[1]" mode="xref-to"> 624 634 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 625 635 <xsl:with-param name="referrer" select="$referrer"/> … … 633 643 <xsl:param name="verbose" select="1"/> 634 644 635 <xsl:apply-templates select="." mode="object.xref.markup"> 636 <xsl:with-param name="purpose" select="'xref'"/> 637 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 638 <xsl:with-param name="referrer" select="$referrer"/> 639 <xsl:with-param name="verbose" select="$verbose"/> 640 </xsl:apply-templates> 645 <xsl:choose> 646 <xsl:when test="string-length(label) != 0"> 647 <xsl:apply-templates select="." mode="label.markup"/> 648 </xsl:when> 649 <xsl:otherwise> 650 <xsl:apply-templates select="." mode="object.xref.markup"> 651 <xsl:with-param name="purpose" select="'xref'"/> 652 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 653 <xsl:with-param name="referrer" select="$referrer"/> 654 <xsl:with-param name="verbose" select="$verbose"/> 655 </xsl:apply-templates> 656 </xsl:otherwise> 657 </xsl:choose> 641 658 </xsl:template> 642 659 … … 660 677 <xsl:choose> 661 678 <xsl:when test="refmeta/refentrytitle"> 662 <xsl:apply-templates select="refmeta/refentrytitle" />663 </xsl:when> 664 <xsl:otherwise> 665 <xsl:apply-templates select="refnamediv/refname[1]" />666 </xsl:otherwise> 667 </xsl:choose> 668 <xsl:apply-templates select="refmeta/manvolnum" />679 <xsl:apply-templates select="refmeta/refentrytitle" mode="no.anchor.mode"/> 680 </xsl:when> 681 <xsl:otherwise> 682 <xsl:apply-templates select="refnamediv/refname[1]" mode="no.anchor.mode"/> 683 </xsl:otherwise> 684 </xsl:choose> 685 <xsl:apply-templates select="refmeta/manvolnum" mode="no.anchor.mode"/> 669 686 </xsl:template> 670 687 … … 712 729 </xsl:template> 713 730 731 <xsl:template match="primary|secondary|tertiary" mode="xref-to"> 732 <xsl:value-of select="."/> 733 </xsl:template> 734 735 <xsl:template match="indexterm" mode="xref-to"> 736 <xsl:value-of select="primary"/> 737 </xsl:template> 738 714 739 <xsl:template match="varlistentry/term" mode="xref-to"> 715 740 <xsl:param name="referrer"/> 716 741 <xsl:param name="xrefstyle"/> 717 742 718 <!-- to avoid the comma that will be generated if there are several terms --> 719 <xsl:apply-templates/> 743 <xsl:apply-templates mode="no.anchor.mode"/> 720 744 </xsl:template> 721 745 … … 751 775 </xsl:template> 752 776 753 <xsl:template match="para" mode="xref-to"> 754 <xsl:param name="referrer"/> 755 <xsl:param name="xrefstyle"/> 756 <xsl:param name="verbose" select="1"/> 757 758 <xsl:variable name="context" select="(ancestor::simplesect |ancestor::section |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 |ancestor::refsection |ancestor::refsect1 |ancestor::refsect2 |ancestor::refsect3 |ancestor::chapter |ancestor::appendix |ancestor::preface |ancestor::partintro |ancestor::dedication |ancestor::colophon |ancestor::bibliography |ancestor::index |ancestor::glossary |ancestor::glossentry |ancestor::listitem |ancestor::varlistentry)[last()]"/> 759 760 <xsl:apply-templates select="$context" mode="xref-to"> 761 <xsl:with-param name="purpose" select="'xref'"/> 762 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 763 <xsl:with-param name="referrer" select="$referrer"/> 764 <xsl:with-param name="verbose" select="$verbose"/> 765 </xsl:apply-templates> 777 <!-- These are elements for which no link text exists, so an xref to one 778 uses the xrefstyle attribute if specified, or if not it falls back 779 to the container element's link text --> 780 <xsl:template match="para|phrase|simpara|anchor|quote" mode="xref-to"> 781 <xsl:param name="referrer"/> 782 <xsl:param name="xrefstyle"/> 783 <xsl:param name="verbose" select="1"/> 784 785 <xsl:variable name="context" select="(ancestor::simplesect |ancestor::section |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 |ancestor::topic |ancestor::refsection |ancestor::refsect1 |ancestor::refsect2 |ancestor::refsect3 |ancestor::chapter |ancestor::appendix |ancestor::preface |ancestor::partintro |ancestor::dedication |ancestor::acknowledgements |ancestor::colophon |ancestor::bibliography |ancestor::index |ancestor::glossary |ancestor::glossentry |ancestor::listitem |ancestor::varlistentry)[last()]"/> 786 787 <xsl:choose> 788 <xsl:when test="$xrefstyle != ''"> 789 <xsl:apply-templates select="." mode="object.xref.markup"> 790 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 791 <xsl:with-param name="referrer" select="$referrer"/> 792 <xsl:with-param name="verbose" select="$verbose"/> 793 </xsl:apply-templates> 794 </xsl:when> 795 <xsl:otherwise> 796 <xsl:apply-templates select="$context" mode="xref-to"> 797 <xsl:with-param name="purpose" select="'xref'"/> 798 <xsl:with-param name="xrefstyle" select="$xrefstyle"/> 799 <xsl:with-param name="referrer" select="$referrer"/> 800 <xsl:with-param name="verbose" select="$verbose"/> 801 </xsl:apply-templates> 802 </xsl:otherwise> 803 </xsl:choose> 766 804 </xsl:template> 767 805 … … 814 852 <xsl:choose> 815 853 <xsl:when test="local-name(*[1]) = 'abbrev'"> 816 <xsl:apply-templates select="*[1]" />854 <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/> 817 855 </xsl:when> 818 856 <xsl:otherwise> … … 862 900 <xsl:when test="count(child::node()) > 0"> 863 901 <!-- If it has content, use it --> 864 <xsl:apply-templates />902 <xsl:apply-templates mode="no.anchor.mode"/> 865 903 </xsl:when> 866 904 <!-- else look for an endterm --> … … 911 949 <xsl:variable name="link"> 912 950 <a> 913 <xsl:apply-templates select="." mode="c lass.attribute"/>951 <xsl:apply-templates select="." mode="common.html.attributes"/> 914 952 <xsl:if test="@id or @xml:id"> 915 <xsl:attribute name="id"> 916 <xsl:value-of select="(@id|@xml:id)[1]"/> 917 </xsl:attribute> 953 <xsl:choose> 954 <xsl:when test="$generate.id.attributes = 0"> 955 <xsl:attribute name="id"> 956 <xsl:value-of select="(@id|@xml:id)[1]"/> 957 </xsl:attribute> 958 </xsl:when> 959 <xsl:otherwise> 960 <xsl:attribute name="id"> 961 <xsl:value-of select="(@id|@xml:id)[1]"/> 962 </xsl:attribute> 963 </xsl:otherwise> 964 </xsl:choose> 918 965 </xsl:if> 919 966 <xsl:attribute name="href"><xsl:value-of select="$url"/></xsl:attribute> … … 928 975 </xsl:when> 929 976 <xsl:otherwise> 930 <xsl:apply-templates />977 <xsl:apply-templates mode="no.anchor.mode"/> 931 978 </xsl:otherwise> 932 979 </xsl:choose> … … 949 996 950 997 <xsl:call-template name="anchor"/> 951 952 <xsl:variable name="localinfo" select="@localinfo"/>953 998 954 999 <xsl:choose> … … 1033 1078 <xsl:variable name="hottext"> 1034 1079 <xsl:choose> 1035 <xsl:when test=" $content">1080 <xsl:when test="string-length($content) != 0"> 1036 1081 <xsl:copy-of select="$content"/> 1037 1082 </xsl:when> … … 1065 1110 <xsl:when test="$href != ''"> 1066 1111 <a href="{$href}"> 1067 <xsl:apply-templates select="." mode="class.attribute"/> 1112 <xsl:apply-templates select="." mode="common.html.attributes"/> 1113 <xsl:call-template name="id.attribute"/> 1068 1114 <xsl:copy-of select="$hottext"/> 1069 1115 </a> … … 1072 1118 </xsl:when> 1073 1119 <xsl:otherwise> 1074 <span class="olink"><xsl:copy-of select="$hottext"/></span> 1120 <span class="olink"> 1121 <xsl:call-template name="id.attribute"/> 1122 <xsl:copy-of select="$hottext"/> 1123 </span> 1075 1124 <xsl:copy-of select="$olink.page.citation"/> 1076 1125 <xsl:copy-of select="$olink.docname.citation"/> … … 1080 1129 </xsl:when> 1081 1130 1082 <!-- Or use old olink mechanism --> 1083 <xsl:otherwise> 1084 <xsl:variable name="href"> 1085 <xsl:choose> 1086 <xsl:when test="@linkmode"> 1087 <!-- use the linkmode to get the base URI, use localinfo as fragid --> 1088 <xsl:variable name="modespec" select="key('id',@linkmode)"/> 1089 <xsl:if test="count($modespec) != 1 or local-name($modespec) != 'modespec'"> 1090 <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message> 1091 </xsl:if> 1092 <xsl:value-of select="$modespec"/> 1093 <xsl:if test="@localinfo"> 1094 <xsl:text>#</xsl:text> 1095 <xsl:value-of select="@localinfo"/> 1096 </xsl:if> 1097 </xsl:when> 1098 <xsl:when test="@type = 'href'"> 1099 <xsl:call-template name="olink.outline"> 1100 <xsl:with-param name="outline.base.uri" select="unparsed-entity-uri(@targetdocent)"/> 1101 <xsl:with-param name="localinfo" select="@localinfo"/> 1102 <xsl:with-param name="return" select="'href'"/> 1103 </xsl:call-template> 1104 </xsl:when> 1105 <xsl:otherwise> 1106 <xsl:value-of select="$olink.resolver"/> 1107 <xsl:text>?</xsl:text> 1108 <xsl:value-of select="$olink.sysid"/> 1109 <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/> 1110 <!-- XSL gives no access to the public identifier (grumble...) --> 1111 <xsl:if test="@localinfo"> 1112 <xsl:text>&</xsl:text> 1113 <xsl:value-of select="$olink.fragid"/> 1114 <xsl:value-of select="@localinfo"/> 1115 </xsl:if> 1116 </xsl:otherwise> 1117 </xsl:choose> 1118 </xsl:variable> 1119 1131 <xsl:otherwise> 1120 1132 <xsl:choose> 1121 <xsl:when test="$href != ''"> 1122 <a href="{$href}"> 1123 <xsl:apply-templates select="." mode="class.attribute"/> 1124 <xsl:call-template name="olink.hottext"/> 1125 </a> 1133 <xsl:when test="@linkmode or @targetdocent or @localinfo"> 1134 <!-- old olink mechanism --> 1135 <xsl:message> 1136 <xsl:text>ERROR: olink using obsolete attributes </xsl:text> 1137 <xsl:text>@linkmode, @targetdocent, @localinfo are </xsl:text> 1138 <xsl:text>not supported.</xsl:text> 1139 </xsl:message> 1126 1140 </xsl:when> 1127 1141 <xsl:otherwise> 1128 <xsl:call-template name="olink.hottext"/> 1142 <xsl:message> 1143 <xsl:text>ERROR: olink is missing linking attributes.</xsl:text> 1144 </xsl:message> 1129 1145 </xsl:otherwise> 1130 1146 </xsl:choose> … … 1135 1151 <xsl:template match="*" mode="pagenumber.markup"> 1136 1152 <!-- no-op in HTML --> 1137 </xsl:template>1138 1139 1140 <xsl:template name="olink.outline">1141 <xsl:param name="outline.base.uri"/>1142 <xsl:param name="localinfo"/>1143 <xsl:param name="return" select="href"/>1144 1145 <xsl:variable name="outline-file" select="concat($outline.base.uri, $olink.outline.ext)"/>1146 1147 <xsl:variable name="outline" select="document($outline-file,.)/div"/>1148 1149 <xsl:variable name="node-href">1150 <xsl:choose>1151 <xsl:when test="$localinfo != ''">1152 <xsl:variable name="node" select="$outline// *[@id=$localinfo or @xml:id=$localinfo]"/>1153 <xsl:value-of select="$node/@href"/>1154 </xsl:when>1155 <xsl:otherwise>1156 <xsl:value-of select="$outline/@href"/>1157 </xsl:otherwise>1158 </xsl:choose>1159 </xsl:variable>1160 1161 <xsl:variable name="node-xref">1162 <xsl:choose>1163 <xsl:when test="$localinfo != ''">1164 <xsl:variable name="node" select="$outline// *[@id=$localinfo or @xml:id=$localinfo]"/>1165 <xsl:copy-of select="$node/xref"/>1166 </xsl:when>1167 <xsl:otherwise>1168 <xsl:value-of select="$outline/xref"/>1169 </xsl:otherwise>1170 </xsl:choose>1171 </xsl:variable>1172 1173 <xsl:choose>1174 <xsl:when test="$return = 'href'">1175 <xsl:value-of select="$node-href"/>1176 </xsl:when>1177 <xsl:when test="$return = 'xref'">1178 <xsl:value-of select="$node-xref"/>1179 </xsl:when>1180 <xsl:otherwise>1181 <xsl:copy-of select="$node-xref"/>1182 </xsl:otherwise>1183 </xsl:choose>1184 1153 </xsl:template> 1185 1154 … … 1197 1166 1198 1167 <xsl:template match="title" mode="xref"> 1199 <xsl:apply-templates />1168 <xsl:apply-templates mode="no.anchor.mode"/> 1200 1169 </xsl:template> 1201 1170 … … 1216 1185 1217 1186 <xsl:choose> 1218 <!-- FIXME: what about the case where titleabbrev is inside the info? --> 1219 <xsl:when test="$purpose = 'xref' and titleabbrev"> 1220 <xsl:apply-templates select="." mode="titleabbrev.markup"/> 1187 <xsl:when test="$purpose = 'xref'"> 1188 <xsl:copy-of select="$title"/> 1221 1189 </xsl:when> 1222 1190 <xsl:otherwise> … … 1233 1201 <xsl:choose> 1234 1202 <xsl:when test="$purpose = 'xref'"> 1235 < i>1203 <em xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> 1236 1204 <xsl:copy-of select="$title"/> 1237 </ i>1205 </em> 1238 1206 </xsl:when> 1239 1207 <xsl:otherwise>
Note:
See TracChangeset
for help on using the changeset viewer.