[PATCH 6/8] doc: compress the lists in the protocol docs some

Derek Foreman derekf at osg.samsung.com
Wed Jan 21 08:17:54 PST 2015


On 02/01/15 08:29 PM, Bill Spitzak wrote:
> Use simpara to remove the blank lines, and put the type/value and
> the comment into the same line.
> ---
>  doc/publican/protocol-to-docbook.xsl |   30 +++++++++++++++++++++---------
>  1 file changed, 21 insertions(+), 9 deletions(-)
> 
> diff --git a/doc/publican/protocol-to-docbook.xsl b/doc/publican/protocol-to-docbook.xsl
> index 354ff3a..723f5e6 100644
> --- a/doc/publican/protocol-to-docbook.xsl
> +++ b/doc/publican/protocol-to-docbook.xsl
> @@ -81,20 +81,32 @@
>    </section>
>  </xsl:template>
>  
> -<!-- table contents for request/event arguments or enum values -->
> -<xsl:template match="arg|entry">
> +<!-- table contents for enum values -->
> +<xsl:template match="entry">
>    <varlistentry>
>      <term><xsl:value-of select="@name"/></term>
>      <listitem>
> -        <xsl:if test="name() = 'arg'" >
> -          <para>Type: <xsl:value-of select="@type"/></para>
> -        </xsl:if>
> -        <xsl:if test="name() = 'entry'" >
> -          <para>Value: <xsl:value-of select="@value"/></para>
> -        </xsl:if>
> +      <simpara>
> +        (<xsl:value-of select="@value"/>)
>          <xsl:if test="@summary" >
> -          <para><xsl:value-of select="@summary"/></para>
> +          <xsl:value-of select="@summary"/>
>          </xsl:if>
> +      </simpara>
> +    </listitem>
> +  </varlistentry>
> +</xsl:template>
> +
> +<!-- table contents for request/event arguments -->
> +<xsl:template match="arg">
> +  <varlistentry>
> +    <term><xsl:value-of select="@name"/></term>
> +    <listitem>
> +        <simpara>
> +          <xsl:value-of select="@type"/>
> +          <xsl:if test="@summary" >
> +            <xsl:text> </xsl:text><xsl:value-of select="@summary"/>
> +          </xsl:if>
> +        </simpara>
>      </listitem>
>    </varlistentry>
>  </xsl:template>
> 

I generally like the end result of this, but I don't really like the way
summary is jammed up against type (when summary exists):
name
  uint unique name for the object

I think it might be better with a - or with summary in ().  However, I
think that's a fairly minor complaint.

enums are much nicer than before, imho.

Reviewed-by: Derek Foreman <derekf at osg.samsung.com>



More information about the wayland-devel mailing list