[PATCH 8/8] doc: remove redundant subtitles

Bill Spitzak spitzak at gmail.com
Fri Jan 2 18:29:22 PST 2015


Put the argument lists next to the event/message title, which I
think makes it a lot easier to understand, and remove redudant
"values" title from enumerations.
---
 doc/publican/protocol-to-docbook.xsl |   38 ++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/doc/publican/protocol-to-docbook.xsl b/doc/publican/protocol-to-docbook.xsl
index ca1308f..a886b7f 100644
--- a/doc/publican/protocol-to-docbook.xsl
+++ b/doc/publican/protocol-to-docbook.xsl
@@ -147,7 +147,7 @@
 </xsl:template>
 
 <!-- Request/event list -->
-<xsl:template match="request|event|enum">
+<xsl:template match="request|event">
   <section id="protocol-spec-{../@name}-{name()}-{@name}">
     <title>
       <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" />
@@ -155,23 +155,35 @@
         - <xsl:value-of select="description/@summary" />
       </xsl:if>
     </title>
-    <xsl:call-template name="break">
-      <xsl:with-param name="text" select="description" />
-    </xsl:call-template>
-    <xsl:if test="arg">
+    <para>
       <variablelist>
-        <title><xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> arguments</title>
         <xsl:apply-templates select="arg"/>
       </variablelist>
-    </xsl:if>
-    <xsl:if test="entry">
-      <variablelist>
-        <title><xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> values</title>
-          <xsl:apply-templates select="entry"/>
-      </variablelist>
-    </xsl:if>
+    </para>
+    <xsl:call-template name="break">
+      <xsl:with-param name="text" select="description" />
+    </xsl:call-template>
+  </section>
+</xsl:template>
+
+<!-- Enumeration -->
+<xsl:template match="enum">
+  <section id="protocol-spec-{../@name}-{name()}-{@name}">
+    <title>
+      <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" />
+      <xsl:if test="description/@summary">
+        - <xsl:value-of select="description/@summary" />
+      </xsl:if>
+    </title>
+    <xsl:call-template name="break">
+      <xsl:with-param name="text" select="description" />
+    </xsl:call-template>
+    <variablelist>
+      <xsl:apply-templates select="entry"/>
+    </variablelist>
   </section>
 </xsl:template>
+
 </xsl:stylesheet>
 
 <!-- vim: set expandtab shiftwidth=2: -->
-- 
1.7.9.5



More information about the wayland-devel mailing list