$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r49459 - trunk/tools/boostbook/xsl
From: eric_at_[hidden]
Date: 2008-10-26 16:24:59
Author: eric_niebler
Date: 2008-10-26 16:24:59 EDT (Sun, 26 Oct 2008)
New Revision: 49459
URL: http://svn.boost.org/trac/boost/changeset/49459
Log:
give data members with <purpose> in synopses the same treatment as functions and typedefs
Text files modified: 
   trunk/tools/boostbook/xsl/type.xsl |    56 +++++++++++++++++++++++++-------------- 
   1 files changed, 36 insertions(+), 20 deletions(-)
Modified: trunk/tools/boostbook/xsl/type.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/type.xsl	(original)
+++ trunk/tools/boostbook/xsl/type.xsl	2008-10-26 16:24:59 EDT (Sun, 26 Oct 2008)
@@ -1133,29 +1133,29 @@
                       ancestor::struct|ancestor::struct-specialization|
                       ancestor::union|ancestor::union-specialization">
 
-    <!-- Spacing -->
-    <xsl:if
-      test="not(local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() > 1)">
-      <xsl:text>
</xsl:text>
-    </xsl:if>
+        <!-- Spacing -->
+        <xsl:if
+          test="not(local-name(preceding-sibling::*[position()=1])=local-name(.)) and (position() > 1)">
+          <xsl:text>
</xsl:text>
+        </xsl:if>
 
-    <!-- Indent -->
-    <xsl:text>
</xsl:text>
-    <xsl:call-template name="indent">
-      <xsl:with-param name="indentation" select="$indentation"/>
-    </xsl:call-template>
+        <!-- Indent -->
+        <xsl:text>
</xsl:text>
+        <xsl:call-template name="indent">
+          <xsl:with-param name="indentation" select="$indentation"/>
+        </xsl:call-template>
 
-    <xsl:if test="@specifiers">
-      <xsl:call-template name="highlight-keyword">
-        <xsl:with-param name="keyword" select="@specifiers"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-    </xsl:if>
+        <xsl:if test="@specifiers">
+          <xsl:call-template name="highlight-keyword">
+            <xsl:with-param name="keyword" select="@specifiers"/>
+          </xsl:call-template>
+          <xsl:text> </xsl:text>
+        </xsl:if>
 
-    <xsl:apply-templates select="type" mode="highlight"/>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="@name"/>
-    <xsl:text>;</xsl:text>
+        <xsl:apply-templates select="type" mode="highlight"/>
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>;</xsl:text>
 
       </xsl:when>
       <xsl:otherwise>
@@ -1164,6 +1164,22 @@
        </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
+
+    <!-- If there is a <purpose>, then add it as an
+         inline comment immediately following the data
+         member definition in the synopsis -->
+    <xsl:if test="purpose">
+      <xsl:call-template name="indent">
+        <xsl:with-param name="indentation" select="$indentation"/>
+      </xsl:call-template>
+      <xsl:call-template name="highlight-comment">
+        <xsl:with-param name="text">
+          <xsl:text>// </xsl:text>
+          <xsl:apply-templates select="purpose/*|purpose/text()"
+            mode="purpose"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:if>
   </xsl:template>
 
   <!-- Data member reference -->