Add newlines to doxygen2boostbook output.

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

[SVN r86271]
This commit is contained in:
Daniel James 2013-10-12 20:09:10 +00:00
parent 84603bfb06
commit e3d710413a
2 changed files with 67 additions and 4 deletions

View File

@ -1,5 +1,25 @@
<?xml version="1.0" standalone="yes"?> <?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-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-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> <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 @@ Line 1<sbr/>
<template-type-parameter name="T"/> <template-type-parameter name="T"/>
</template></struct><struct-specialization name="specialization_test"><template> </template></struct><struct-specialization name="specialization_test"><template>
<template-type-parameter name="T"/> <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> 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><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-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-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. </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> </para></description></function>
</namespace>
<macro name="EXAMPLE" kind="functionlike"><macro-parameter name="m"/><purpose>Documentation for macro example. </purpose></macro>
</header>
</library-reference>

View File

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