Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/html In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl/html Added Files: ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl division.xsl docbook.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl html-rtf.xsl html.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.ent param.xml param.xsl param.xweb pi.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xml titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl Log Message: DocBook XSL now in CVS --- NEW FILE: ChangeLog --- 2003-01-22 Norman Walsh <nw...@us...> * graphics.xsl: Fix bugs in presentation of graphic width/height * inline.xsl: Add class attributes to inline elements * xref.xsl: Format chapter and appendix titles consistently in xrefs 2003-01-20 Norman Walsh <nw...@us...> * autoidx.xsl: Bug #663331: add article to section entity * biblio.xsl: Bug #640762: Support new biblioentry elements * chunk-common.xsl: Bug #648473: don't output the html.ext when using dbhtml filenames * footnote.xsl: Support {table.}footnote.number.{format,symbols} * glossary.xsl: Support glossentry.show.acronym [...1448 lines suppressed...] * callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters * chunk-common.xsl: Remove unnecessary xmlns declarations * chunker.xsl: Patch to make saxon not produce xml version=1.1 documents * param.xsl: Documentation fixes * qandaset.xsl: Apply patch 412510 by Jon Willeke, make xref to Question work correctly * xref.xsl: Remove unnecessary parameter assignment 2001-04-02 Norman Walsh <nw...@us...> * .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl, xtchunk.xsl, xtchunker.xsl: New file. * Makefile: Use the cvstools version of saxon --- NEW FILE: admon.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: admon.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <xsl:template name="admon.graphic.width"> <xsl:param name="node" select="."/> <xsl:text>25</xsl:text> </xsl:template> <xsl:template match="note|important|warning|caution|tip"> <xsl:choose> <xsl:when test="$admon.graphics != 0"> <xsl:call-template name="graphical.admonition"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="nongraphical.admonition"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="admon.graphic"> <xsl:param name="node" select="."/> <xsl:value-of select="$admon.graphics.path"/> <xsl:choose> <xsl:when test="local-name($node)='note'">note</xsl:when> <xsl:when test="local-name($node)='warning'">warning</xsl:when> <xsl:when test="local-name($node)='caution'">caution</xsl:when> <xsl:when test="local-name($node)='tip'">tip</xsl:when> <xsl:when test="local-name($node)='important'">important</xsl:when> <xsl:otherwise>note</xsl:otherwise> </xsl:choose> <xsl:value-of select="$admon.graphics.extension"/> </xsl:template> <xsl:template name="graphical.admonition"> <xsl:variable name="admon.type"> <xsl:choose> <xsl:when test="local-name(.)='note'">Note</xsl:when> <xsl:when test="local-name(.)='warning'">Warning</xsl:when> <xsl:when test="local-name(.)='caution'">Caution</xsl:when> <xsl:when test="local-name(.)='tip'">Tip</xsl:when> <xsl:when test="local-name(.)='important'">Important</xsl:when> <xsl:otherwise>Note</xsl:otherwise> </xsl:choose> </xsl:variable> <div class="{name(.)}"> <xsl:if test="$admon.style != ''"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> </xsl:if> <table border="0"> <xsl:attribute name="summary"> <xsl:value-of select="$admon.type"/> <xsl:if test="title"> <xsl:text>: </xsl:text> <xsl:value-of select="title"/> </xsl:if> </xsl:attribute> <tr> <td rowspan="2" align="center" valign="top"> <xsl:attribute name="width"> <xsl:call-template name="admon.graphic.width"/> </xsl:attribute> <img alt="[{$admon.type}]"> <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> </img> </td> <th align="left"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="object.title.markup"/> </th> </tr> <tr> <td colspan="2" align="left" valign="top"> <xsl:apply-templates/> </td> </tr> </table> </div> </xsl:template> <xsl:template name="nongraphical.admonition"> <div class="{name(.)}"> <xsl:if test="$admon.style"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> </xsl:if> <h3 class="title"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="object.title.markup"/> </h3> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="note/title"></xsl:template> <xsl:template match="important/title"></xsl:template> <xsl:template match="warning/title"></xsl:template> <xsl:template match="caution/title"></xsl:template> <xsl:template match="tip/title"></xsl:template> </xsl:stylesheet> --- NEW FILE: autoidx.xsl --- <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> <!ENTITY section '(ancestor-or-self::set |ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::reference |ancestor-or-self::partintro |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::article |ancestor-or-self::section |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::refentry |ancestor-or-self::refsect1 |ancestor-or-self::refsect2 |ancestor-or-self::refsect3 |ancestor-or-self::simplesect |ancestor-or-self::bibliography |ancestor-or-self::glossary |ancestor-or-self::index |ancestor-or-self::webpage)[last()]'> <!ENTITY section.id 'generate-id(§ion;)'> <!ENTITY sep '" "'> <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- ==================================================================== --> <!-- Jeni Tennison gets all the credit for what follows. I think I understand it :-) Anyway, I've hacked it a bit, so the bugs are mine. --> <xsl:key name="letter" match="indexterm" use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:key name="primary" match="indexterm" use="&primary;"/> <xsl:key name="secondary" match="indexterm" use="concat(&primary;, &sep;, &secondary;)"/> <xsl:key name="tertiary" match="indexterm" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:key name="endofrange" match="indexterm[@class='endofrange']" use="@startref"/> <xsl:key name="primary-section" match="indexterm[not(secondary) and not(see)]" use="concat(&primary;, &sep;, §ion.id;)"/> <xsl:key name="secondary-section" match="indexterm[not(tertiary) and not(see)]" use="concat(&primary;, &sep;, &secondary;, &sep;, §ion.id;)"/> <xsl:key name="tertiary-section" match="indexterm[not(see)]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, §ion.id;)"/> <xsl:key name="see-also" match="indexterm[seealso]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/> <xsl:key name="see" match="indexterm[see]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/> <xsl:key name="sections" match="*[@id]" use="@id"/> <xsl:template name="generate-index"> <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> <xsl:variable name="terms" select="//indexterm[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;, &uppercase;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/> <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <div class="index"> <xsl:if test="$others"> <div class="indexdiv"> <h3> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'index symbols'"/> </xsl:call-template> </h3> <dl> <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-symbol-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </div> </xsl:if> <xsl:apply-templates select="$alphabetical[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </div> </xsl:template> <xsl:template match="indexterm" mode="index-div"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <!-- Make sure that we don't generate a div if there are no terms in scope --> <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <div class="indexdiv"> <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> <h3> <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> </h3> </xsl:if> <dl> <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </div> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-symbol-div"> <xsl:param name="scope" select="/"/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1), &lowercase;,&uppercase;)"/> <xsl:apply-templates select="key('letter', $key) [count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:template> <xsl:template match="indexterm" mode="index-primary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="&primary;"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <dt> <xsl:value-of select="primary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(secondary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <dt> <xsl:value-of select="secondary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(tertiary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" mode="index-tertiary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <dt> <xsl:value-of select="tertiary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs/see"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/seealso"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference"> <xsl:param name="scope" select="."/> <xsl:param name="separator" select="', '"/> <xsl:value-of select="$separator"/> <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <a> <xsl:variable name="title"> <xsl:apply-templates select="§ion;" mode="title.markup"/> </xsl:variable> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="§ion;"/> </xsl:call-template> </xsl:attribute> <xsl:value-of select="$title"/> <!-- text only --> </a> <xsl:if test="key('endofrange', @id)[&scope;]"> <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]" mode="reference"> <xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="separator" select="'-'"/> </xsl:apply-templates> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference"> <xsl:param name="scope" select="."/> <xsl:param name="zones"/> <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$target[1]" mode="index-title-content"/> </a> <xsl:text>, </xsl:text> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$target[1]" mode="index-title-content"/> </a> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="indexterm" mode="index-see"> <xsl:param name="scope" select="."/> <xsl:text> (</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'see'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="see"/> <xsl:text>)</xsl:text> </xsl:template> <xsl:template match="indexterm" mode="index-seealso"> <xsl:param name="scope" select="."/> <dt> <xsl:text>(</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'seealso'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="seealso"/> <xsl:text>)</xsl:text> </dt> </xsl:template> <xsl:template match="*" mode="index-title-content"> <xsl:variable name="title"> <xsl:apply-templates select="§ion;" mode="title.markup"/> </xsl:variable> <xsl:value-of select="$title"/> </xsl:template> </xsl:stylesheet> --- NEW FILE: autotoc.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: autotoc.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <xsl:variable name="toc.listitem.type"> <xsl:choose> <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when> <xsl:otherwise>li</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- this is just hack because dl and ul aren't completely isomorphic --> <xsl:variable name="toc.dd.type"> <xsl:choose> <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:template name="make.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <xsl:variable name="toc.title"> <xsl:if test="$toc.title.p"> <p> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key">TableofContents</xsl:with-param> </xsl:call-template> </b> </p> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="$manual.toc != ''"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="toc" select="document($manual.toc, .)"/> <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/> <xsl:if test="$tocentry and $tocentry/*"> <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> </xsl:element> </div> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:if test="$nodes"> <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </div> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="make.lots"> <xsl:param name="toc.params" select="''"/> <xsl:param name="toc"/> <xsl:if test="contains($toc.params, 'toc')"> <xsl:copy-of select="$toc"/> </xsl:if> <xsl:if test="contains($toc.params, 'figure')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> <xsl:with-param name="nodes" select=".//figure"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'table')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> <xsl:with-param name="nodes" select=".//table"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'example')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'example'"/> <xsl:with-param name="nodes" select=".//example"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'equation')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'equation'"/> <xsl:with-param name="nodes" select=".//equation[title]"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'procedure')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'procedure'"/> <xsl:with-param name="nodes" select=".//procedure[title]"/> </xsl:call-template> </xsl:if> </xsl:template> <!-- ====================================================================== --> <xsl:template name="set.toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="book|setindex"/> </xsl:call-template> </xsl:template> <xsl:template name="division.toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="component.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="toc.title.p" select="$toc.title.p"/> <xsl:with-param name="nodes" select="section|sect1|refentry |article|bibliography|glossary |appendix |bridgehead[not(@renderas) and $bridgehead.in.toc != 0] |.//bridgehead[@renderas='sect1' and $bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="component.toc.separator"> <!-- Customize to output something between component.toc and first output --> </xsl:template> <xsl:template name="section.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="toc.title.p" select="$toc.title.p"/> <xsl:with-param name="nodes" select="section|sect1|sect2|sect3|sect4|sect5|refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="section.toc.separator"> <!-- Customize to output something between section.toc and first output --> </xsl:template> <!-- ==================================================================== --> <xsl:template name="subtoc"> <xsl:param name="toc-context" select="."/> <xsl:param name="nodes" select="NOT-AN-ELEMENT"/> <xsl:variable name="subtoc"> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates mode="toc" select="$nodes"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </xsl:variable> <xsl:variable name="depth"> <xsl:choose> <xsl:when test="local-name(.) = 'section'"> <xsl:value-of select="count(ancestor::section) + 1"/> </xsl:when> <xsl:when test="local-name(.) = 'sect1'">1</xsl:when> <xsl:when test="local-name(.) = 'sect2'">2</xsl:when> <xsl:when test="local-name(.) = 'sect3'">3</xsl:when> <xsl:when test="local-name(.) = 'sect4'">4</xsl:when> <xsl:when test="local-name(.) = 'sect5'">5</xsl:when> <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when> <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when> <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when> <xsl:when test="local-name(.) = 'simplesect'"> <!-- sigh... --> <xsl:choose> <xsl:when test="local-name(..) = 'section'"> <xsl:value-of select="count(ancestor::section)"/> </xsl:when> <xsl:when test="local-name(..) = 'sect1'">2</xsl:when> <xsl:when test="local-name(..) = 'sect2'">3</xsl:when> <xsl:when test="local-name(..) = 'sect3'">4</xsl:when> <xsl:when test="local-name(..) = 'sect4'">5</xsl:when> <xsl:when test="local-name(..) = 'sect5'">6</xsl:when> <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when> <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when> <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="subtoc.list"> <xsl:choose> <xsl:when test="$toc.dd.type = ''"> <xsl:copy-of select="$subtoc"/> </xsl:when> <xsl:otherwise> <xsl:element name="{$toc.dd.type}"> <xsl:copy-of select="$subtoc"/> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="context" select="$toc-context"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="." mode="title.markup"/> </a> <xsl:if test="$toc.listitem.type = 'li' and $toc.section.depth > $depth and count($nodes)>0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:element> <xsl:if test="$toc.listitem.type != 'li' and $toc.section.depth > $depth and count($nodes)>0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:template> <xsl:template match="book|setindex" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="part|reference" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="appendix|chapter|article |index|glossary|bibliography |preface|reference|refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="preface|chapter|appendix|article" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="section|sect1 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect1" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect2 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect2" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect3 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect3" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect4 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect4" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect5 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect5" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:template> <xsl:template match="section" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="section |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="bridgehead" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:if test="$bridgehead.in.toc != 0"> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="bibliography|glossary" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:template> <xsl:template match="index" mode="toc"> <xsl:param name="toc-context" select="."/> <!-- If the index tag is empty, don't point at it from the TOC --> <xsl:if test="* or $generate.index"> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="refentry" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="refmeta" select=".//refmeta"/> <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/> <xsl:variable name="refnamediv" select=".//refnamediv"/> <xsl:variable name="refname" select="$refnamediv//refname"/> <xsl:variable name="title"> <xsl:choose> <xsl:when test="$refentrytitle"> <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/> </xsl:when> <xsl:when test="$refname"> <xsl:apply-templates select="$refname[1]" mode="title.markup"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$toc.listitem.type}"> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:copy-of select="$title"/> </a> <xsl:if test="$annotate.toc != 0"> <xsl:text> - </xsl:text> <xsl:value-of select="refnamediv/refpurpose"/> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="title" mode="toc"> <xsl:param name="toc-context" select="."/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select=".."/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates/> </a> </xsl:template> <xsl:template name="manual-toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="tocentry"/> <!-- be careful, we don't want to change the current document to the other tree! --> <xsl:if test="$tocentry"> <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="$node" mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$node"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$node" mode="title.markup"/> </a> </xsl:element> <xsl:if test="$tocentry/*"> <xsl:element name="{$toc.list.type}"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> </xsl:element> </xsl:if> <xsl:if test="$tocentry/following-sibling::*"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template name="list.of.titles"> <xsl:param name="toc-context" select="."/> <xsl:param name="titles" select="'table'"/> <xsl:param name="nodes" select=".//table"/> <xsl:if test="$nodes"> <div class="list-of-{$titles}s"> <p> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key"> <xsl:choose> <xsl:when test="$titles='table'">ListofTables</xsl:when> <xsl:when test="$titles='figure'">ListofFigures</xsl:when> <xsl:when test="$titles='equation'">ListofEquations</xsl:when> <xsl:when test="$titles='example'">ListofExamples</xsl:when> <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when> <xsl:otherwise>ListofUnknown</xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </b> </p> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </div> </xsl:if> </xsl:template> <xsl:template match="figure|table|example|equation|procedure" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:apply-templates select="." mode="title.markup"/> </a> </xsl:element> </xsl:template> </xsl:stylesheet> --- NEW FILE: biblio.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: biblio.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template match="bibliography"> <div class="{name(.)}"> <xsl:if test="$generate.id.attributes != 0"> [...1016 lines suppressed...] <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <xsl:template match="volumenum" mode="bibliomixed.mode"> <span class="{name(.)}"> <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" mode="bibliomixed.mode"> <span class="{name(.)}"> <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: block.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: block.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template name="block.object"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> <!-- ==================================================================== --> <xsl:template match="para"> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <xsl:if test="position() = 1 and parent::listitem"> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="parent::listitem"/> </xsl:call-template> </xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="paragraph"> <xsl:param name="class" select="''"/> <xsl:param name="content"/> <xsl:variable name="p"> <p> <xsl:if test="$class != ''"> <xsl:attribute name="class"> <xsl:value-of select="$class"/> </xsl:attribute> </xsl:if> <xsl:copy-of select="$content"/> </p> </xsl:variable> <xsl:choose> <xsl:when test="$html.cleanup != 0"> <xsl:call-template name="unwrap.p"> <xsl:with-param name="p" select="$p"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$p"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="simpara"> <!-- see also listitem/simpara in lists.xsl --> <p> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:attribute name="class"> <xsl:value-of select="@role"/> </xsl:attribute> </xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="formalpara"> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="formalpara/title"> <xsl:variable name="titleStr" select="."/> <xsl:variable name="lastChar"> <xsl:if test="$titleStr != ''"> <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/> </xsl:if> </xsl:variable> <b> <xsl:apply-templates/> <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))"> <xsl:value-of select="$runinhead.default.title.end.punct"/> </xsl:if> <xsl:text> </xsl:text> </b> </xsl:template> <xsl:template match="formalpara/para"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="blockquote"> <div class="{local-name(.)}"> <xsl:if test="@lang or @xml:lang"> <xsl:call-template name="language.attribute"/> </xsl:if> <xsl:call-template name="anchor"/> <xsl:choose> <xsl:when test="attribution"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote"> <tr> <td width="10%" valign="top"> </td> <td width="80%" valign="top"> <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/> </td> <td width="10%" valign="top"> </td> </tr> <tr> <td colspan="2" align="right" valign="top"> <xsl:text>--</xsl:text> <xsl:apply-templates select="attribution"/> </td> <td width="10%" valign="top"> </td> </tr> </table> </xsl:when> <xsl:otherwise> <blockquote class="{local-name(.)}"> <xsl:apply-templates/> </blockquote> </xsl:otherwise> </xsl:choose> </div> </xsl:template> <xsl:template match="blockquote/title"> <div class="blockquote-title"> <p> <b> <xsl:apply-templates/> </b> </p> </div> </xsl:template> <xsl:template match="epigraph"> <div class="{name(.)}"> <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> <span>--<xsl:apply-templates select="attribution"/></span> </div> </xsl:template> <xsl:template match="attribution"> <span class="{name(.)}"><xsl:apply-templates/></span> </xsl:template> <!-- ==================================================================== --> <xsl:template match="sidebar"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="sidebar/title"> <p class="title"> <b><xsl:apply-templates/></b> </p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="abstract"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:call-template name="formal.object.heading"> <xsl:with-param name="title"> <xsl:apply-templates select="." mode="title.markup"> <xsl:with-param name="allow-anchors" select="'1'"/> </xsl:apply-templates> </xsl:with-param> </xsl:call-template> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="abstract/title"> </xsl:template> <!-- ==================================================================== --> <xsl:template match="msgset"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgentry"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="simplemsgentry"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msg"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msgmain"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgmain/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgsub"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgsub/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgrel"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgrel/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgtext"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msginfo"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msglevel"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgLevel'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgorig"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgOrig'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgaud"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgAud'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgexplan"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msgexplan/title"> <p><b><xsl:apply-templates/></b></p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="revhistory"> <div class="{name(.)}"> <table border="0" width="100%" summary="Revision history"> <tr> <th align="left" valign="top" colspan="3"> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RevHistory'"/> </xsl:call-template> </b> </th> </tr> <xsl:apply-templates/> </table> </div> </xsl:template> <xsl:template match="revhistory/revision"> <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <tr> <td align="left"> <xsl:if test="$revnumber"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'Revision'"/> </xsl:call-template> <xsl:call-template name="gentext.space"/> <xsl:apply-templates select="$revnumber"/> </xsl:if> </td> <td align="left"> <xsl:apply-templates select="$revdate"/> </td> <xsl:choose> <xsl:when test="count($revauthor)=0"> <td align="left"> <xsl:call-template name="dingbat"> <xsl:with-param name="dingbat">nbsp</xsl:with-param> </xsl:call-template> </td> </xsl:when> <xsl:otherwise> <td align="left"> <xsl:apply-templates select="$revauthor"/> </td> </xsl:otherwise> </xsl:choose> </tr> <xsl:if test="$revremark"> <tr> <td align="left" colspan="3"> <xsl:apply-templates select="$revremark"/> </td> </tr> </xsl:if> </xsl:template> <xsl:template match="revision/revnumber"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/date"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/authorinitials"> <xsl:text>, </xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/authorinitials[1]" priority="2"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/revremark"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/revdescription"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="ackno"> <p class="{name(.)}"> <xsl:apply-templates/> </p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="highlights"> <xsl:call-template name="block.object"/> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: callout.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" exclude-result-prefixes="sverb xverb lxslt" version='1.0'> <!-- ******************************************************************** $Id: callout.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <lxslt:component prefix="xverb" functions="insertCallouts"/> <xsl:template match="programlistingco|screenco"> <xsl:variable name="verbatim" select="programlisting|screen"/> <xsl:choose> <xsl:when test="$use.extensions != '0' and $callouts.extension != '0'"> <xsl:variable name="rtf"> <xsl:apply-templates select="$verbatim"> <xsl:with-param name="suppress-numbers" select="'1'"/> </xsl:apply-templates> </xsl:variable> <xsl:variable name="rtf-with-callouts"> <xsl:choose> <xsl:when test="function-available('sverb:insertCallouts')"> <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/> </xsl:when> <xsl:when test="function-available('xverb:insertCallouts')"> <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No insertCallouts function is available.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$verbatim/@linenumbering = 'numbered' and $linenumbering.extension != '0'"> <div class="{name(.)}"> <xsl:call-template name="number.rtf.lines"> <xsl:with-param name="rtf" select="$rtf-with-callouts"/> <xsl:with-param name="pi.context" select="programlisting|screen"/> </xsl:call-template> <xsl:apply-templates select="calloutlist"/> </div> </xsl:when> <xsl:otherwise> <div class="{name(.)}"> <xsl:copy-of select="$rtf-with-callouts"/> <xsl:apply-templates select="calloutlist"/> </div> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <div class="{name(.)}"> <xsl:apply-templates/> </div> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="areaspec|areaset|area"> </xsl:template> <xsl:template match="areaset" mode="conumber"> <xsl:number count="area|areaset" format="1"/> </xsl:template> <xsl:template match="area" mode="conumber"> <xsl:number count="area|areaset" format="1"/> </xsl:template> <xsl:template match="co"> <!-- Support a single linkend in HTML --> <xsl:variable name="targets" select="key('id', @linkends)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> <xsl:when test="$target"> <a> <xsl:if test="@id"> <xsl:attribute name="name"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="." mode="callout-bug"/> </a> </xsl:when> <xsl:otherwise> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="callout-bug"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="co" mode="callout-bug"> <xsl:call-template name="callout-bug"> <xsl:with-param name="conum"> <xsl:number count="co" format="1"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="callout-bug"> <xsl:param name="conum" select='1'/> <xsl:choose> <xsl:when test="$callout.graphics != 0 and $conum <= $callout.graphics.number.limit"> <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}" alt="{$conum}" border="0"/> </xsl:when> <xsl:when test="$callout.unicode != 0 and $conum <= $callout.unicode.number.limit"> <xsl:choose> <xsl:when test="$callout.unicode.start.character = 10102"> <xsl:choose> <xsl:when test="$conum = 1">❶</xsl:when> <xsl:when test="$conum = 2">❷</xsl:when> <xsl:when test="$conum = 3">❸</xsl:when> <xsl:when test="$conum = 4">❹</xsl:when> <xsl:when test="$conum = 5">❺</xsl:when> <xsl:when test="$conum = 6">❻</xsl:when> <xsl:when test="$conum = 7">❼</xsl:when> <xsl:when test="$conum = 8">❽</xsl:when> <xsl:when test="$conum = 9">❾</xsl:when> <xsl:when test="$conum = 10">❿</xsl:when> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Don't know how to generate Unicode callouts </xsl:text> <xsl:text>when $callout.unicode.start.character is </xsl:text> <xsl:value-of select="$callout.unicode.start.character"/> </xsl:message> <xsl:text>(</xsl:text> <xsl:value-of select="$conum"/> <xsl:text>)</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:text>(</xsl:text> <xsl:value-of selec... [truncated message content] |