Hi,
the following only deals with a minor formatting issue, which
nevertheless disturbs me for quite a while.
I suggest changing the method synopsis formatting in the docs from
(example; note the whitespace around the first parenthesis):
mixed array_search ( mixed needle, array haystack [, bool strict])
to some PEAR coding standards conform:
(1)
mixed array_search(mixed needle, array haystack [, bool strict])
or a maybe better readable:
(2)
mixed array_search (mixed needle, array haystack [, bool strict])
I'd still prefer the first proposal. Opinions? Please comment, I won't
commit this without some backing as it will change the overall look of
php.net/manual.
Below my current cvs diff which (hopefully) implements (1); did I miss
something?
Regards,
Horst Schirmeier
--
PGP-Key 0xD40E0E7A
Index: dsssl/common.dsl.in
===================================================================
RCS file: /repository/phpdoc/dsssl/common.dsl.in,v
retrieving revision 1.11
diff -u -r1.11 common.dsl.in
--- dsssl/common.dsl.in 31 Aug 2004 22:21:49 -0000 1.11
+++ dsssl/common.dsl.in 8 Jan 2005 01:51:01 -0000
@@ -206,7 +206,7 @@
($bold-seq$
(process-children-trim)
)
- (literal " ( ") ;; start parameter list
+ (literal "(") ;; start parameter list
)
)
@@ -215,7 +215,7 @@
($bold-seq$
(process-children-trim)
)
- (literal " ( ") ;; start parameter list
+ (literal "(") ;; start parameter list
)
)
Index: xsl/common.xsl
===================================================================
RCS file: /repository/phpdoc/xsl/common.xsl,v
retrieving revision 1.26
diff -u -r1.26 common.xsl
--- xsl/common.xsl 21 Nov 2004 21:13:48 -0000 1.26
+++ xsl/common.xsl 8 Jan 2005 01:51:04 -0000
@@ -80,7 +80,7 @@
<!-- Rendering of METHODSYNOPSIS. The output of this should look like:
- int preg_match_all ( string pattern, string subject, array matches [, int
flags])
+ int preg_match_all(string pattern, string subject, array matches [, int
flags])
working from a structure like this:
@@ -110,7 +110,7 @@
</xsl:template>
<xsl:template match="methodsynopsis/void">
- <xsl:text> ( void )</xsl:text>
+ <xsl:text>(void)</xsl:text>
</xsl:template>
<xsl:template match="methodsynopsis/methodname">
@@ -133,7 +133,7 @@
<xsl:template match="methodparam">
<xsl:if test="preceding-sibling::methodparam=false()">
- <xsl:text> ( </xsl:text>
+ <xsl:text>(</xsl:text>
<xsl:if test="@choice='opt'">
<xsl:text>[</xsl:text>
</xsl:if>
@@ -159,7 +159,7 @@
<xsl:if test="self::methodparam/@choice='opt'">
<xsl:text>]</xsl:text>
</xsl:if>
- <xsl:text> )</xsl:text>
+ <xsl:text>)</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Index: xsl/htmlhelp.xsl
===================================================================
RCS file: /repository/phpdoc/xsl/htmlhelp.xsl,v
retrieving revision 1.18
diff -u -r1.18 htmlhelp.xsl
--- xsl/htmlhelp.xsl 14 Nov 2004 14:28:25 -0000 1.18
+++ xsl/htmlhelp.xsl 8 Jan 2005 01:51:04 -0000
@@ -625,7 +625,7 @@
<!-- Rendering of METHODSYNOPSIS with span tags. The output of this should
look like:
- int preg_match_all ( string pattern, string subject, array matches [, int
flags])
+ int preg_match_all(string pattern, string subject, array matches [, int
flags])
working from a structure like this:
@@ -649,12 +649,12 @@
<span class="funcname">
<xsl:value-of select="./methodname/text()"/>
</span>
- <xsl:text> ( </xsl:text>
+ <xsl:text>(</xsl:text>
<xsl:apply-templates select="./methodparam" mode="php"/>
<xsl:for-each select="./[EMAIL PROTECTED] = 'opt']">
<xsl:text>]</xsl:text>
</xsl:for-each>
- <xsl:text> )</xsl:text>
+ <xsl:text>)</xsl:text>
</div>
</xsl:template>