techtonik Sun Nov 14 12:36:11 2004 EDT
Modified files:
/phpdoc/xsl quickref.xsl
Log:
production release
[add] parameter to sort quickreference alphabetically regardless of case
http://cvs.php.net/diff.php/phpdoc/xsl/quickref.xsl?r1=1.2&r2=1.3&ty=u
Index: phpdoc/xsl/quickref.xsl
diff -u phpdoc/xsl/quickref.xsl:1.2 phpdoc/xsl/quickref.xsl:1.3
--- phpdoc/xsl/quickref.xsl:1.2 Sun Nov 14 12:34:27 2004
+++ phpdoc/xsl/quickref.xsl Sun Nov 14 12:36:11 2004
@@ -3,20 +3,37 @@
quickref.xsl: Stylesheet for generating quick-reference
- $Id: quickref.xsl,v 1.2 2004/11/14 17:34:27 techtonik Exp $
+ $Id: quickref.xsl,v 1.3 2004/11/14 17:36:11 techtonik Exp $
-->
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
+<xsl:param name="sortbycase" select="0"/>
+
<xsl:template match="*"/>
<xsl:template match="/">
- <xsl:apply-templates select="//refnamediv">
- <xsl:sort select="refname"/>
- </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="$sortbycase">
+ <xsl:apply-templates select="//refnamediv">
+ <xsl:sort select="refname"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="//refnamediv">
+ <xsl:sort select="translate(refname,&lowercase;,&uppercase;)"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="refnamediv">