root/src/modules/module.xsl

Revision 27a24a1299993c406f04ffa643b95fa8b14705bc, 2.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 6 years ago)

integrate the framework for docs... snmp docs

  • Property mode set to 100644
Line 
1 <xsl:stylesheet version="1.0"
2                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:template match="parameter" name="configparams">
5   <variablelist>
6     <varlistentry><term><xsl:value-of select="@name"/></term>
7       <listitem>
8         <variablelist>
9           <varlistentry><term>required</term><listitem><para><xsl:value-of select="@required"/></para></listitem></varlistentry>
10           <xsl:if test="@default">
11           <varlistentry><term>default</term><listitem><para>
12             <xsl:value-of select="@default"/>
13             </para></listitem></varlistentry>
14           </xsl:if>
15           <varlistentry><term>allowed</term><listitem><para><xsl:value-of select="@allowed"/></para></listitem></varlistentry>
16         </variablelist>
17       <para>
18         <xsl:value-of select="." />
19       </para>
20       </listitem>
21     </varlistentry>
22   </variablelist>
23 </xsl:template>
24
25 <xsl:template match="/">
26   <section>
27     <title><xsl:value-of select="module/name"/></title>
28     <para>
29       <xsl:value-of select="module/description"/>
30     </para>
31
32     <variablelist>
33       <varlistentry><term>loader</term><listitem><para><xsl:value-of select="module/loader"/></para></listitem></varlistentry>
34       <xsl:if test="module/image">
35       <varlistentry><term>image</term><listitem><para><xsl:value-of select="module/image"/></para></listitem></varlistentry>
36       </xsl:if>
37       <xsl:if test="module/object">
38       <varlistentry><term>object</term><listitem><para><xsl:value-of select="module/object"/></para></listitem></varlistentry>
39       </xsl:if>
40     </variablelist>
41
42   <section>
43     <title>Module Configuration</title>
44     <xsl:for-each select="module/moduleconfig/parameter">
45       <xsl:call-template name="configparams" />
46     </xsl:for-each>
47   </section>
48
49   <section>
50     <title>Check Configuration</title>
51     <xsl:for-each select="module/checkconfig/parameter">
52       <xsl:call-template name="configparams" />
53     </xsl:for-each>
54   </section>
55
56   <xsl:for-each select="module/examples/example">
57     <xsl:copy-of select="."/>
58   </xsl:for-each>
59   </section>
60 </xsl:template>
61 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.