This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Independent methodsynopsis elements
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Independent methodsynopsis elements
- From: Elliotte Rusty Harold <elharo at metalab dot unc dot edu>
- Date: Wed, 25 Jul 2001 12:57:31 -0700
Docbook 4.1.2 allows a methodsynopsis element to appear outside a
classsynopsis. I think this is a good thing. It models the way I write.
Very often I want to provide a method signature without listing
everything in the class. For example,
<para>
Suppose you want to invoke the
<methodname>getQuote()</methodname> method
in the program running at the URL
http://stocks.cafeconleche.org/quotes.cgi. This method takes as an
argument a string containing a stock quote and returns a double
containing the current price of the stock. That is, in Java
parlance its signature looks like this:
</para>
<methodsynopsis>
<modifier>public</modifier>
<modifier>static</modifier>
<type>double</type>
<methodname>getQuote</methodname>
<methodparam>
<type>String</type>
<parameter>symbol</parameter>
</methodparam>
</methodsynopsis>
However, unlike classsynopsis, the methodsynospis element does not have
a lnaguage attribute. Thus it's difficult to say that the the method is
a Java method, a C++ method, a Python method, or something else. This
causes problems for the Docbook XSL stylesheets, which seem to expect
that all methods will be tagged with a language from the classsynopsis
parent element. It seems to me that the methodsynopsis element really
needs the option to have its own language attribute.
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org