hholzgra Thu Jun 19 13:04:40 2003 EDT Modified files: /phpdoc/xsl common.xsl html-common.xsl Log: support for <initializer> tags in <methodparam> a parameter is now optional when marked with an choice='opt' attribute or when having a default value given (or both) Index: phpdoc/xsl/common.xsl diff -u phpdoc/xsl/common.xsl:1.8 phpdoc/xsl/common.xsl:1.9 --- phpdoc/xsl/common.xsl:1.8 Sun Apr 27 13:06:09 2003 +++ phpdoc/xsl/common.xsl Thu Jun 19 13:04:39 2003 @@ -55,7 +55,7 @@ <xsl:template match="methodparam"> <xsl:if test="preceding-sibling::methodparam=false()"> <xsl:text> (</xsl:text> - <xsl:if test="@choice='opt'"> + <xsl:if test="@choice='opt' or initializer"> <xsl:text>[</xsl:text> </xsl:if> </xsl:if> @@ -63,7 +63,7 @@ <xsl:choose> <xsl:when test="following-sibling::methodparam"> <xsl:choose> - <xsl:when test="following-sibling::methodparam[position()=1]/attribute::choice[.='opt']"> + <xsl:when test="following-sibling::methodparam[position()=1]/attribute::choice[.='opt'] or following-sibling::methodparam[position()=1]/initializer"> <xsl:text> [, </xsl:text> </xsl:when> <xsl:otherwise> @@ -72,10 +72,12 @@ </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:for-each select="preceding-sibling::methodparam/attribute::choice[.='opt']"> - <xsl:text>]</xsl:text> + <xsl:for-each select="preceding-sibling::methodparam"> + <xsl:if test="attribute::choice[.='opt'] or initializer"> + <xsl:text>]</xsl:text> + </xsl:if> </xsl:for-each> - <xsl:if test="self::methodparam/attribute::choice[.='opt']"> + <xsl:if test="self::methodparam/attribute::choice[.='opt'] or self::methodparam/initializer"> <xsl:text>]</xsl:text> </xsl:if> <xsl:text>)</xsl:text> Index: phpdoc/xsl/html-common.xsl diff -u phpdoc/xsl/html-common.xsl:1.26 phpdoc/xsl/html-common.xsl:1.27 --- phpdoc/xsl/html-common.xsl:1.26 Wed Jun 4 15:43:32 2003 +++ phpdoc/xsl/html-common.xsl Thu Jun 19 13:04:39 2003 @@ -3,7 +3,7 @@ html-common.xsl: Common HTML customizations - $Id: html-common.xsl,v 1.26 2003/06/04 19:43:32 tom Exp $ + $Id: html-common.xsl,v 1.27 2003/06/19 17:04:39 hholzgra Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" @@ -195,6 +195,12 @@ <!-- METHODNAMES are bold like in DSSSL --> <xsl:template match="methodsynopsis/methodname"> <b><xsl:apply-templates/></b> +</xsl:template> + +<!-- METHODPARAM default values are bold like in DSSSL --> +<xsl:template match="methodparam/initializer"> + <xsl:text>=</xsl:text> + <i><xsl:apply-templates/></i> </xsl:template> <!-- We need a newline after methodsynopsis, as we have
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php