2004-04-07 14:40:50 +04:00
<?xml version='1.0'?>
<!--
2009-05-01 22:36:56 +04:00
Samba-documentation specific stylesheets.
This stylesheet eliminates Samba-specific XML elements and replaces them with
DocBook-only elements.
Published under the GNU GPLv3 or later
2004-04-07 14:40:50 +04:00
(C) Jelmer Vernooij 2002-2004
-->
<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
2005-03-17 23:03:39 +03:00
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
2008-04-24 23:40:51 +04:00
xmlns:xlink='http://www.w3.org/1999/xlink'
2005-03-13 01:34:38 +03:00
version="1.1">
2004-04-07 14:40:50 +04:00
2004-05-21 01:04:57 +04:00
<xsl:output method= "xml" encoding= "UTF-8" doctype-public= "-//OASIS//DTD DocBook XML V4.2//EN" indent= "yes" doctype-system= "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" />
2004-04-07 14:40:50 +04:00
2005-07-09 04:15:59 +04:00
<xsl:include href= "strip-references.xsl" />
<xsl:include href= "expand-smbconfdoc.xsl" />
2004-04-07 14:40:50 +04:00
<!-- This is needed to copy content unchanged -->
<xsl:template match= "@*|node()" >
<xsl:copy >
<xsl:apply-templates select= "@*|node()" />
</xsl:copy>
</xsl:template>
2008-04-24 23:40:51 +04:00
<xsl:template name= "xsmbconfoption" >
2008-04-07 00:29:06 +04:00
<xsl:param name= "name" />
<xsl:param name= "content" />
<xsl:variable name= "linkcontent" >
<xsl:element name= "parameter" >
<xsl:attribute name= "moreinfo" >
<xsl:text > none</xsl:text>
</xsl:attribute>
<xsl:value-of select= "$name" />
</xsl:element>
<xsl:choose >
<xsl:when test= "$content != ''" >
<xsl:text > = </xsl:text>
<xsl:value-of select= "$content" />
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:choose >
<xsl:when test= "$noreference = 1" >
<xsl:value-of select= "$linkcontent" />
</xsl:when>
<xsl:otherwise >
2008-04-24 23:40:51 +04:00
<xsl:variable name= "newid" > <xsl:value-of select= "translate(translate(string($name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> </xsl:variable>
2008-04-07 00:29:06 +04:00
<xsl:element name= "link" >
<xsl:attribute name= "linkend" >
2008-04-24 23:40:51 +04:00
<xsl:value-of select= "$newid" />
2008-04-07 00:29:06 +04:00
</xsl:attribute>
2008-04-24 23:40:51 +04:00
<xsl:attribute name= "xlink:href" > smb.conf.5.html#<xsl:value-of select= "$newid" /> </xsl:attribute>
2008-04-07 00:29:06 +04:00
<xsl:value-of select= "$linkcontent" />
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match= "related" >
<xsl:element name= "para" >
<xsl:text > Related command: </xsl:text>
2008-04-24 23:40:51 +04:00
<xsl:call-template name= "xsmbconfoption" >
2008-04-07 00:29:06 +04:00
<xsl:with-param name= "name" select= "text()" />
</xsl:call-template>
</xsl:element>
</xsl:template>
2005-06-13 04:48:46 +04:00
<xsl:template match= "smbconfblock/smbconfoption" >
2004-04-07 14:40:50 +04:00
<xsl:element name= "member" >
2008-04-15 11:35:29 +04:00
<xsl:element name= "indexterm" >
2005-03-13 01:34:38 +03:00
<xsl:value-of select= "@name" />
2004-04-07 14:40:50 +04:00
</xsl:element>
2008-04-07 00:29:06 +04:00
<xsl:choose >
<xsl:when test= "text() != ''" >
<xsl:element name= "parameter" >
<xsl:value-of select= "@name" />
2004-04-07 14:40:50 +04:00
<xsl:text > = </xsl:text>
2005-03-13 01:34:38 +03:00
<xsl:value-of select= "text()" />
2008-04-07 00:29:06 +04:00
</xsl:element>
</xsl:when>
</xsl:choose>
2004-04-07 14:40:50 +04:00
</xsl:element>
</xsl:template>
2005-06-13 04:48:46 +04:00
<xsl:template match= "smbconfblock/smbconfcomment" >
2004-04-07 14:40:50 +04:00
<xsl:element name= "member" >
<xsl:text > # </xsl:text>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
2005-06-13 04:48:46 +04:00
<xsl:template match= "smbconfblock/smbconfsection" >
2004-04-07 14:40:50 +04:00
<xsl:element name= "member" >
<xsl:text > </xsl:text>
</xsl:element>
<xsl:element name= "member" >
<xsl:element name= "parameter" >
2005-03-21 13:31:57 +03:00
<xsl:value-of select= "@name" />
2004-04-07 14:40:50 +04:00
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match= "smbconfoption" >
2008-04-24 23:40:51 +04:00
<xsl:call-template name= "xsmbconfoption" >
2008-04-07 00:29:06 +04:00
<xsl:with-param name= "name" select= "@name" />
2008-04-24 23:40:51 +04:00
<xsl:with-param name= "content" select= "text()" />
2008-04-07 00:29:06 +04:00
</xsl:call-template>
2004-04-07 14:40:50 +04:00
</xsl:template>
2008-04-07 00:29:06 +04:00
2004-04-07 14:40:50 +04:00
<xsl:template match= "smbconfblock" >
<xsl:element name= "simplelist" >
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match= "smbconfsection" >
<xsl:element name= "parameter" >
2005-03-21 13:31:57 +03:00
<xsl:value-of select= "@name" />
2004-04-07 14:40:50 +04:00
</xsl:element>
</xsl:template>
2005-06-12 20:31:19 +04:00
<xsl:template match= "imagefile" >
<xsl:element name= "mediaobject" >
<xsl:element name= "imageobject" >
<xsl:attribute name= "role" > <xsl:text > html</xsl:text> </xsl:attribute>
<xsl:element name= "imagedata" >
<xsl:attribute name= "fileref" >
2005-06-13 14:23:53 +04:00
<xsl:text > images/</xsl:text> <xsl:value-of select= "text()" /> <xsl:text > .png</xsl:text> </xsl:attribute>
2005-06-12 20:31:19 +04:00
<xsl:attribute name= "scale" >
<xsl:choose >
<xsl:when test= "@scale != ''" >
<xsl:value-of select= "@scale" />
</xsl:when>
<xsl:otherwise >
<xsl:text > 100</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name= "scalefit" > <xsl:text > 1</xsl:text> </xsl:attribute>
2004-04-07 14:40:50 +04:00
</xsl:element>
2005-06-12 20:31:19 +04:00
</xsl:element>
<xsl:element name= "imageobject" >
<xsl:element name= "imagedata" >
<xsl:attribute name= "fileref" >
2005-06-13 14:23:53 +04:00
<xsl:text > images/</xsl:text> <xsl:value-of select= "text()" /> <xsl:text > .png</xsl:text> </xsl:attribute>
2005-06-12 20:31:19 +04:00
<xsl:attribute name= "scale" >
<xsl:choose >
<xsl:when test= "@scale != ''" >
<xsl:value-of select= "@scale" />
</xsl:when>
<xsl:otherwise >
<xsl:text > 50</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name= "scalefit" > <xsl:text > 1</xsl:text> </xsl:attribute>
2004-04-27 03:29:19 +04:00
</xsl:element>
2004-04-07 14:40:50 +04:00
</xsl:element>
2005-06-14 00:25:32 +04:00
<xsl:element name= "imageobject" >
<xsl:attribute name= "role" > <xsl:text > latex</xsl:text> </xsl:attribute>
<xsl:element name= "imagedata" >
<xsl:attribute name= "fileref" >
<xsl:value-of select= "$latex.imagebasedir" /> <xsl:text > images/</xsl:text> <xsl:value-of select= "text()" /> </xsl:attribute>
</xsl:element>
</xsl:element>
2004-04-07 14:40:50 +04:00
</xsl:element>
</xsl:template>
2008-04-15 11:35:29 +04:00
2004-04-07 14:40:50 +04:00
</xsl:stylesheet>