Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55370 - in trunk/tools/boostbook: test/doxygen/boost xsl/doxygen
From: daniel_james_at_[hidden]
Date: 2009-08-02 14:18:15


Author: danieljames
Date: 2009-08-02 14:18:14 EDT (Sun, 02 Aug 2009)
New Revision: 55370
URL: http://svn.boost.org/trac/boost/changeset/55370

Log:
Pass through more elements in doxygen2boostbook. Refs #3309.
Text files modified:
   trunk/tools/boostbook/test/doxygen/boost/example.hpp | 42 +++++++++++++++++++++++++++++++++++++++
   trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 21 +++++++++++++++----
   2 files changed, 57 insertions(+), 6 deletions(-)

Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp (original)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp 2009-08-02 14:18:14 EDT (Sun, 02 Aug 2009)
@@ -1,8 +1,20 @@
+/*!
+ \class example
+
+ \brief Documentation for class example (why isn't this working?)
+ */
+
+/*!
+ \def EXAMPLE
+
+ \brief Documentation for macro example
+ */
+
 int global_integer;
 static int global_static_integer;
 const int global_const_integer = 1;
 static const int global_static_const_integer = 2;
-enum global_enum { enumerator };
+enum global_enum { enumerator1 = 1, enumerator2 };
 
 namespace example
 {
@@ -43,7 +55,35 @@
         enum private_class_enum { enumerator3 };
     };
     
+ /**
+ * Test some doxygen markup
+ *
+ * Embedded docbook list:
+ *
+ * \xmlonly
+ * <orderedlist><listitem>1</listitem><listitem>2</listitem></orderedlist>
+ * \endxmlonly
+ *
+ * \a Special \b Bold \c Typewriter \e Italics \em emphasis \p parameter
+ *
+ * \arg Arg1 first argument.
+ * \arg Arg2 second argument.
+ *
+ * \li First list item.
+ * \li Second list item
+ *
+ * Line 1\n
+ * Line 2
+ *
+ * \code
+ * void foo() {}
+ * \endcode
+ *
+ */
+
     template <typename TypeParameter, int NonTypeParameter,
         typename TypeParameterWithDefault = int>
     struct example_template {};
 }
+
+#define EXAMPLE(m) The macro
\ No newline at end of file

Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl (original)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2009-08-02 14:18:14 EDT (Sun, 02 Aug 2009)
@@ -308,7 +308,7 @@
 
           <xsl:if test="initializer">
             <default>
- <xsl:apply-templates select="initializer" mode="passthrough"/>
+ <xsl:apply-templates select="initializer/*|initializer/text()" mode="passthrough"/>
             </default>
           </xsl:if>
 
@@ -1216,12 +1216,13 @@
     </xsl:if>
   </xsl:template>
 
- <xsl:template match="computeroutput|orderedlist|itemizedlist|listitem"
- mode="passthrough">
- <xsl:element name="{name(.)}">
+ <xsl:template match="*" mode="passthrough">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
       <xsl:apply-templates mode="passthrough"/>
- </xsl:element>
+ </xsl:copy>
   </xsl:template>
+
   <xsl:template match="parameterlist" mode="passthrough"/>
 
   <xsl:template match="bold" mode="passthrough">
@@ -1230,6 +1231,10 @@
     </emphasis>
   </xsl:template>
 
+ <xsl:template match="linebreak" mode="passthrough">
+ <sbr/>
+ </xsl:template>
+
   <xsl:template match="briefdescription" mode="passthrough">
     <xsl:if test="text()|*">
       <purpose>
@@ -1254,6 +1259,12 @@
     </xsl:if>
   </xsl:template>
 
+ <!-- Ignore ref elements for now, as there is a lot of documentation which
+ will have incorrect ref elements at the moment -->
+ <xsl:template match="ref" mode="passthrough">
+ <xsl:apply-templates mode="passthrough"/>
+ </xsl:template>
+
   <!-- Handle function clauses -->
   <xsl:template match="simplesect" mode="function-clauses">
     <xsl:if test="@kind='pre'">


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