2005-06-11 22:41:19 +04:00
<?xml version='1.0'?>
<!--
smb.conf-documentation specific stylesheets
2009-05-01 22:36:56 +04:00
Published under the GNU GPLv3 or later
2005-06-11 22:41:19 +04:00
(C) Jelmer Vernooij 2002-2004
(C) Alexander Bokovoy 2002-2004
-->
<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
version="1.1">
<xsl:template match= "description" > <xsl:apply-templates /> </xsl:template>
2007-06-06 19:46:26 +04:00
<xsl:template match= "value" > <xsl:element name= "literal" > <xsl:apply-templates /> </xsl:element> </xsl:template>
<xsl:template match= "command" > <xsl:element name= "literal" > <xsl:apply-templates /> </xsl:element> </xsl:template>
2005-06-11 22:41:19 +04:00
<xsl:template match= "synonym" > <xsl:apply-templates /> </xsl:template>
2008-04-07 00:29:06 +04:00
<xsl:template match= "related" > <xsl:element name= "para" > <xsl:text > Related command</xsl:text> <xsl:apply-templates /> </xsl:element> </xsl:template>
2005-06-11 22:41:19 +04:00
2005-07-09 04:15:59 +04:00
<xsl:template match= "samba:parameterlist" >
2005-06-11 22:41:19 +04:00
<xsl:apply-templates >
2005-07-09 04:15:59 +04:00
<xsl:sort select= "samba:parameter/@name" />
2005-06-11 22:41:19 +04:00
</xsl:apply-templates>
</xsl:template>
<xsl:template match= "value/comment" >
<xsl:text > # </xsl:text>
<xsl:apply-templates />
</xsl:template>
2005-07-09 04:15:59 +04:00
<xsl:template match= "samba:parameter" >
2005-06-11 22:41:19 +04:00
<xsl:variable name= "cname" > <xsl:value-of select= "translate(translate(string(@name),' ' , ' ' ) ,
'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</xsl:variable>
<xsl:variable name= "name" > <xsl:value-of select= "@name" /> </xsl:variable>
<xsl:variable name= "anchor" >
<xsl:element name= "anchor" >
<xsl:attribute name= "id" >
<xsl:value-of select= "$cname" />
</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:copy-of select= "$anchor" />
2008-04-24 23:40:51 +04:00
<xsl:element name= "title" >
2008-04-25 16:08:10 +04:00
<xsl:text > </xsl:text>
<xsl:text > </xsl:text>
2008-04-24 23:40:51 +04:00
<xsl:value-of select= "@name" />
<xsl:value-of select= "$context" />
2008-04-25 16:08:10 +04:00
<xsl:text > </xsl:text>
2008-04-24 23:40:51 +04:00
</xsl:element>
2005-06-11 22:41:19 +04:00
</xsl:variable>
<!-- Generate list of examples -->
<xsl:variable name= "examples" >
<xsl:for-each select= "value" >
<xsl:if test= "@type = 'example'" >
<xsl:element name= "para" >
<xsl:text > Example: </xsl:text>
<xsl:element name= "emphasis" >
<xsl:element name= "parameter" >
<xsl:copy-of select= "$name" />
</xsl:element>
<xsl:text > = </xsl:text>
<xsl:apply-templates select= "." />
<xsl:text > </xsl:text>
</xsl:element>
<xsl:text > </xsl:text>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name= "tdefault" >
<xsl:for-each select= "value" >
<xsl:if test= "@type = 'default'" >
<xsl:element name= "para" >
<xsl:text > Default: </xsl:text>
<xsl:element name= "emphasis" >
<xsl:element name= "parameter" >
<xsl:copy-of select= "$name" />
</xsl:element>
<xsl:text > = </xsl:text>
<xsl:apply-templates select= "." />
<xsl:text > </xsl:text>
</xsl:element>
<xsl:text > </xsl:text>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name= "default" >
<xsl:choose >
<xsl:when test= "$tdefault = ''" >
<xsl:element name= "para" >
<xsl:element name= "emphasis" >
<xsl:text > No default</xsl:text>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise >
<xsl:copy-of select= "$tdefault" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name= "content" >
<xsl:apply-templates select= "description" />
</xsl:variable>
<xsl:for-each select= "synonym" >
2008-04-24 23:40:51 +04:00
<xsl:element name= "section" >
2005-06-11 22:41:19 +04:00
<xsl:element name= "indexterm" >
<xsl:attribute name= "significance" >
<xsl:text > preferred</xsl:text>
</xsl:attribute>
<xsl:element name= "primary" >
<xsl:value-of select= "." />
</xsl:element>
<xsl:element name= "see" >
<xsl:value-of select= "$name" />
</xsl:element>
</xsl:element>
2008-04-24 23:40:51 +04:00
<xsl:element name= "title" >
2008-06-09 17:05:26 +04:00
<xsl:text > </xsl:text>
<xsl:text > </xsl:text>
2005-06-11 22:41:19 +04:00
<xsl:element name= "anchor" >
<xsl:attribute name= "id" >
<xsl:value-of select= "translate(translate(string(.),' ',''), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
</xsl:attribute>
</xsl:element>
<xsl:value-of select= "." />
2008-06-09 17:05:26 +04:00
<xsl:text > </xsl:text>
2005-06-11 22:41:19 +04:00
</xsl:element>
2008-04-24 23:40:51 +04:00
<xsl:element name= "variablelist" >
<xsl:element name= "varlistentry" >
<xsl:element name= "listitem" >
<xsl:element name= "para" >
<xsl:text > This parameter is a synonym for </xsl:text>
<xsl:element name= "link" >
<xsl:attribute name= "linkend" >
<xsl:value-of select= "translate(translate(string($name),' ',''), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
</xsl:attribute>
<xsl:value-of select= "$name" />
</xsl:element>
<xsl:text > .</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
2005-06-11 22:41:19 +04:00
</xsl:element>
2008-04-24 23:40:51 +04:00
<xsl:text > </xsl:text>
2005-06-11 22:41:19 +04:00
</xsl:element>
</xsl:for-each>
2008-04-24 23:40:51 +04:00
<xsl:element name= "section" >
2008-04-25 16:01:57 +04:00
<xsl:element name= "indexterm" >
<xsl:attribute name= "significance" >
<xsl:text > preferred</xsl:text>
</xsl:attribute>
<xsl:element name= "primary" >
<xsl:value-of select= "@name" />
</xsl:element>
</xsl:element>
<xsl:copy-of select= "$term" />
2008-04-24 23:40:51 +04:00
<xsl:element name= "variablelist" >
<xsl:element name= "varlistentry" >
<xsl:element name= "listitem" >
<xsl:copy-of select= "$content" /> <xsl:text > </xsl:text>
<xsl:copy-of select= "$default" /> <xsl:text > </xsl:text>
<xsl:copy-of select= "$examples" /> <xsl:text > </xsl:text>
</xsl:element>
2005-06-11 22:41:19 +04:00
</xsl:element>
</xsl:element>
2008-04-24 23:40:51 +04:00
<xsl:text > </xsl:text>
2005-06-11 22:41:19 +04:00
</xsl:element>
</xsl:template>
</xsl:stylesheet>