forked from nRF24/RF24
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wikidoc.xslt
47 lines (45 loc) · 2.17 KB
/
wikidoc.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" standalone="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="//sectiondef[@kind='public-func']/memberdef[@kind='function']"/>
</xsl:template>
<xsl:template match="memberdef">
<!-- xsl:text>
=== </xsl:text><xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/><xsl:text> ===
</xsl:text -->
<xsl:text>
=== </xsl:text><xsl:value-of select="name"/><xsl:text> ===

</xsl:text>
<xsl:apply-templates select="briefdescription"/>
<xsl:if test="count(detaileddescription/para[not(./*)]) < 1">
<xsl:text>
</xsl:text>
</xsl:if>
<xsl:apply-templates select="detaileddescription"/>
</xsl:template>
<xsl:template match="briefdescription/para">''<xsl:value-of select="."/>''
</xsl:template>
<xsl:template match="detaileddescription/para/parameterlist">
Parameters:
<xsl:apply-templates select="parameteritem"/>
</xsl:template>
<xsl:template match="parameteritem">* ''<xsl:value-of select="parameternamelist/parametername"/>'':
<xsl:value-of select="parameterdescription/para"/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para[not(./*)]">
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/simplesect[@kind='return']/para">
Returns:
*
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/simplesect[@kind='warning']/para">
Warning:
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="detaileddescription/para/programlisting">
<xsl:text>
<pre>
</xsl:text>
<xsl:apply-templates select="codeline"/>
<xsl:text></pre>
</xsl:text>
</xsl:template>
<xsl:template match="codeline">
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>