summaryrefslogtreecommitdiff
path: root/docs/docbook/smbdotconf/expand-smb.conf.xsl
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-03-27 15:27:19 +0000
committerAlexander Bokovoy <ab@samba.org>2003-03-27 15:27:19 +0000
commit5cd3d3f14ef56ff5f1d92aba0174649f3d368f66 (patch)
tree7982c107cb4ecf2b739dd0d21b591aca20e9b19a /docs/docbook/smbdotconf/expand-smb.conf.xsl
parent7c6a4de6f97287e43405b66baa81aa328315de7c (diff)
downloadsamba-5cd3d3f14ef56ff5f1d92aba0174649f3d368f66.tar.gz
samba-5cd3d3f14ef56ff5f1d92aba0174649f3d368f66.tar.bz2
samba-5cd3d3f14ef56ff5f1d92aba0174649f3d368f66.zip
Add new framework for smb.conf(5). Please read README before trying to compile.
I will commit more meta-information updates during week-end. (This used to be commit 8d684dffab6a90b3d612a1aa2b2c457a2bc2e6ac)
Diffstat (limited to 'docs/docbook/smbdotconf/expand-smb.conf.xsl')
-rw-r--r--docs/docbook/smbdotconf/expand-smb.conf.xsl74
1 files changed, 74 insertions, 0 deletions
diff --git a/docs/docbook/smbdotconf/expand-smb.conf.xsl b/docs/docbook/smbdotconf/expand-smb.conf.xsl
new file mode 100644
index 0000000000..87b4898cf7
--- /dev/null
+++ b/docs/docbook/smbdotconf/expand-smb.conf.xsl
@@ -0,0 +1,74 @@
+<?xml version='1.0'?>
+<!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:samba="http://samba.org/common"
+ version="1.1"
+ extension-element-prefixes="exsl">
+
+<xsl:output method="xml"/>
+
+<!-- Generates one big XML file for smb.conf -->
+
+<xsl:param name="xmlSambaNsUri" select="'http://samba.org/common'"/>
+
+<!-- This is needed to copy content unchanged -->
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+<xsl:template match="//samba:parameter">
+ <!-- reconstruct varlistentry - not all of them will go into separate files
+ and also we must repair the main varlistentry itself.
+ -->
+ <xsl:message>
+ <xsl:text>Processing samba:parameter (</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>)</xsl:text>
+ </xsl:message>
+
+ <xsl:variable name="name"><xsl:value-of select="translate(translate(string(@name),' ',''),
+ 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ </xsl:variable>
+
+ <xsl:variable name="anchor">
+ <xsl:element name="anchor">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="context">
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="@context"/>
+ <xsl:text>)</xsl:text>
+ </xsl:variable>
+
+ <xsl:variable name="term">
+ <xsl:element name="term">
+ <xsl:copy-of select="$anchor"/>
+ <xsl:value-of select="@name"/>
+ <xsl:value-of select="$context"/>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+
+ <xsl:element name="varlistentry">
+ <xsl:text>
+</xsl:text>
+ <xsl:copy-of select="$term"/>
+ <xsl:copy-of select="$content"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:element>
+
+</xsl:template>
+
+</xsl:stylesheet>