summaryrefslogtreecommitdiff
path: root/gnuradio-core/doc/xml-swig/swig.xsl
diff options
context:
space:
mode:
authorjcorgan2008-08-24 19:57:24 +0000
committerjcorgan2008-08-24 19:57:24 +0000
commit6f1b6b2982ea0ed7bdba025b3ed911111d6e8e7d (patch)
treebc98fee9125664ab030e26ddc9cfcb8d803880bc /gnuradio-core/doc/xml-swig/swig.xsl
parentd806988c37dcdc3e7b5cf161fdff63920961695c (diff)
downloadgnuradio-6f1b6b2982ea0ed7bdba025b3ed911111d6e8e7d.tar.gz
gnuradio-6f1b6b2982ea0ed7bdba025b3ed911111d6e8e7d.tar.bz2
gnuradio-6f1b6b2982ea0ed7bdba025b3ed911111d6e8e7d.zip
Fixup XML generation to avoid erroneous copying.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9399 221aa14e-8319-0410-a670-987f0aec2ac5
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>