summaryrefslogtreecommitdiff
path: root/gnuradio-core/doc/xml-swig/swig.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/doc/xml-swig/swig.xsl')
-rw-r--r--gnuradio-core/doc/xml-swig/swig.xsl38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnuradio-core/doc/xml-swig/swig.xsl b/gnuradio-core/doc/xml-swig/swig.xsl
new file mode 100644
index 000000000..6163c2d9f
--- /dev/null
+++ b/gnuradio-core/doc/xml-swig/swig.xsl
@@ -0,0 +1,38 @@
+<!-- XSLT script to extract document for class/function for swig docstring
+ If you have xsltproc you could use:
+ xsltproc swig.xsl index.xml > swig_doc.i
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="text"/>
+ <xsl:template match="/">
+ <!-- process each compound -->
+ <xsl:for-each select="doxygenindex/compound">
+ <xsl:apply-templates select="document( concat( @refid, '.xml' ) )/*" />
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="doxygen">
+ <xsl:for-each select="compounddef[@kind='class']">
+ <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text>
+ <xsl:value-of select="compoundname"/>
+ <xsl:text> __QuOtE__ &#10;</xsl:text>
+ <xsl:value-of select="briefdescription"/><xsl:text>
+ </xsl:text>
+ <xsl:value-of select="detaileddescription"/>
+ <xsl:text> see also: </xsl:text>
+ <xsl:value-of select="includes"/>
+ <xsl:text>__QuOtE__;&#10;&#10;</xsl:text>
+
+ <!-- output for each function individually -->
+ <xsl:for-each select="*/memberdef[@kind='function' and not(starts-with(name,'operator'))]">
+ <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text><xsl:value-of select="../../compoundname"/>::<xsl:value-of select="name"/>
+ <xsl:text> __QuOtE__&#10;</xsl:text>
+ <xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/>
+ <xsl:text>
+ </xsl:text><xsl:value-of select="briefdescription"/><xsl:text>
+ </xsl:text><xsl:value-of select="detaileddescription"/>
+ <xsl:text>__QuOtE__; &#10;&#10;</xsl:text>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>