goba Sat Feb 9 11:56:42 2002 EDT
Modified files:
/phpdoc/xsl htmlhelp.xsl.in
Log:
Solved infinite recursion with a template with unique mode :)
Use "./title" for printing out title without the generated text
parts, like "Chapter 1". Now the bottom seems to be good, except
that we need to generate "This page online" and text like this.
Index: phpdoc/xsl/htmlhelp.xsl.in
diff -u phpdoc/xsl/htmlhelp.xsl.in:1.6 phpdoc/xsl/htmlhelp.xsl.in:1.7
--- phpdoc/xsl/htmlhelp.xsl.in:1.6 Sat Feb 9 11:09:36 2002
+++ phpdoc/xsl/htmlhelp.xsl.in Sat Feb 9 11:56:42 2002
@@ -3,7 +3,7 @@
HTML Help specific stylesheet
- $Id: htmlhelp.xsl.in,v 1.6 2002/02/09 16:09:36 goba Exp $
+ $Id: htmlhelp.xsl.in,v 1.7 2002/02/09 16:56:42 goba Exp $
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -66,18 +66,14 @@
</xsl:call-template>
</xsl:attribute>
<xsl:text><< </xsl:text>
- <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+ <xsl:value-of select="$prev/title"/>
</a>
</xsl:if>
</td>
<td align="center">
- <!-- this is infinite resursion ;)
- <xsl:call-template name="path.to.this.page">
+ <xsl:apply-templates select="." mode="path.to.this.page">
<xsl:with-param name="actpage" select="true()"/>
- <xsl:with-param name="up" select="parent::*"/>
- </xsl:call-template>
- -->
- :: path to this page here ::
+ </xsl:apply-templates>
</td>
<td align="right">
<xsl:if test="count($next)>0">
@@ -87,7 +83,7 @@
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
- <xsl:apply-templates select="$next" mode="object.title.markup"/>
+ <xsl:value-of select="$next/title"/>
<xsl:text> >></xsl:text>
</a>
</xsl:if>
@@ -103,25 +99,24 @@
</table>
</xsl:template>
-<!-- Comment out infinite recursion for now
-<!- Try to figure out the path to this page from the main page ->
-<xsl:template name="path.to.this.page">
+<!-- Try to figure out the path to this page from the main page -->
+<xsl:template match="*" mode="path.to.this.page">
<xsl:param name="actpage" select="false()"/>
<xsl:variable name="up" select="parent::*"/>
- <!- Call this recursively for the parent ->
+ <!-- Call this recursively for the parent -->
<xsl:choose>
<xsl:when test="count($up)>0">
- <xsl:call-template name="path.to.this.page">
+ <xsl:apply-templates select="parent::*" mode="path.to.this.page">
<xsl:with-param name="actpage" select="false()"/>
- </xsl:call-template>
+ </xsl:apply-templates>
</xsl:when>
</xsl:choose>
- <!- Do not link if actual page, put " : " between links ->
+ <!-- Do not link if actual page, put " : " between links -->
<xsl:choose>
<xsl:when test="$actpage = true()">
- <xsl:apply-templates select="." mode="object.title.markup"/>
+ <xsl:value-of select="./title"/>
</xsl:when>
<xsl:otherwise>
<a>
@@ -130,12 +125,11 @@
<xsl:with-param name="object" select="."/>
</xsl:call-template>
</xsl:attribute>
- <xsl:apply-templates select="." mode="object.title.markup"/>
+ <xsl:value-of select="./title"/>
</a>
<xsl:text> : </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
--->
</xsl:stylesheet>