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
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' ) )/*" />
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__ </xsl:text>
19
<xsl:value-of select="briefdescription"/><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__; </xsl:text>
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__ </xsl:text>
30
<xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/>
32
</xsl:text><xsl:value-of select="briefdescription"/><xsl:text>
33
</xsl:text><xsl:value-of select="detaileddescription"/>
34
<xsl:text>__QuOtE__; </xsl:text>