Imported Upstream version 3.0.4
[debian/gnuradio] / gnuradio-core / doc / xml / swig.xsl
1 <!-- XSLT script to extract document for class/function for swig docstring
2      If you have xsltproc you could use:
3      xsltproc swig.xsl index.xml > swig_doc.i
4 -->
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
6   <xsl:output method="text"/>
7    <xsl:template match="/">
8       <!-- process each compound -->
9       <xsl:for-each select="doxygenindex/compound">
10         <xsl:apply-templates select="document( concat( @refid, '.xml' ) )/*" />
11       </xsl:for-each>
12    </xsl:template>
13
14   <xsl:template match="doxygen">
15     <xsl:for-each select="compounddef[@kind='class']">  
16       <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text>
17       <xsl:value-of select="compoundname"/>
18       <xsl:text> __QuOtE__ &#10;</xsl:text>
19       <xsl:value-of select="briefdescription"/><xsl:text>
20       </xsl:text>
21       <xsl:value-of select="detaileddescription"/>
22       <xsl:text> see also: </xsl:text>
23       <xsl:value-of select="includes"/>
24       <xsl:text>__QuOtE__;&#10;&#10;</xsl:text>
25
26       <!-- output for each function individually -->
27       <xsl:for-each select="*/memberdef[@kind='function' and not(starts-with(name,'operator'))]"> 
28         <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text><xsl:value-of select="../../compoundname"/>::<xsl:value-of select="name"/>
29         <xsl:text> __QuOtE__&#10;</xsl:text>
30         <xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/>
31         <xsl:text>
32         </xsl:text><xsl:value-of select="briefdescription"/><xsl:text>
33         </xsl:text><xsl:value-of select="detaileddescription"/>
34         <xsl:text>__QuOtE__; &#10;&#10;</xsl:text>
35       </xsl:for-each>
36     </xsl:for-each>  
37   </xsl:template>
38 </xsl:stylesheet>