3 Samba-documentation specific stylesheets
4 Published under the GNU GPL
6 (C) Jelmer Vernooij 2002-2004
8 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
9 xmlns:
samba=
"http://www.samba.org/samba/DTD/samba-doc"
10 xmlns:xlink='http://www.w3.org/
1999/xlink'
13 <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"/>
15 <xsl:include href=
"strip-references.xsl"/>
16 <xsl:include href=
"expand-smbconfdoc.xsl"/>
18 <!-- This is needed to copy content unchanged -->
19 <xsl:template match=
"@*|node()">
21 <xsl:apply-templates select=
"@*|node()"/>
25 <xsl:template name=
"xsmbconfoption">
26 <xsl:param name=
"name"/>
27 <xsl:param name=
"content"/>
28 <xsl:variable name=
"linkcontent">
29 <xsl:element name=
"parameter">
30 <xsl:attribute name=
"moreinfo">
31 <xsl:text>none
</xsl:text>
33 <xsl:value-of select=
"$name"/>
37 <xsl:when test=
"$content != ''">
38 <xsl:text> =
</xsl:text>
39 <xsl:value-of select=
"$content"/>
45 <xsl:when test=
"$noreference = 1">
46 <xsl:value-of select=
"$linkcontent"/>
49 <xsl:variable name=
"newid"><xsl:value-of select=
"translate(translate(string($name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
50 <xsl:element name=
"link">
51 <xsl:attribute name=
"linkend">
52 <xsl:value-of select=
"$newid"/>
54 <xsl:attribute name=
"xlink:href">smb.conf
.5.html#
<xsl:value-of select=
"$newid"/></xsl:attribute>
55 <xsl:value-of select=
"$linkcontent"/>
61 <xsl:template match=
"related">
62 <xsl:element name=
"para">
63 <xsl:text>Related command:
</xsl:text>
64 <xsl:call-template name=
"xsmbconfoption">
65 <xsl:with-param name=
"name" select=
"text()"/>
70 <xsl:template match=
"smbconfblock/smbconfoption">
71 <xsl:element name=
"member">
72 <xsl:element name=
"indexterm">
73 <xsl:value-of select=
"@name"/>
76 <xsl:when test=
"text() != ''">
77 <xsl:element name=
"parameter">
78 <xsl:value-of select=
"@name"/>
79 <xsl:text> =
</xsl:text>
80 <xsl:value-of select=
"text()"/>
87 <xsl:template match=
"smbconfblock/smbconfcomment">
88 <xsl:element name=
"member">
89 <xsl:text>#
</xsl:text>
90 <xsl:apply-templates/>
94 <xsl:template match=
"smbconfblock/smbconfsection">
95 <xsl:element name=
"member">
96 <xsl:text> </xsl:text>
98 <xsl:element name=
"member">
99 <xsl:element name=
"parameter">
100 <xsl:value-of select=
"@name"/>
105 <xsl:template match=
"smbconfoption">
106 <xsl:call-template name=
"xsmbconfoption">
107 <xsl:with-param name=
"name" select=
"@name"/>
108 <xsl:with-param name=
"content" select=
"text()"/>
113 <xsl:template match=
"smbconfblock">
114 <xsl:element name=
"simplelist">
115 <xsl:apply-templates/>
119 <xsl:template match=
"smbconfsection">
120 <xsl:element name=
"parameter">
121 <xsl:value-of select=
"@name"/>
125 <xsl:template match=
"imagefile">
126 <xsl:element name=
"mediaobject">
127 <xsl:element name=
"imageobject">
128 <xsl:attribute name=
"role"><xsl:text>html
</xsl:text></xsl:attribute>
129 <xsl:element name=
"imagedata">
130 <xsl:attribute name=
"fileref">
131 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
132 <xsl:attribute name=
"scale">
134 <xsl:when test=
"@scale != ''">
135 <xsl:value-of select=
"@scale"/>
139 <xsl:text>100</xsl:text>
143 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
146 <xsl:element name=
"imageobject">
147 <xsl:element name=
"imagedata">
148 <xsl:attribute name=
"fileref">
149 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
150 <xsl:attribute name=
"scale">
152 <xsl:when test=
"@scale != ''">
153 <xsl:value-of select=
"@scale"/>
157 <xsl:text>50</xsl:text>
161 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
164 <xsl:element name=
"imageobject">
165 <xsl:attribute name=
"role"><xsl:text>latex
</xsl:text></xsl:attribute>
166 <xsl:element name=
"imagedata">
167 <xsl:attribute name=
"fileref">
168 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/></xsl:attribute>