1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns="http://www.w3.org/1999/xhtml"
6 <xsl:output method="xml"
8 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
9 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
11 <xsl:param name="confdir"/>
13 <xsl:template match="/">
15 <xsl:apply-templates/>
19 <xsl:template match="database">
21 <title>The <xsl:value-of select="$confdir"/> directory</title>
22 <link rel="stylesheet" title="gras" type="text/css" href="configuration-lsd.css"></link>
23 <link rel="stylesheet" title="gras1" type="text/css" href="configuration-lsd1.css"></link>
24 <link rel="stylesheet" title="flower" type="text/css" href="configuration-flower.css"></link>
25 <link rel="stylesheet" title="boring" type="text/css" href="configuration.css"></link>
28 <h1>The content of the <xsl:value-of select="$confdir"/> directory</h1>
31 <xsl:call-template name="collection">
32 <xsl:with-param name="thisdir"><xsl:value-of select="$confdir"/></xsl:with-param>
38 <xsl:template name="collection">
39 <xsl:param name="thisdir"/>
41 <xsl:when test="count(scalar) + count(link) + count(program) + count(data) + count(hash) + count(list) + count(boolean) > 0">
43 <xsl:call-template name="dir-iterate">
44 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
49 <xsl:call-template name="dir-iterate">
50 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
56 <xsl:template name="dir-iterate">
57 <xsl:param name="thisdir"/>
58 <xsl:apply-templates select="scalar|link|program|data|hash|list|boolean">
59 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
60 <xsl:sort select="@name"/>
61 </xsl:apply-templates>
63 <xsl:apply-templates select="collection">
64 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
65 <xsl:sort select="@name"/>
66 </xsl:apply-templates>
69 <xsl:template match="program">
70 <xsl:param name="thisdir"/>
72 <xsl:call-template name="printname">
73 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
74 <xsl:with-param name="style">script</xsl:with-param>
76 <xsl:call-template name="printcontent"/>
80 <xsl:template match="hash">
81 <xsl:param name="thisdir"/>
83 <xsl:call-template name="printname">
84 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
85 <xsl:with-param name="style">hash</xsl:with-param>
87 <xsl:call-template name="printcontent"/>
91 <xsl:template match="scalar">
92 <xsl:param name="thisdir"/>
94 <xsl:call-template name="printname">
95 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
96 <xsl:with-param name="style">file</xsl:with-param>
98 <xsl:call-template name="printcontent"/>
102 <xsl:template match="data">
103 <xsl:param name="thisdir"/>
105 <xsl:call-template name="printname">
106 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
107 <xsl:with-param name="style">data</xsl:with-param>
109 <xsl:call-template name="printcontent"/>
113 <xsl:template match="list">
114 <xsl:param name="thisdir"/>
116 <xsl:call-template name="printname">
117 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
118 <xsl:with-param name="style">list</xsl:with-param>
120 <xsl:call-template name="printcontent"/>
124 <xsl:template match="link">
125 <xsl:param name="thisdir"/>
127 <xsl:call-template name="printname">
128 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
129 <xsl:with-param name="style">symlink</xsl:with-param>
131 <xsl:call-template name="printcontent"/>
135 <xsl:template match="boolean">
136 <xsl:param name="thisdir"/>
138 <xsl:call-template name="printname">
139 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
140 <xsl:with-param name="style">boolean</xsl:with-param>
142 <xsl:call-template name="printcontent"/>
146 <xsl:template match="collection">
147 <xsl:param name="thisdir"/>
149 <xsl:call-template name="printfullname">
150 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
151 <xsl:with-param name="style">directory</xsl:with-param>
153 <xsl:call-template name="printcontent"/>
155 <xsl:call-template name="collection">
156 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/>/<xsl:value-of select="@name"/></xsl:with-param>
161 <xsl:template match="collection" mode="printrpath">
162 <xsl:text>/</xsl:text>
163 <span class="{@type}">
164 <xsl:value-of select="@name"/>
168 <xsl:template match="elements">
169 <div class="elements">
171 <xsl:apply-templates select="element">
172 <xsl:sort select="@name"/>
173 </xsl:apply-templates>
178 <xsl:template match="elements/element">
179 <dt class="elements"><xsl:value-of select="@name"/></dt>
180 <dd class="elements"><xsl:apply-templates select="description"/></dd>
183 <xsl:template name="printfullname">
184 <xsl:param name="thisdir"/>
185 <xsl:param name="style"/>
186 <span class="{$style}">
187 <xsl:value-of select="$confdir"/>
188 <xsl:apply-templates select="ancestor-or-self::collection" mode="printrpath"/>
192 <xsl:template name="printname">
193 <xsl:param name="thisdir"/>
194 <xsl:param name="style"/>
195 <span class="{$style}" title="{$thisdir}/{@name}">
196 <xsl:value-of select="@name"/>
200 <xsl:template name="printcontent">
202 <span class="description">
203 <xsl:apply-templates select="description"/>
205 <xsl:apply-templates select="elements"/>
208 <xsl:template match="ulink">
209 <a href="{@url}"><xsl:apply-templates/></a>