techtonik Fri Nov 19 06:06:06 2004 EDT
Modified files:
/phpdoc/xsl common.xsl
Log:
::__ and ->__ should be compressed to one minus sign
http://cvs.php.net/diff.php/phpdoc/xsl/common.xsl?r1=1.24&r2=1.25&ty=u
Index: phpdoc/xsl/common.xsl
diff -u phpdoc/xsl/common.xsl:1.24 phpdoc/xsl/common.xsl:1.25
--- phpdoc/xsl/common.xsl:1.24 Sun Nov 14 11:18:42 2004
+++ phpdoc/xsl/common.xsl Fri Nov 19 06:06:06 2004
@@ -3,7 +3,7 @@
common.xsl: Common customizations for all HTML formats
- $Id: common.xsl,v 1.24 2004/11/14 16:18:42 techtonik Exp $
+ $Id: common.xsl,v 1.25 2004/11/19 11:06:06 techtonik Exp $
What is done in this stylesheet as common to all HTML output formats:
@@ -379,21 +379,36 @@
</b>
</xsl:variable>
- <!-- replace '->' and '::' in method references with '-' -->
+ <!-- replace '->', '::', '->__' and '::__' in method name with one minus
+ sign '-' to proceed with transformation from name to ID -->
<xsl:variable name="argument">
- <xsl:choose>
- <xsl:when test="contains(current(), '->')">
- <xsl:value-of select="concat(substring-before(current(), '->'), '-',
- substring-after(current(), '->'))"/>
- </xsl:when>
- <xsl:when test="contains(current(), '::')">
- <xsl:value-of select="concat(substring-before(current(), '::'), '-',
- substring-after(current(), '::'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="string(current())"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="token">
+ <xsl:choose>
+ <xsl:when test="contains(current(), '->__')">
+ <xsl:value-of select="'->__'"/>
+ </xsl:when>
+ <xsl:when test="contains(current(), '::__')">
+ <xsl:value-of select="'::__'"/>
+ </xsl:when>
+ <xsl:when test="contains(current(), '->')">
+ <xsl:value-of select="'->'"/>
+ </xsl:when>
+ <xsl:when test="contains(current(), '::')">
+ <xsl:value-of select="'::'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="false()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="$token">
+ <xsl:value-of select="concat(substring-before(current(), $token), '-',
+ substring-after(current(), $token))"/>
+ </xsl:if>
+ <xsl:if test="not ($token)">
+ <xsl:value-of select="string(current())"/>
+ </xsl:if>
</xsl:variable>
<xsl:variable name="function.href">