cvs: php-gtk /docs/stylesheets/xsl/html toc.xsl

From: Date: Tue, 20 Mar 2001 20:37:48 +0000
Subject: cvs: php-gtk /docs/stylesheets/xsl/html toc.xsl
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-1020@lists.php.net to get a copy of this message
jmoore Tue Mar 20 12:37:48 2001 EDT Added files: /php-gtk/docs/stylesheets/xsl/html toc.xsl Log: Adding the TOC overrides Index: php-gtk/docs/stylesheets/xsl/html/toc.xsl +++ php-gtk/docs/stylesheets/xsl/html/toc.xsl <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: toc.xsl,v 1.1 2001/03/20 20:37:48 jmoore Exp $ ******************************************************************** --> <xsl:template name="division.toc"> <xsl:if test="$generate.division.toc != 0"> <xsl:variable name="nodes" select="part|reference|classset |preface|chapter|appendix |bibliography|glossary|index |refentry"/> <xsl:if test="$nodes"> <div class="toc"> <p> <b> <xsl:call-template name="gentext.element.name"> <xsl:with-param name="element.name">TableofContents</xsl:with-param> </xsl:call-template> </b> </p> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"/> </xsl:element> </div> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="component.toc"> <xsl:if test="$generate.component.toc != 0"> <xsl:variable name="nodes" select="section|sect1|refentry|classentry"/> <xsl:if test="$nodes"> <div class="toc"> <p> <b> <xsl:call-template name="gentext.element.name"> <xsl:with-param name="element.name">TableofContents</xsl:with-param> </xsl:call-template> </b> </p> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"/> </xsl:element> </div> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="section.toc"> <xsl:variable name="nodes" select="section|sect1|sect2|sect3|sect4|sect5|refentry|classentry"/> <xsl:if test="$nodes"> <div class="toc"> <p> <b> <xsl:call-template name="gentext.element.name"> <xsl:with-param name="element.name">TableofContents</xsl:with-param> </xsl:call-template> </b> </p> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"/> </xsl:element> </div> </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template match="book|setindex" mode="toc"> <xsl:variable name="nodes" select="part|reference |preface|chapter|appendix |bibliography|glossary|index |refentry|classset"/> <xsl:variable name="subtoc"> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates mode="toc" select="$nodes"/> </xsl:element> </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:apply-templates select="." mode="label.content"/> <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:apply-templates select="." mode="title.content"/> </a> <xsl:if test="$toc.listitem.type = 'li' and $toc.section.depth>0 and count($nodes)&gt;0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:element> <xsl:if test="$toc.listitem.type != 'li' and $toc.section.depth>0 and count($nodes)&gt;0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:template> <xsl:template match="part|reference|preface|chapter|appendix|classset" mode="toc"> <xsl:variable name="subtoc"> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="section|sect1|classsentry" mode="toc"/> </xsl:element> </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:apply-templates select="." mode="label.content"/> <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:apply-templates select="." mode="title.content"/> </a> <xsl:if test="$toc.listitem.type = 'li' and $toc.section.depth>0 and section|sect1"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:element> <xsl:if test="$toc.listitem.type != 'li' and $toc.section.depth>0 and section|sect1"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:template> <xsl:template match="classentry" mode="toc"> <xsl:variable name="classmeta" select=".//classmeta"/> <xsl:variable name="classentrytitle" select="$classmeta//classtitle"/> <xsl:variable name="title"> <xsl:apply-templates select="$classentrytitle[1]" mode="title"/> </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:element> </xsl:template> </xsl:stylesheet>

« previous php.gtk (#1020) next »