OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Grouping methodparams.


Hi.

I am using methodsynopsis and have some parameters which are optional.

But, there is a pair of parameters that have to go together.

e.g. function(param1 [, param2 [, param3, param 4]])

Here params 3 and 4 are to the function, but must both be present.
Either 1, 2 or 4 params. Never 3 params.

By using choice="opt" on the methodparam, I can mark the parameters
individually, but not as a group.

Is there any way of doing this that I'm missing?

If not, then is it possible to introduce a new tag - methodparamgroup.

I could then ...

<methodsynopsis>
      <type>string</type>
      <methodname>number_format</methodname>
      <methodparam>
              <type>float</type>
              <parameter>number</parameter>
      </methodparam>
      <methodparamgroup choice="opt">
              <methodparam>
                      <type>int</type>
                      <parameter>decimals</parameter>
              </methodparam>
              <methodparamgroup choice="opt">
                      <methodparam>
                              <type>string</type>
                              <parameter>dec_point</parameter>
                      </methodparam>
                      <methodparam>
                              <type>string</type>
                              <parameter>thousands_sep</parameter>
                      </methodparam>
              </methodparamgroup>
      </methodparamgroup>
</methodsynopsis>

This would allow me to have 1, 2 or 4 parameters (which is what I want).

I would like the methodparamgroup to support both the choice and the
rep attributes and contain only methodparams and methodparamgroups.

I suspect that this mechanism may be useful in other groupings
(cmdsynoposis, funcsynopsis, etc.) and the name of methodparamgroup
may need to be changed. That's fine, it is the mechanism and not the
tag I'm after.

Any ideas? Have I missed something?

Regards,

Richard.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]