cvs: phpdoc /xsl htmlhelp.xsl.in

From: Date: Mon, 11 Feb 2002 09:16:18 +0000
Subject: cvs: phpdoc /xsl htmlhelp.xsl.in
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969342230@lists.php.net to get a copy of this message
goba Mon Feb 11 04:16:18 2002 EDT Modified files: /phpdoc/xsl htmlhelp.xsl.in Log: So variable scope is quite a restricted thing in XSL (=> put this variable to the templates scope, so it is available to following siblings) Index: phpdoc/xsl/htmlhelp.xsl.in diff -u phpdoc/xsl/htmlhelp.xsl.in:1.21 phpdoc/xsl/htmlhelp.xsl.in:1.22 --- phpdoc/xsl/htmlhelp.xsl.in:1.21 Mon Feb 11 04:08:31 2002 +++ phpdoc/xsl/htmlhelp.xsl.in Mon Feb 11 04:16:17 2002 @@ -3,7 +3,7 @@ HTML Help specific stylesheet - $Id: htmlhelp.xsl.in,v 1.21 2002/02/11 09:08:31 goba Exp $ + $Id: htmlhelp.xsl.in,v 1.22 2002/02/11 09:16:17 goba Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" @@ -118,20 +118,24 @@ <xsl:variable name="up" select="parent::*"/> <!-- Call this recursively for the parent --> - <xsl:choose> - <xsl:when test="count($up)>0"> - <xsl:apply-templates select="parent::*" mode="path.to.this.page"> - <xsl:with-param name="actpage" select="false()"/> - </xsl:apply-templates> - <xsl:variable name="object.title"> - <xsl:apply-templates select="." mode="htmlhelp.object.title"/> - </xsl:variable> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="object.title" select="'Main'"/> - </xsl:otherwise> - </xsl:choose> + <xsl:if test="count($up)>0"> + <xsl:apply-templates select="parent::*" mode="path.to.this.page"> + <xsl:with-param name="actpage" select="false()"/> + </xsl:apply-templates> + </xsl:if> + <!-- Choose our own title, different from the default if this + is the main page --> + <xsl:variable name="object.title"> + <xsl:choose> + <xsl:when test="count($up)>0"> + <xsl:apply-templates select="." mode="htmlhelp.object.title"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'Main'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <!-- Do not link if actual page, put " : " between links --> <xsl:choose> @@ -170,10 +174,10 @@ <xsl:text disable-output-escaping="yes">&amp;raquo; </xsl:text> <xsl:choose> <xsl:when test="count(child::node())=0"> - <xsl:value-of select="@url"/> + <xsl:value-of select="@url"/> </xsl:when> <xsl:otherwise> - <xsl:apply-templates/> + <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </a> @@ -249,10 +253,10 @@ <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> <xsl:choose> - <xsl:when test="@columns"> - <xsl:value-of select="@columns"/> - </xsl:when> - <xsl:otherwise>1</xsl:otherwise> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template>

« previous php.doc (#969342230) next »