Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86271 - in trunk/tools/boostbook: test/doxygen xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-10-12 16:09:10


Author: danieljames
Date: 2013-10-12 16:09:10 EDT (Sat, 12 Oct 2013)
New Revision: 86271
URL: http://svn.boost.org/trac/boost/changeset/86271

Log:
Add newlines to doxygen2boostbook output.

Hopefully this won't break anything, and will make it much easier to read the
intermediate files.

Text files modified:
   trunk/tools/boostbook/test/doxygen/autodoc.gold | 43 ++++++++++++++++++++++++++++++++++++---
   trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 28 ++++++++++++++++++++++++++
   2 files changed, 67 insertions(+), 4 deletions(-)

Modified: trunk/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- trunk/tools/boostbook/test/doxygen/autodoc.gold Sat Oct 12 16:08:37 2013 (r86270)
+++ trunk/tools/boostbook/test/doxygen/autodoc.gold 2013-10-12 16:09:10 EDT (Sat, 12 Oct 2013) (r86271)
@@ -1,5 +1,25 @@
 <?xml version="1.0" standalone="yes"?>
-<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp"><namespace name="example"><class name="example"><purpose>Documentation for class example. </purpose><class name="inner_class"><data-member name="x"><type>int</type></data-member></class><enum name="class_enum"><enumvalue name="enumerator"/></enum><typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef><typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef><typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef><typedef name="undocumented_type1"><type>short</type></typedef><typedef name="undocumented_type2"><type>double</type></typedef><data-member name="integer"><type>int</type></data-member><data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member><data-member name="const
_integer"><type>const int</type></data-member><data-member name="static_integer" specifiers="static"><type>int</type></data-member><data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member><method-group name="public member functions"><method name="virtual_method" cv=""><type>virtual int</type></method><method name="conversion-operator" cv="" specifiers="explicit"><type>int</type></method></method-group><constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor><copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment></class><struct name="example_template"><template>
+<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp">
+<namespace name="example">
+<class name="example"><purpose>Documentation for class example. </purpose><class name="inner_class"><data-member name="x"><type>int</type></data-member>
+</class><enum name="class_enum"><enumvalue name="enumerator"/></enum>
+<typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef>
+<typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef>
+<typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef>
+<typedef name="undocumented_type1"><type>short</type></typedef>
+<typedef name="undocumented_type2"><type>double</type></typedef>
+<data-member name="integer"><type>int</type></data-member>
+<data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member>
+<data-member name="const_integer"><type>const int</type></data-member>
+<data-member name="static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member>
+<method-group name="public member functions">
+<method name="virtual_method" cv=""><type>virtual int</type></method>
+<method name="conversion-operator" cv="" specifiers="explicit"><type>int</type></method>
+</method-group>
+<constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>
+<copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment>
+</class><struct name="example_template"><template>
       <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
       <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
       <template-type-parameter name="TypeParameterWithDefault"><default>int</default><purpose><para>This is a template parameter with a default argument </para></purpose></template-type-parameter>
@@ -21,13 +41,28 @@
       <template-type-parameter name="T"/>
     </template></struct><struct-specialization name="specialization_test"><template>
       <template-type-parameter name="T"/>
- </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions"/><constructor><description><para>A constructor. </para></description></constructor><destructor><description><para>A destructor. </para></description></destructor><copy-assignment cv=""><type><emphasis>unspecified</emphasis></type><parameter name=""><paramtype>const <classname>specialization_test</classname> &amp;</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment></struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum><data-member name="namespace_integer"><type>int</type></data-member><data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member><data-member name="namespace_const_integer"><type>const int</type></data-member><data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member><function name="namespace_func"><type>
int</type><parameter name="i"><paramtype>int</paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
+ </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions">
+</method-group>
+<constructor><description><para>A constructor. </para></description></constructor>
+<destructor><description><para>A destructor. </para></description></destructor>
+<copy-assignment cv=""><type><emphasis>unspecified</emphasis></type><parameter name=""><paramtype>const <classname>specialization_test</classname> &amp;</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment>
+</struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum>
+<data-member name="namespace_integer"><type>int</type></data-member>
+<data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member>
+<data-member name="namespace_const_integer"><type>const int</type></data-member>
+<data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member>
+<function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int</paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
 
 
 This is a test function. <classname alt="example::example">Link to class</classname> <classname alt="example::example_template">Link to class template</classname> <note><para>This is a note.</para></note>
 <para><emphasis role="bold">See Also:</emphasis><para><classname alt="example::example">example::example</classname> and <classname alt="example::example_template">example_template</classname> </para></para>
-</para></description><requires><para>i &gt; j</para></requires><returns><para>The answer </para></returns></function><function name="namespace_func_template"><type>void</type><template>
+</para></description><requires><para>i &gt; j</para></requires><returns><para>The answer </para></returns></function>
+<function name="namespace_func_template"><type>void</type><template>
           <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
           <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
         </template><description><para>Testing a function template.
-</para></description></function></namespace><macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro></header></library-reference>
\ No newline at end of file
+</para></description></function>
+</namespace>
+<macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro>
+</header>
+</library-reference>
\ No newline at end of file

Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl Sat Oct 12 16:08:37 2013 (r86270)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-10-12 16:09:10 EDT (Sat, 12 Oct 2013) (r86271)
@@ -202,6 +202,7 @@
         <xsl:attribute name="name">
           <xsl:value-of select="$name"/>
         </xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
         
         <xsl:apply-templates>
           <xsl:with-param name="with-namespace-refs"
@@ -209,6 +210,7 @@
           <xsl:with-param name="in-file" select="$in-file"/>
         </xsl:apply-templates>
       </namespace>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
     </xsl:if>
   </xsl:template>
 
@@ -301,6 +303,7 @@
         <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
         <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
       </enum>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
     </xsl:if>
   </xsl:template>
 
@@ -387,6 +390,7 @@
             <xsl:with-param name="header" select="location/attribute::file"/>
           </xsl:call-template>
         </xsl:attribute>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
         
         <xsl:if test="briefdescription/*|detaileddescription/*|inbodydescription/*">
           <xsl:apply-templates select="briefdescription/*" mode="passthrough"/>
@@ -400,6 +404,7 @@
           <xsl:with-param name="in-file" select="location/attribute::file"/>
         </xsl:apply-templates>
       </header>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
     </xsl:if>
   </xsl:template>
 
@@ -518,6 +523,7 @@
           <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
           <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
         </macro>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
       </xsl:when>
 
       <xsl:when test="@kind='function'">
@@ -717,29 +723,35 @@
       <xsl:when test="@kind='public-static-func'">
         <!-- TBD: pass on the fact that these are static functions -->
         <method-group name="public static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
           <xsl:apply-templates>
             <xsl:with-param name="in-section" select="true()"/>
             <xsl:with-param name="in-file" select="$in-file"/>
           </xsl:apply-templates>
         </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
       </xsl:when>
       <xsl:when test="@kind='protected-static-func'">
         <!-- TBD: pass on the fact that these are static functions -->
         <method-group name="protected static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
           <xsl:apply-templates>
             <xsl:with-param name="in-section" select="true()"/>
             <xsl:with-param name="in-file" select="$in-file"/>
           </xsl:apply-templates>
         </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
       </xsl:when>
       <xsl:when test="@kind='private-static-func'">
         <!-- TBD: pass on the fact that these are static functions -->
         <method-group name="private static functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
           <xsl:apply-templates>
             <xsl:with-param name="in-section" select="true()"/>
             <xsl:with-param name="in-file" select="$in-file"/>
           </xsl:apply-templates>
         </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
       </xsl:when>
       <xsl:when test="@kind='public-func'">
         <xsl:variable name="members" select="./memberdef"/>
@@ -750,21 +762,25 @@
         </xsl:variable>
         <xsl:if test="$num-internal-only &lt; count($members)">
           <method-group name="public member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
             <xsl:apply-templates>
               <xsl:with-param name="in-section" select="true()"/>
               <xsl:with-param name="in-file" select="$in-file"/>
             </xsl:apply-templates>
           </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
           <xsl:apply-templates/>
         </xsl:if>
       </xsl:when>
       <xsl:when test="@kind='protected-func'">
         <method-group name="protected member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
           <xsl:apply-templates>
             <xsl:with-param name="in-section" select="true()"/>
             <xsl:with-param name="in-file" select="$in-file"/>
           </xsl:apply-templates>
         </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
         <xsl:apply-templates/>
       </xsl:when>
       <xsl:when test="@kind='private-func'">
@@ -776,22 +792,26 @@
         </xsl:variable>
         <xsl:if test="$num-internal-only &lt; count($members)">
           <method-group name="private member functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
             <xsl:apply-templates>
               <xsl:with-param name="in-section" select="true()"/>
               <xsl:with-param name="in-file" select="$in-file"/>
             </xsl:apply-templates>
           </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
         </xsl:if>
         <xsl:apply-templates/>
       </xsl:when>
       <xsl:when test="@kind='friend'">
         <xsl:if test="./memberdef/detaileddescription/para or ./memberdef/briefdescription/para">
           <method-group name="friend functions">
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
             <xsl:apply-templates>
               <xsl:with-param name="in-section" select="true()"/>
               <xsl:with-param name="in-file" select="$in-file"/>
             </xsl:apply-templates>
           </method-group>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
         </xsl:if>
       </xsl:when>
       <xsl:when test="@kind='public-static-attrib' or @kind='public-attrib'">
@@ -968,6 +988,7 @@
         
         <type><xsl:apply-templates select="type"/></type>
       </typedef>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
     </xsl:if>
   </xsl:template>
 
@@ -1125,6 +1146,7 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:if>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Emit overload signatures -->
@@ -1178,6 +1200,7 @@
       </xsl:if>
       <xsl:call-template name="function.children"/>
     </constructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Handle Destructors -->
@@ -1185,6 +1208,7 @@
     <destructor>
       <xsl:call-template name="function.children"/>
     </destructor>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Handle Copy Assignment -->
@@ -1230,6 +1254,7 @@
 
       <xsl:call-template name="function.children"/>
     </copy-assignment>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Handle conversion operator -->
@@ -1272,6 +1297,7 @@
 
       <xsl:call-template name="function.children"/>
     </method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Handle methods -->
@@ -1319,6 +1345,7 @@
 
       <xsl:call-template name="function.children"/>
     </method>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
   </xsl:template>
 
   <!-- Handle member variables -->
@@ -1346,6 +1373,7 @@
       <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
       <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
     </data-member>
+ <xsl:text>&#10;</xsl:text><!-- Newline -->
     </xsl:if>
   </xsl:template>
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk