Re: rendering of <optional>

From: Date: Mon, 12 Nov 2001 00:09:04 +0000
Subject: Re: rendering of <optional>
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969338710@lists.php.net to get a copy of this message
Jeroen van Wolffelaar wrote:
Compare the protos of: http://www.php.net/manual/en/function.mysql-query.php with http://www.php.net/manual/en/function.flock.php Both use the same way of specifying <optional>, i.e. like this:
     <paramdef>resource
      <parameter><optional>link_identifier</optional></parameter>
     </paramdef>
and
      <paramdef>int
       <parameter>
        <optional>wouldblock</optional>
       </parameter>
      </paramdef>
which is identical. How is it possible than that the proto's are: resource mysql_query (string query [, resource link_identifier]) vs. bool flock (int fp, int operation, int [wouldblock]) ? I don't get it... By the way, with my installation both are rendered like mysql, which is IMO correct.
we have two different uses of <optional> in the manual: for optional parameters and (in very few cases) for optional parts of a single parameter (see phpdoc/en/functions/mysql.xml:241, mysql_connect, 1st parameter for an alternative use) so the DSSSL code tries to identify "true optionals", that is <optional> as the only element in <parameter>, but gets confused by the additional whitespace i'm just playing with docbook 4 that has better support for function (and object (!)) documentation within the new <methodsynopsis> environment we have <methodparam> instead of <paramdef> which has a choice="opt" attribute that makes it pretty clear if a parameter is optional or not and eases stylesheet processing for the square brackets quite a bit i'll check in a converted version of all en/function files into the dev_docbook4 branch as soon as my conversion stylesheet realy works

« previous php.doc (#969338710) next »