2 <!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:exsl="http://exslt.org/common"
5 xmlns:samba="http://samba.org/common"
7 extension-element-prefixes="exsl">
9 <xsl:output method="xml"/>
11 <!-- Generates one big XML file for smb.conf -->
13 <xsl:param name="xmlSambaNsUri" select="'http://samba.org/common'"/>
15 <!-- This is needed to copy content unchanged -->
16 <xsl:template match="@*|node()">
18 <xsl:apply-templates select="@*|node()"/>
23 <xsl:template match="//samba:parameter">
24 <!-- reconstruct varlistentry - not all of them will go into separate files
25 and also we must repair the main varlistentry itself.
28 <xsl:text>Processing samba:parameter (</xsl:text>
29 <xsl:value-of select="@name"/>
30 <xsl:text>)</xsl:text>
33 <xsl:variable name="name"><xsl:value-of select="translate(translate(string(@name),' ',''),
34 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
37 <xsl:variable name="anchor">
38 <xsl:element name="anchor">
39 <xsl:attribute name="id">
40 <xsl:value-of select="$name"/>
45 <xsl:variable name="context">
46 <xsl:text> (</xsl:text>
47 <xsl:value-of select="@context"/>
48 <xsl:text>)</xsl:text>
51 <xsl:variable name="term">
52 <xsl:element name="term">
53 <xsl:copy-of select="$anchor"/>
54 <xsl:value-of select="@name"/>
55 <xsl:value-of select="$context"/>
59 <xsl:variable name="content">
60 <xsl:apply-templates/>
63 <xsl:element name="varlistentry">
66 <xsl:copy-of select="$term"/>
67 <xsl:copy-of select="$content"/>