Update of /cvsroot/nhibernate/nhibernate/doc/reference/support/docbook-xsl/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21160/support/docbook-xsl/html Added Files: ChangeLog param.ent param.xml titlepage.templates.xml admon.xsl autoidx-ng.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-code.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl division.xsl docbook.xsl docbookng.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl html-rtf.xsl html.xsl htmltbl.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk-code.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl task.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl param.xweb Log Message: Added all of the support files needed by docbook to build the html. --- NEW FILE: chunktoc.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" version="1.0" exclude-result-prefixes="doc"> <!-- ******************************************************************** $Id: chunktoc.xsl,v 1.1 2004/10/21 12:52:06 mikedoerfler 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:import href="docbook.xsl"/> <xsl:import href="chunk-common.xsl"/> <xsl:template name="chunk"> <xsl:param name="node" select="."/> <!-- returns 1 if $node is a chunk --> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$node"/> </xsl:call-template> </xsl:variable> <xsl:variable name="chunks" select="document($chunk.toc,$node)"/> <xsl:choose> <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> <xsl:template match="*" mode="chunk-filename"> <!-- returns the filename of a chunk --> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="chunks" select="document($chunk.toc,.)"/> <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/> <xsl:variable name="filename"> <xsl:call-template name="dbhtml-filename"> <xsl:with-param name="pis" select="$chunk/processing-instruction('dbhtml')"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$chunk"> <xsl:value-of select="$filename"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="parent::*" mode="chunk-filename"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> <xsl:template name="process-chunk"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="chunks" select="document($chunk.toc,.)"/> <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/> <xsl:variable name="prev-id" select="($chunk/preceding::tocentry |$chunk/ancestor::tocentry)[last()]/@linkend"/> <xsl:variable name="next-id" select="($chunk/following::tocentry |$chunk/child::tocentry)[1]/@linkend"/> <xsl:variable name="prev" select="key('id',$prev-id)"/> <xsl:variable name="next" select="key('id',$next-id)"/> <xsl:variable name="ischunk"> <xsl:call-template name="chunk"/> </xsl:variable> <xsl:variable name="chunkfn"> <xsl:if test="$ischunk='1'"> <xsl:apply-templates mode="chunk-filename" select="."/> </xsl:if> </xsl:variable> <xsl:variable name="filename"> <xsl:call-template name="make-relative-filename"> <xsl:with-param name="base.dir" select="$base.dir"/> <xsl:with-param name="base.name" select="$chunkfn"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$ischunk = 0"> <xsl:apply-imports/> </xsl:when> <xsl:otherwise> <xsl:call-template name="write.chunk"> <xsl:with-param name="filename" select="$filename"/> <xsl:with-param name="content"> <xsl:call-template name="chunk-element-content"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="quiet" select="$chunk.quietly"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> <xsl:template match="set"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="book"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="book/appendix"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="book/glossary"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="book/bibliography"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="dedication" mode="dedication"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="preface|chapter"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="part|reference"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="refentry"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="colophon"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="article"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="article/appendix"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="article/glossary"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="article/bibliography"> <xsl:call-template name="process-chunk"/> </xsl:template> <xsl:template match="sect1|sect2|sect3|sect4|sect5|section"> <xsl:variable name="ischunk"> <xsl:call-template name="chunk"/> </xsl:variable> <xsl:choose> <xsl:when test="$ischunk != 0"> <xsl:call-template name="process-chunk"/> </xsl:when> <xsl:otherwise> <xsl:apply-imports/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="setindex |book/index |article/index"> <!-- some implementations use completely empty index tags to indicate --> <!-- where an automatically generated index should be inserted. so --> <!-- if the index is completely empty, skip it. --> <xsl:if test="count(*)>0 or $generate.index != '0'"> <xsl:call-template name="process-chunk"/> </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template match="/"> <xsl:choose> <xsl:when test="$chunk.toc = ''"> <xsl:message terminate="yes"> <xsl:text>The chunk.toc file is not set.</xsl:text> </xsl:message> </xsl:when> <xsl:when test="$rootid != ''"> <xsl:choose> <xsl:when test="count(key('id',$rootid)) = 0"> <xsl:message terminate="yes"> <xsl:text>ID '</xsl:text> <xsl:value-of select="$rootid"/> <xsl:text>' not found in document.</xsl:text> </xsl:message> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="key('id',$rootid)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="/" mode="process.root"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="*" mode="process.root"> <xsl:apply-templates select="."/> </xsl:template> </xsl:stylesheet> --- NEW FILE: refentry.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: refentry.xsl,v 1.1 2004/10/21 12:52:07 mikedoerfler 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="reference"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:call-template name="anchor"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:call-template name="reference.titlepage"/> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="not(partintro) and contains($toc.params, 'toc')"> <xsl:call-template name="division.toc"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="reference" mode="division.number"> <xsl:number from="book" count="reference" format="I."/> </xsl:template> <xsl:template match="reference/docinfo"></xsl:template> <xsl:template match="reference/referenceinfo"></xsl:template> <xsl:template match="reference/title"></xsl:template> <xsl:template match="reference/subtitle"></xsl:template> <!-- ==================================================================== --> <xsl:template name="refentry.title"> <xsl:param name="node" select="."/> <xsl:variable name="refmeta" select="$node//refmeta"/> <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/> <xsl:variable name="refnamediv" select="$node//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"/> </xsl:when> <xsl:when test="$refname"> <xsl:apply-templates select="$refname[1]" mode="title"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> <h1 class="title"> <xsl:copy-of select="$title"/> </h1> </xsl:template> <xsl:template match="refentry"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry"> <div class="refentry.separator"> <hr/> </div> </xsl:if> <xsl:call-template name="anchor"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:call-template name="refentry.titlepage"/> <xsl:apply-templates/> <xsl:call-template name="process.footnotes"/> </div> </xsl:template> <xsl:template match="refentry/docinfo|refentry/refentryinfo"></xsl:template> <xsl:template match="refentrytitle|refname" mode="title"> <xsl:apply-templates/> </xsl:template> <xsl:template match="refmeta"> </xsl:template> <xsl:template match="manvolnum"> <xsl:if test="$refentry.xref.manvolnum != 0"> <xsl:text>(</xsl:text> <xsl:apply-templates/> <xsl:text>)</xsl:text> </xsl:if> </xsl:template> <xsl:template match="refmiscinfo"> </xsl:template> <xsl:template match="refentrytitle"> <xsl:call-template name="inline.charseq"/> </xsl:template> <xsl:template match="refnamediv"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:choose> <xsl:when test="$refentry.generate.name != 0"> <h2> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RefName'"/> </xsl:call-template> </h2> </xsl:when> <xsl:when test="$refentry.generate.title != 0"> <h2> <xsl:choose> <xsl:when test="../refmeta/refentrytitle"> <xsl:apply-templates select="../refmeta/refentrytitle"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="refname[1]"/> </xsl:otherwise> </xsl:choose> </h2> </xsl:when> </xsl:choose> <p> <xsl:apply-templates/> </p> </div> </xsl:template> <xsl:template match="refname"> <xsl:apply-templates/> <xsl:if test="following-sibling::refname"> <xsl:text>, </xsl:text> </xsl:if> </xsl:template> <xsl:template match="refpurpose"> <xsl:text> </xsl:text> <xsl:call-template name="dingbat"> <xsl:with-param name="dingbat">em-dash</xsl:with-param> </xsl:call-template> <xsl:text> </xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="refdescriptor"> <!-- todo: finish this --> </xsl:template> <xsl:template match="refclass"> <p> <b> <xsl:if test="@role"> <xsl:value-of select="@role"/> <xsl:text>: </xsl:text> </xsl:if> <xsl:apply-templates/> </b> </p> </xsl:template> <xsl:template match="refsynopsisdiv"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <h2> <xsl:choose> <xsl:when test="refsynopsisdiv/title|title"> <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]" mode="titlepage.mode"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RefSynopsisDiv'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </h2> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="refsynopsisdivinfo"></xsl:template> <xsl:template match="refsynopsisdiv/title"> </xsl:template> <xsl:template match="refsynopsisdiv/title" mode="titlepage.mode"> <xsl:apply-templates/> </xsl:template> <xsl:template match="refsection|refsect1|refsect2|refsect3"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:call-template name="anchor"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="refsection/title"> <!-- the ID is output in the block.object call for refsect1 --> <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/> <xsl:variable name="hlevel"> <xsl:choose> <xsl:when test="$level > 5">6</xsl:when> <xsl:otherwise> <xsl:value-of select="$level+1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="h{$hlevel}"> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="refsect1/title"> <!-- the ID is output in the block.object call for refsect1 --> <h2> <xsl:apply-templates/> </h2> </xsl:template> <xsl:template match="refsect2/title"> <!-- the ID is output in the block.object call for refsect2 --> <h3> <xsl:apply-templates/> </h3> </xsl:template> <xsl:template match="refsect3/title"> <!-- the ID is output in the block.object call for refsect3 --> <h4> <xsl:apply-templates/> </h4> </xsl:template> <xsl:template match="refsect1info"></xsl:template> <xsl:template match="refsect2info"></xsl:template> <xsl:template match="refsect3info"></xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: formal.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: formal.xsl,v 1.1 2004/10/21 12:52:06 mikedoerfler 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="formal.object"> <xsl:param name="placement" select="'before'"/> <xsl:param name="class" select="local-name(.)"/> <div class="{$class}"> <xsl:call-template name="anchor"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:choose> <xsl:when test="$placement = 'before'"> <xsl:call-template name="formal.object.heading"/> <xsl:apply-templates/> <!-- HACK: This doesn't belong inside formal.object; it should be done by --> <!-- the table template, but I want the link to be inside the DIV, so... --> <xsl:if test="local-name(.) = 'table'"> <xsl:call-template name="table.longdesc"/> </xsl:if> <xsl:if test="$spacing.paras != 0"><p/></xsl:if> </xsl:when> <xsl:otherwise> <xsl:if test="$spacing.paras != 0"><p/></xsl:if> <xsl:apply-templates/> <!-- HACK: This doesn't belong inside formal.object; it should be done by --> <!-- the table template, but I want the link to be inside the DIV, so... --> <xsl:if test="local-name(.) = 'table'"> <xsl:call-template name="table.longdesc"/> </xsl:if> <xsl:call-template name="formal.object.heading"/> </xsl:otherwise> </xsl:choose> </div> </xsl:template> <xsl:template name="formal.object.heading"> <xsl:param name="object" select="."/> <xsl:param name="title"> <xsl:apply-templates select="$object" mode="object.title.markup"> <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> </xsl:param> <p class="title"> <b> <xsl:copy-of select="$title"/> </b> </p> </xsl:template> <xsl:template name="informal.object"> <xsl:param name="class" select="local-name(.)"/> <div class="{$class}"> <xsl:if test="$spacing.paras != 0"><p/></xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> <!-- HACK: This doesn't belong inside formal.object; it should be done by --> <!-- the table template, but I want the link to be inside the DIV, so... --> <xsl:if test="local-name(.) = 'informaltable'"> <xsl:call-template name="table.longdesc"/> </xsl:if> <xsl:if test="$spacing.paras != 0"><p/></xsl:if> </div> </xsl:template> <xsl:template name="semiformal.object"> <xsl:param name="placement" select="'before'"/> <xsl:param name="class" select="local-name(.)"/> <xsl:choose> <xsl:when test="title"> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> <xsl:with-param name="class" select="$class"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="informal.object"> <xsl:with-param name="class" select="$class"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="figure"> <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/> <xsl:variable name="placement"> <xsl:choose> <xsl:when test="contains($param.placement, ' ')"> <xsl:value-of select="substring-before($param.placement, ' ')"/> </xsl:when> <xsl:when test="$param.placement = ''">before</xsl:when> <xsl:otherwise> <xsl:value-of select="$param.placement"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="@float and @float != 0"> <xsl:variable name="float"> <xsl:choose> <xsl:when test="@float = 1"> <xsl:value-of select="$default.float.class"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="@float"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <div class="figure-float"> <xsl:if test="$float = 'left' or $float = 'right'"> <xsl:attribute name="style"> <xsl:text>float: </xsl:text> <xsl:value-of select="$float"/> <xsl:text>;</xsl:text> </xsl:attribute> </xsl:if> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> </div> </xsl:when> <xsl:otherwise> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="table"> <xsl:choose> <xsl:when test="tgroup|mediaobject|graphic"> <xsl:call-template name="calsTable"/> </xsl:when> <xsl:otherwise> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:if test="not(@id)"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> </xsl:if> <xsl:call-template name="htmlTable"/> </xsl:copy> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="calsTable"> <xsl:if test="tgroup/tbody/tr |tgroup/thead/tr |tgroup/tfoot/tr"> <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message> </xsl:if> <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/> <xsl:variable name="placement"> <xsl:choose> <xsl:when test="contains($param.placement, ' ')"> <xsl:value-of select="substring-before($param.placement, ' ')"/> </xsl:when> <xsl:when test="$param.placement = ''">before</xsl:when> <xsl:otherwise> <xsl:value-of select="$param.placement"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> <xsl:with-param name="class"> <xsl:choose> <xsl:when test="@tabstyle"> <!-- hack, this will only ever occur on table, not example --> <xsl:value-of select="@tabstyle"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="local-name(.)"/> </xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="htmlTable"> <xsl:if test="tgroup/tbody/row |tgroup/thead/row |tgroup/tfoot/row"> <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message> </xsl:if> <xsl:apply-templates mode="htmlTable"/> </xsl:template> <xsl:template match="example"> <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/> <xsl:variable name="placement"> <xsl:choose> <xsl:when test="contains($param.placement, ' ')"> <xsl:value-of select="substring-before($param.placement, ' ')"/> </xsl:when> <xsl:when test="$param.placement = ''">before</xsl:when> <xsl:otherwise> <xsl:value-of select="$param.placement"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> <xsl:with-param name="class" select="local-name(.)"/> </xsl:call-template> </xsl:template> <xsl:template match="equation"> <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/> <xsl:variable name="placement"> <xsl:choose> <xsl:when test="contains($param.placement, ' ')"> <xsl:value-of select="substring-before($param.placement, ' ')"/> </xsl:when> <xsl:when test="$param.placement = ''">before</xsl:when> <xsl:otherwise> <xsl:value-of select="$param.placement"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="semiformal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> </xsl:template> <xsl:template match="figure/title"></xsl:template> <xsl:template match="figure/titleabbrev"></xsl:template> <xsl:template match="table/title"></xsl:template> <xsl:template match="table/titleabbrev"></xsl:template> <xsl:template match="table/textobject"></xsl:template> <xsl:template match="example/title"></xsl:template> <xsl:template match="example/titleabbrev"></xsl:template> <xsl:template match="equation/title"></xsl:template> <xsl:template match="equation/titleabbrev"></xsl:template> <xsl:template match="informalfigure"> <xsl:call-template name="informal.object"/> </xsl:template> <xsl:template match="informalexample"> <xsl:call-template name="informal.object"/> </xsl:template> <xsl:template match="informaltable"> <xsl:choose> <xsl:when test="tgroup|mediaobject|graphic"> <xsl:call-template name="informal.object"> <xsl:with-param name="class"> <xsl:choose> <xsl:when test="@tabstyle"> <xsl:value-of select="@tabstyle"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="local-name(.)"/> </xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <table> <xsl:copy-of select="@*"/> <xsl:call-template name="htmlTable"/> </table> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="informaltable/textobject"></xsl:template> <xsl:template name="table.longdesc"> <!-- HACK: This doesn't belong inside formal.objectt; it should be done by --> <!-- the table template, but I want the link to be inside the DIV, so... --> <xsl:variable name="longdesc.uri"> <xsl:call-template name="longdesc.uri"> <xsl:with-param name="mediaobject" select="."/> </xsl:call-template> </xsl:variable> <xsl:variable name="irrelevant"> <!-- write.longdesc returns the filename ... --> <xsl:call-template name="write.longdesc"> <xsl:with-param name="mediaobject" select="."/> </xsl:call-template> </xsl:variable> <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0 and textobject[not(phrase)]"> <xsl:call-template name="longdesc.link"> <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="informalequation"> <xsl:call-template name="informal.object"/> </xsl:template> </xsl:stylesheet> --- NEW FILE: lists.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: lists.xsl,v 1.1 2004/10/21 12:52:07 mikedoerfler 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="itemizedlist"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> [...1048 lines suppressed...] </xsl:when> <xsl:otherwise> <xsl:call-template name="callout-bug"> <xsl:with-param name="conum"> <xsl:apply-templates select="$target" mode="conumber"/> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:text>???</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: oldchunker.xsl --- <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:xalanredirect="org.apache.xalan.xslt.extensions.Redirect" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" version="1.1" exclude-result-prefixes="doc" extension-element-prefixes="saxon xalanredirect lxslt"> <!-- ******************************************************************** $Id: oldchunker.xsl,v 1.1 2004/10/21 12:52:07 mikedoerfler Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <!-- This stylesheet works with Saxon and Xalan; for XT use xtchunker.xsl --> <!-- ==================================================================== --> <xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type='string'/> <doc:param name="default.encoding" xmlns=""> <refpurpose>Encoding used in generated HTML pages</refpurpose> <refdescription> <para>This encoding is used in files generated by chunking stylesheet. Currently only Saxon is able to change output encoding. </para> </refdescription> </doc:param> <!-- ==================================================================== --> <xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type='string'/> <doc:param name="saxon.character.representation" xmlns=""> <refpurpose>Saxon character representation used in generated HTML pages</refpurpose> <refdescription> <para>This character representation is used in files generated by chunking stylesheet. If you want to suppress entity references for characters with direct representation in default.encoding, set this parameter to value <literal>native</literal>. </para> </refdescription> </doc:param> <!-- ==================================================================== --> <xsl:template name="make-relative-filename"> <xsl:param name="base.dir" select="'./'"/> <xsl:param name="base.name" select="''"/> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon doesn't make the chunks relative --> <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan doesn't make the chunks relative --> <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>Chunking isn't supported with </xsl:text> <xsl:value-of select="$vendor"/> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="write.chunk"> <xsl:param name="filename" select="''"/> <xsl:param name="method" select="'html'"/> <xsl:param name="encoding" select="$default.encoding"/> <xsl:param name="indent" select="'no'"/> <xsl:param name="content" select="''"/> <xsl:message> <xsl:text>Writing </xsl:text> <xsl:value-of select="$filename"/> <xsl:if test="name(.) != ''"> <xsl:text> for </xsl:text> <xsl:value-of select="name(.)"/> <xsl:if test="@id"> <xsl:text>(</xsl:text> <xsl:value-of select="@id"/> <xsl:text>)</xsl:text> </xsl:if> </xsl:if> </xsl:message> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON 6.2')"> <!-- Saxon 6.2.x uses xsl:document --> <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </xsl:document> </xsl:when> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon uses saxon:output --> <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </saxon:output> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan uses xalanredirect --> <xalanredirect:write file="{$filename}"> <xsl:copy-of select="$content"/> </xalanredirect:write> </xsl:when> <xsl:otherwise> <!-- it doesn't matter since we won't be making chunks... --> <xsl:message terminate="yes"> <xsl:text>Can't make chunks with </xsl:text> <xsl:value-of select="$vendor"/> <xsl:text>'s processor.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="write.chunk.with.doctype"> <xsl:param name="filename" select="''"/> <xsl:param name="method" select="'html'"/> <xsl:param name="encoding" select="$default.encoding"/> <xsl:param name="indent" select="'no'"/> <xsl:param name="doctype-public" select="''"/> <xsl:param name="doctype-system" select="''"/> <xsl:param name="content" select="''"/> <xsl:message> <xsl:text>Writing </xsl:text> <xsl:value-of select="$filename"/> <xsl:if test="name(.) != ''"> <xsl:text> for </xsl:text> <xsl:value-of select="name(.)"/> </xsl:if> </xsl:message> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON 6.2')"> <!-- Saxon 6.2.x uses xsl:document --> <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </xsl:document> </xsl:when> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon uses saxon:output --> <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </saxon:output> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan uses xalanredirect --> <xalanredirect:write file="{$filename}"> <xsl:copy-of select="$content"/> </xalanredirect:write> </xsl:when> <xsl:otherwise> <!-- it doesn't matter since we won't be making chunks... --> <xsl:message terminate="yes"> <xsl:text>Can't make chunks with </xsl:text> <xsl:value-of select="$vendor"/> <xsl:text>'s processor.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> --- NEW FILE: sections.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: sections.xsl,v 1.1 2004/10/21 12:52:07 mikedoerfler 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="section"> <xsl:variable name="depth" select="count(ancestor::section)+1"/> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:call-template name="section.titlepage"/> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $depth <= $generate.section.toc.level"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template name="section.title"> <!-- the context node should be the title of a section when called --> <xsl:variable name="section" select="(ancestor::section |ancestor::simplesect |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5)[last()]"/> <xsl:variable name="renderas"> <xsl:choose> <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when> <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when> <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when> <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when> <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when> <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="level"> <xsl:choose> <xsl:when test="$renderas != ''"> <xsl:value-of select="$renderas"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="section.level"> <xsl:with-param name="node" select="$section"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="section.heading"> <xsl:with-param name="section" select=".."/> <xsl:with-param name="level" select="$level"/> <xsl:with-param name="title"> <xsl:apply-templates select="$section" mode="object.title.markup"> <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="section/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="sect1"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:choose> <xsl:when test="@renderas = 'sect2'"> <xsl:call-template name="sect2.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect3'"> <xsl:call-template name="sect3.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect4'"> <xsl:call-template name="sect4.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect5'"> <xsl:call-template name="sect5.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="sect1.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level >= 1"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template match="sect1/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="sect2"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:choose> <xsl:when test="@renderas = 'sect1'"> <xsl:call-template name="sect1.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect3'"> <xsl:call-template name="sect3.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect4'"> <xsl:call-template name="sect4.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect5'"> <xsl:call-template name="sect5.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="sect2.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level >= 2"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template match="sect2/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="sect3"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:choose> <xsl:when test="@renderas = 'sect1'"> <xsl:call-template name="sect1.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect2'"> <xsl:call-template name="sect2.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect4'"> <xsl:call-template name="sect4.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect5'"> <xsl:call-template name="sect5.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="sect3.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level >= 3"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template match="sect3/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="sect4"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:choose> <xsl:when test="@renderas = 'sect1'"> <xsl:call-template name="sect1.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect2'"> <xsl:call-template name="sect2.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect3'"> <xsl:call-template name="sect3.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect5'"> <xsl:call-template name="sect5.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="sect4.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level >= 4"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template match="sect4/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="sect5"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:choose> <xsl:when test="@renderas = 'sect1'"> <xsl:call-template name="sect1.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect2'"> <xsl:call-template name="sect2.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect3'"> <xsl:call-template name="sect3.titlepage"/> </xsl:when> <xsl:when test="@renderas = 'sect4'"> <xsl:call-template name="sect4.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="sect5.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level >= 5"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </div> </xsl:template> <xsl:template match="sect5/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="simplesect"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:call-template name="simplesect.titlepage"/> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="simplesect/title" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.title"/> </xsl:template> <xsl:template match="section/title"></xsl:template> <xsl:template match="section/titleabbrev"></xsl:template> <xsl:template match="section/subtitle"></xsl:template> <xsl:template match="sectioninfo"></xsl:template> <xsl:template match="sect1/title"></xsl:template> <xsl:template match="sect1/titleabbrev"></xsl:template> <xsl:template match="sect1/subtitle"></xsl:template> <xsl:template match="sect1info"></xsl:template> <xsl:template match="sect2/title"></xsl:template> <xsl:template match="sect2/subtitle"></xsl:template> <xsl:template match="sect2/titleabbrev"></xsl:template> <xsl:template match="sect2info"></xsl:template> <xsl:template match="sect3/title"></xsl:template> <xsl:template match="sect3/subtitle"></xsl:template> <xsl:template match="sect3/titleabbrev"></xsl:template> <xsl:template match="sect3info"></xsl:template> <xsl:template match="sect4/title"></xsl:template> <xsl:template match="sect4/subtitle"></xsl:template> <xsl:template match="sect4/titleabbrev"></xsl:template> <xsl:template match="sect4info"></xsl:template> <xsl:template match="sect5/title"></xsl:template> <xsl:template match="sect5/subtitle"></xsl:template> <xsl:template match="sect5/titleabbrev"></xsl:template> <xsl:template match="sect5info"></xsl:template> <xsl:template match="simplesect/title"></xsl:template> <xsl:template match="simplesect/subtitle"></xsl:template> <xsl:template match="simplesect/titleabbrev"></xsl:template> <!-- ==================================================================== --> <xsl:template name="section.heading"> <xsl:param name="section" select="."/> <xsl:param name="level" select="1"/> <xsl:param name="allow-anchors" select="1"/> <xsl:param name="title"/> <xsl:param name="class" select="'title'"/> <xsl:variable name="id"> <xsl:choose> <!-- if title is in an *info wrapper, get the grandparent --> <xsl:when test="contains(local-name(..), 'info')"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="../.."/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="object.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- HTML H level is one higher than section level --> <xsl:variable name="hlevel" select="$level + 1"/> <xsl:element name="h{$hlevel}"> <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute> <xsl:if test="$css.decoration != '0'"> <xsl:if test="$hlevel<3"> <xsl:attribute name="style">clear: both</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="$allow-anchors != 0"> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="$section"/> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> </xsl:if> <xsl:copy-of select="$title"/> </xsl:element> </xsl:template> <!-- ==================================================================== --> <xsl:template match="bridgehead"> <xsl:variable name="container" select="(ancestor::appendix |ancestor::article |ancestor::bibliography |ancestor::chapter |ancestor::glossary |ancestor::glossdiv |ancestor::index |ancestor::partintro |ancestor::preface |ancestor::refsect1 |ancestor::refsect2 |ancestor::refsect3 |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 |ancestor::section |ancestor::setindex |ancestor::simplesect)[last()]"/> <xsl:variable name="clevel"> <xsl:choose> <xsl:when test="local-name($container) = 'appendix' or local-name($container) = 'chapter' or local-name($container) = 'article' or local-name($container) = 'bibliography' or local-name($container) = 'glossary' or local-name($container) = 'index' or local-name($container) = 'partintro' or local-name($container) = 'preface' or local-name($container) = 'setindex'">1</xsl:when> <xsl:when test="local-name($container) = 'glossdiv'"> <xsl:value-of select="count(ancestor::glossdiv)+1"/> </xsl:when> <xsl:when test="local-name($container) = 'sect1' or local-name($container) = 'sect2' or local-name($container) = 'sect3' or local-name($container) = 'sect4' or local-name($container) = 'sect5' or local-name($container) = 'refsect1' or local-name($container) = 'refsect2' or local-name($container) = 'refsect3' or local-name($container) = 'section' or local-name($container) = 'simplesect'"> <xsl:variable name="slevel"> <xsl:call-template name="section.level"> <xsl:with-param name="node" select="$container"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$slevel + 1"/> </xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- HTML H level is one higher than section level --> <xsl:variable name="hlevel"> <xsl:choose> <xsl:when test="@renderas = 'sect1'">1</xsl:when> <xsl:when test="@renderas = 'sect2'">2</xsl:when> <xsl:when test="@renderas = 'sect3'">3</xsl:when> <xsl:when test="@renderas = 'sect4'">4</xsl:when> <xsl:when test="@renderas = 'sect5'">5</xsl:when> <xsl:otherwise> <xsl:value-of select="$clevel + 1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="h{$hlevel}"> <xsl:call-template name="anchor"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="section/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2"> <xsl:call-template name="section.subtitle"/> </xsl:template> <xsl:template name="section.subtitle"> <!-- the context node should be the subtitle of a section when called --> <xsl:variable name="section" select="(ancestor::section |ancestor::simplesect |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5)[last()]"/> <xsl:variable name="level"> <xsl:call-template name="section.level"> <xsl:with-param name="node" select="$section"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="section.heading"> <xsl:with-param name="section" select=".."/> <xsl:with-param name="allow-anchors" select="0"/> <!-- subtitle heading level one higher than section level --> <xsl:with-param name="level" select="$level + 1"/> <xsl:with-param name="class" select="'subtitle'"/> <xsl:with-param name="title"> <xsl:apply-templates select="$section" mode="object.subtitle.markup"> <xsl:with-param name="allow-anchors" select="0"/> </xsl:apply-templates> </xsl:with-param> </xsl:call-template> </xsl:template> </xsl:stylesheet> --- NEW FILE: chunkfast.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl"> <!-- ******************************************************************** $Id: chunkfast.xsl,v 1.1 2004/10/21 12:52:06 mikedoerfler 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:import href="chunk.xsl"/> <xsl:param name="chunk.fast" select="1"/> <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/> <!-- ==================================================================== --> <xsl:template name="process-chunk-element"> <xsl:choose> <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')"> <xsl:variable name="genid" select="generate-id()"/> <xsl:variable name="div" select="$chunks[@id=$genid]"/> <xsl:variable name="prevdiv" select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/> <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/> <xsl:variable name="nextdiv" select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/> <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/> <xsl:choose> <xsl:when test="$onechunk != 0 and parent::*"> <xsl:apply-imports/> </xsl:when> <xsl:otherwise> <xsl:call-template name="process-chunk"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$onechunk != 0 and not(parent::*)"> <xsl:call-template name="chunk-all-sections"/> </xsl:when> <xsl:when test="$onechunk != 0"> <xsl:apply-imports/> </xsl:when> <xsl:when test="$chunk.first.sections = 0"> <xsl:call-template name="chunk-first-section-with-parent"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="chunk-all-sections"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> --- NEW FILE: chunk-common.xsl --- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- ******************************************************************** $Id: chunk-common.xsl,v 1.1 2004/10/21 12:52:06 mikedoerfler 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="chunk"> <xsl:param name="node" select="."/> <!-- returns 1 if $node is a chunk --> [...966 lines suppressed...] </xsl:call-template> <xsl:call-template name="user.header.content"/> <xsl:copy-of select="$content"/> <xsl:call-template name="user.footer.content"/> <xsl:call-template name="footer.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> <xsl:call-template name="user.footer.navigation"/> </body> </html> </xsl:template> </xsl:stylesheet> --- NEW FILE: htmltbl.xsl --- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- ******************************************************************** $Id: htmltbl.xsl,v 1.1 2004/10/21 12:52:06 mikedoerfler Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==========... [truncated message content] |