3 Samba-documentation specific stylesheets.
4 This stylesheet eliminates Samba-specific XML elements and replaces them with
6 Published under the GNU GPLv3 or later
8 (C) Jelmer Vernooij 2002-2004
10 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
11 xmlns:
samba=
"http://www.samba.org/samba/DTD/samba-doc"
12 xmlns:xlink='http://www.w3.org/
1999/xlink'
15 <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"/>
17 <xsl:include href=
"strip-references.xsl"/>
18 <xsl:include href=
"expand-smbconfdoc.xsl"/>
20 <!-- This is needed to copy content unchanged -->
21 <xsl:template match=
"@*|node()">
23 <xsl:apply-templates select=
"@*|node()"/>
27 <xsl:template name=
"xsmbconfoption">
28 <xsl:param name=
"name"/>
29 <xsl:param name=
"content"/>
30 <xsl:variable name=
"linkcontent">
31 <xsl:element name=
"parameter">
32 <xsl:attribute name=
"moreinfo">
33 <xsl:text>none
</xsl:text>
35 <xsl:value-of select=
"$name"/>
39 <xsl:when test=
"$content != ''">
40 <xsl:text> =
</xsl:text>
41 <xsl:value-of select=
"$content"/>
47 <xsl:when test=
"$noreference = 1">
48 <xsl:value-of select=
"$linkcontent"/>
51 <xsl:variable name=
"newid"><xsl:value-of select=
"translate(string($name),'abcdefghijklmnopqrstuvwxyz ','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
52 <xsl:element name=
"link">
53 <xsl:attribute name=
"linkend">
54 <xsl:value-of select=
"$newid"/>
56 <xsl:attribute name=
"xlink:href">smb.conf
.5.html#
<xsl:value-of select=
"$newid"/></xsl:attribute>
57 <xsl:value-of select=
"$linkcontent"/>
63 <xsl:template match=
"related">
64 <xsl:element name=
"para">
65 <xsl:text>Related command:
</xsl:text>
66 <xsl:call-template name=
"xsmbconfoption">
67 <xsl:with-param name=
"name" select=
"text()"/>
72 <xsl:template match=
"smbconfblock/smbconfoption">
73 <xsl:element name=
"member">
74 <xsl:element name=
"indexterm">
75 <xsl:value-of select=
"@name"/>
78 <xsl:when test=
"text() != ''">
79 <xsl:element name=
"parameter">
80 <xsl:value-of select=
"@name"/>
81 <xsl:text> =
</xsl:text>
82 <xsl:value-of select=
"text()"/>
89 <xsl:template match=
"smbconfblock/smbconfcomment">
90 <xsl:element name=
"member">
91 <xsl:text>#
</xsl:text>
92 <xsl:apply-templates/>
96 <xsl:template match=
"smbconfblock/smbconfsection">
97 <xsl:element name=
"member">
98 <xsl:text> </xsl:text>
100 <xsl:element name=
"member">
101 <xsl:element name=
"parameter">
102 <xsl:value-of select=
"@name"/>
107 <xsl:template match=
"smbconfoption">
108 <xsl:call-template name=
"xsmbconfoption">
109 <xsl:with-param name=
"name" select=
"@name"/>
110 <xsl:with-param name=
"content" select=
"text()"/>
115 <xsl:template match=
"smbconfblock">
116 <xsl:element name=
"simplelist">
117 <xsl:apply-templates/>
121 <xsl:template match=
"smbconfsection">
122 <xsl:element name=
"parameter">
123 <xsl:value-of select=
"@name"/>
127 <xsl:template match=
"imagefile">
128 <xsl:element name=
"mediaobject">
129 <xsl:element name=
"imageobject">
130 <xsl:attribute name=
"role"><xsl:text>html
</xsl:text></xsl:attribute>
131 <xsl:element name=
"imagedata">
132 <xsl:attribute name=
"fileref">
133 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
134 <xsl:attribute name=
"scale">
136 <xsl:when test=
"@scale != ''">
137 <xsl:value-of select=
"@scale"/>
141 <xsl:text>100</xsl:text>
145 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
148 <xsl:element name=
"imageobject">
149 <xsl:element name=
"imagedata">
150 <xsl:attribute name=
"fileref">
151 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
152 <xsl:attribute name=
"scale">
154 <xsl:when test=
"@scale != ''">
155 <xsl:value-of select=
"@scale"/>
159 <xsl:text>50</xsl:text>
163 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
166 <xsl:element name=
"imageobject">
167 <xsl:attribute name=
"role"><xsl:text>latex
</xsl:text></xsl:attribute>
168 <xsl:element name=
"imagedata">
169 <xsl:attribute name=
"fileref">
170 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/></xsl:attribute>