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="css/configuration-lsd.css" />
23 <link rel="alternate stylesheet" title="gras1" type="text/css" href="css/configuration-lsd1.css" />
24 <link rel="alternate stylesheet" title="flower" type="text/css" href="css/configuration-flower.css" />
25 <link rel="alternate stylesheet" title="boring" type="text/css" href="configuration.css" />
26 <link rel="alternate stylesheet" title="weedpage" type="text/css" href="css/WeedPageStyle.css" />
29 <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>
37 <xsl:template name="collection">
38 <xsl:param name="thisdir"/>
39 <xsl:if test="count(scalar) + count(link) + count(program) + count(data) + count(hash) + count(list) + count(boolean) + count(collection)>0">
41 <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
42 <xsl:call-template name="dir-iterate">
43 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
49 <xsl:template name="dir-iterate">
50 <xsl:param name="thisdir"/>
51 <xsl:apply-templates select="scalar|link|program|data|hash|list|boolean">
52 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
53 <xsl:sort select="@name"/>
54 </xsl:apply-templates>
56 <xsl:apply-templates select="collection">
57 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
58 <xsl:sort select="@name"/>
59 </xsl:apply-templates>
62 <xsl:template match="program">
63 <xsl:param name="thisdir"/>
65 <xsl:call-template name="printname">
66 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
67 <xsl:with-param name="style">script</xsl:with-param>
69 <xsl:call-template name="printcontent"/>
73 <xsl:template match="hash">
74 <xsl:param name="thisdir"/>
76 <xsl:call-template name="printname">
77 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
78 <xsl:with-param name="style">hash</xsl:with-param>
80 <xsl:call-template name="printcontent"/>
84 <xsl:template match="scalar">
85 <xsl:param name="thisdir"/>
87 <xsl:call-template name="printname">
88 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
89 <xsl:with-param name="style">file</xsl:with-param>
91 <xsl:call-template name="printcontent"/>
95 <xsl:template match="data">
96 <xsl:param name="thisdir"/>
98 <xsl:call-template name="printname">
99 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
100 <xsl:with-param name="style">data</xsl:with-param>
102 <xsl:call-template name="printcontent"/>
106 <xsl:template match="list">
107 <xsl:param name="thisdir"/>
109 <xsl:call-template name="printname">
110 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
111 <xsl:with-param name="style">list</xsl:with-param>
113 <xsl:call-template name="printcontent"/>
117 <xsl:template match="link">
118 <xsl:param name="thisdir"/>
120 <xsl:call-template name="printname">
121 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
122 <xsl:with-param name="style">symlink</xsl:with-param>
124 <xsl:call-template name="printcontent"/>
128 <xsl:template match="boolean">
129 <xsl:param name="thisdir"/>
131 <xsl:call-template name="printname">
132 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
133 <xsl:with-param name="style">boolean</xsl:with-param>
135 <xsl:call-template name="printcontent"/>
139 <xsl:template match="collection">
140 <xsl:param name="thisdir"/>
142 <xsl:call-template name="printfullname">
143 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/></xsl:with-param>
144 <xsl:with-param name="style">directory</xsl:with-param>
146 <xsl:call-template name="printcontent"/>
148 <xsl:call-template name="collection">
149 <xsl:with-param name="thisdir"><xsl:value-of select="$thisdir"/>/<xsl:call-template name="printdirname"/></xsl:with-param>
154 <xsl:template match="collection" mode="printrpath">
155 <xsl:text>/</xsl:text>
156 <span class="{@type}">
157 <xsl:value-of select="@name"/>
161 <xsl:template match="elements">
162 <div class="elements">
164 <xsl:apply-templates select="element">
165 <xsl:sort select="@name"/>
166 </xsl:apply-templates>
171 <xsl:template match="elements/element">
172 <dt class="elements">
173 <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
174 <xsl:value-of select="@name"/>
176 <dd class="elements"><xsl:apply-templates select="description"/></dd>
179 <xsl:template name="printfullname">
180 <xsl:param name="thisdir"/>
181 <xsl:param name="style"/>
182 <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
183 <span class="{$style}">
184 <xsl:value-of select="$confdir"/>
185 <xsl:apply-templates select="ancestor-or-self::collection" mode="printrpath"/>
189 <xsl:template name="printname">
190 <xsl:param name="thisdir"/>
191 <xsl:param name="style"/>
192 <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
193 <span class="{$style}">
194 <xsl:attribute name="title">
195 <xsl:value-of select="$thisdir"/>/<xsl:call-template name="printdirname"/>
197 <xsl:value-of select="@name"/>
201 <xsl:template name="printcontent">
203 <xsl:apply-templates select="description"/>
204 <xsl:apply-templates select="elements"/>
207 <xsl:template name="printdirname">
208 <xsl:if test="@type='symbolic'">$</xsl:if>
209 <xsl:value-of select="@name"/>
212 <xsl:template match="description">
213 <div class="description">
214 <xsl:apply-templates/>
218 <xsl:template match="ulink">
219 <a href="{@url}"><xsl:apply-templates/></a>
222 <xsl:template match="br">
226 <xsl:template match="p">
227 <div><xsl:apply-templates/></div>
230 <xsl:template match="tool">
231 <code class="tool"><xsl:apply-templates/></code>
234 <xsl:template match="command">
235 <code class="command"><xsl:apply-templates/></code>
238 <xsl:template match="directory">
239 <span class="directoryname"><xsl:apply-templates/></span>
242 <xsl:template match="filename">
244 <xsl:attribute name="href">file://<xsl:value-of select="text()"/></xsl:attribute>
245 <xsl:apply-templates/>
249 <xsl:template match="optionref">
250 <a class="optionref">
251 <xsl:attribute name="href">
253 <xsl:when test="@ref">#<xsl:value-of select="@ref"/></xsl:when>
254 <xsl:otherwise>#<xsl:value-of select="text()"/></xsl:otherwise>
256 </xsl:attribute><xsl:apply-templates/>