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: Re: [docbook-apps] classsynposis and java annotations


Hello again,

>1. Using an annotation
>
>Example:
>
>Source
>@Copyright("Michael Fuchs")
>public String getVersion();
>
><methodsynopsis language="java">
>  <modifier>@Copyright(value="Michael Fuchs")</modifier>
>  <modifier>public</modifier>
>  <type>String</type>
>  <methodname>getVersion</methodname>
></methodsynopsis>
>
>The annotation could marked as modifier, but I think this is not
>satisfying.
>Additionally the annotation should be rendered in a single line.
>
>  
A temporary solution is to use the role "annotation":
<methodsynopsis language="java">
  <modifier role="annotation">@Copyright(value="Michael Fuchs")</modifier>
  <modifier>public</modifier>
  <type>String</type>
  <methodname>getVersion</methodname>
</methodsynopsis>

XSL:
  <xsl:template match="modifier" mode="java">
    <xsl:apply-templates mode="java"/>
    <xsl:choose>
      <xsl:when test="@role = 'annotation'">
        <xsl:text>&RE;&nbsp;&nbsp;</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>&nbsp;</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

>2. Defining an annotation
>
>What about a tag ooannotation similar to ooclass, oointerface and
>ooexception?
>
>
>3. By the way, does anybody know if it is possible to generate a more
>compact synopsis and get rid of all the blank lines?
Sorry! I now found the attribute-set monospace.verbatim.properties,
which controls the whitespace in the synopsis. 

<xsl:attribute-set name="monospace.verbatim.properties">

    <xsl:attribute name="space-before.minimum">0.3em</xsl:attribute>
    <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">0.3em</xsl:attribute>

    <xsl:attribute name="space-after.minimum">0.0em</xsl:attribute>
    <xsl:attribute name="space-after.optimum">0.0em</xsl:attribute>
    <xsl:attribute name="space-after.maximum">0.0em</xsl:attribute>

  </xsl:attribute-set>

Regards
Michael



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