2005-06-11 22:41:19 +04:00
<?xml version='1.0'?>
<!--
smb.conf-documentation specific stylesheets
Published under the GNU GPL
(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" >
2008-04-15 11:35:29 +04:00
<xsl:element name= "indexterm" >
2005-06-11 22:41:19 +04:00
<xsl:copy-of select= "$anchor" />
<xsl:value-of select= "@name" />
<xsl:value-of select= "$context" />
</xsl:element>
</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" >
<xsl:element name= "varlistentry" >
<xsl:text > </xsl:text>
<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>
<xsl:element name= "term" >
<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= "." />
</xsl:element>
<xsl:element name= "listitem" >
<xsl:element name= "para" > <xsl:text > This parameter is a synonym for </xsl:text> <xsl:copy-of select= "$name" /> <xsl:text > .</xsl:text> </xsl:element>
</xsl:element>
</xsl:element>
</xsl:for-each>
<xsl:element name= "varlistentry" >
<xsl:text > </xsl:text>
<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" />
<xsl:element name= "listitem" >
2005-07-09 04:15:59 +04:00
<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>
2005-06-11 22:41:19 +04:00
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>