This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Independent methodsynopsis elements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]