Question

Does the DocBook standard contain any elements that are equivalent to the JavaDoc @since tag?

I'm specifically trying to do this in a "refentry" element, but nothing seems appropriate.

Was it helpful?

Solution

I'm quite certain that there is no semantic equivalent of the Javadoc @since tag. DocBook's <refentry> is modeled on man pages, and there is no specific markup for this purpose in groff (man macros) either, AFAIK. For example, The mmap man page has several "since" annotations that are simply included as follows in the groff source:

.BR MAP_32BIT " (since Linux 2.4.20, 2.6)"

dbdoclet is tool that converts Javadoc to DocBook XML. For a class that has a @since tag in its top-level documentation comment, it outputs markup like this:

<variablelist>
    <varlistentry>
      <term><emphasis>Since</emphasis></term>
      <listitem>
        <para><simplelist type="inline"><member>January 8, 2014</member></simplelist></para>
      </listitem>
    </varlistentry>
</variablelist>

There is nothing "wrong" with this, but it is rather verbose.


I suggest keeping it simple. Just add the "since" information to whatever markup container that seems appropriate. For example:

  • The title of a refsection:

    <refsection>
       <title>TITLE HERE (since release X.Y.Z)</title>
        ...
    </refsection> 
    
  • A paragraph (perhaps with a role attribute):

    <para role="since">Since release X.Y.Z</para>
    

OTHER TIPS

Maybe the tag revhistory with sub tag revision, can be used for it.

Below a small example to capture the idea:

<section  title="Section with history information">
  <revhistory>
    <revision>
      <revnumber>0.9</revnumber>
      <date>1996-12-11</date>
    </revision>
  </revhistory>

  <para>
    <revhistory>
      <revision>
        <revnumber>0.8</revnumber>
        <date>1996-11-11</date>
      </revision>
    </revhistory>
    This paragraph has it's own revision history.
  </para>
</section>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top