diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2003-05-01 11:47:49 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2003-05-01 11:47:49 +0000 |
commit | 67ce764d69b13203d9bd73e055e22f71dfebdba6 (patch) | |
tree | 6d54dcff5cb7ebd51c63b2dde77ea52a090afe5f /docs/docbook/smbdotconf/expand-smb.conf.xsl | |
parent | bac83636a5993dbcd1c0beefd628044771603523 (diff) | |
parent | 75cace04fdcb672cc6c3c3ec8403206f2b222c50 (diff) | |
download | samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.tar.gz samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.tar.bz2 samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit a1ffe2a29c0e6be54af09d6647b7f54369d75a1e)
Diffstat (limited to 'docs/docbook/smbdotconf/expand-smb.conf.xsl')
-rw-r--r-- | docs/docbook/smbdotconf/expand-smb.conf.xsl | 87 |
1 files changed, 87 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..62fc4a9ccf --- /dev/null +++ b/docs/docbook/smbdotconf/expand-smb.conf.xsl @@ -0,0 +1,87 @@ +<?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'"/> + +<xsl:template match="refentry"> +<xsl:text disable-output-escaping="yes"> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ + +<!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities; +]> +</xsl:text> +<xsl:element name="refentry"> + <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> + <xsl:apply-templates/> +</xsl:element> +</xsl:template> + +<!-- 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> |