summaryrefslogtreecommitdiff
path: root/docs/docbook/smbdotconf/generate-context.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/generate-context.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/generate-context.xsl')
-rw-r--r--docs/docbook/smbdotconf/generate-context.xsl56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/docbook/smbdotconf/generate-context.xsl b/docs/docbook/smbdotconf/generate-context.xsl
new file mode 100644
index 0000000000..c9ca31085c
--- /dev/null
+++ b/docs/docbook/smbdotconf/generate-context.xsl
@@ -0,0 +1,56 @@
+<?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" omit-xml-declaration="yes"/>
+
+<xsl:param name="smb.context" select="'G'"/>
+
+<!-- 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="variablelist">
+ <xsl:element name="itemizedlist">
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="//samba:parameter">
+ <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:if test="contains(@context,$smb.context)">
+ <xsl:element name="listitem">
+ <xsl:element name="para">
+ <xsl:element name="link">
+ <xsl:attribute name="linkend">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ <xsl:element name="parameter">
+ <xsl:attribute name="moreinfo"><xsl:text>none</xsl:text></xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>