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"
12 <xsl:import href=
"../settings.xsl"/>
13 <xsl:import href=
"strip-references.xsl"/>
14 <xsl:import href=
"expand-smbconfdoc.xsl"/>
16 <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"/>
18 <!-- This is needed to copy content unchanged -->
19 <xsl:template match=
"@*|node()">
21 <xsl:apply-templates select=
"@*|node()"/>
25 <xsl:template match=
"smbconfexample/smbconfoption|smbconfblock/smbconfoption">
27 <xsl:element name=
"member">
28 <xsl:element name=
"indexterm">
29 <xsl:element name=
"primary">
30 <xsl:value-of select=
"@name"/>
33 <xsl:element name=
"parameter">
34 <xsl:text disable-output-escaping=
"yes">
35 <?latex \hspace{
1cm} ?
>
37 <xsl:value-of select=
"@name"/>
39 <xsl:when test=
"text() != ''">
40 <xsl:text> =
</xsl:text>
41 <xsl:value-of select=
"text()"/>
48 <xsl:template match=
"smbconfexample/smbconfcomment|smbconfblock/smbconfcomment">
49 <xsl:text disable-output-escaping=
"yes">
50 <?latex \hspace{
1cm} ?
>
52 <xsl:element name=
"member">
53 <xsl:text>#
</xsl:text>
54 <xsl:apply-templates/>
58 <xsl:template match=
"smbconfexample/smbconfsection|smbconfblock/smbconfsection">
59 <xsl:element name=
"member">
60 <xsl:text> </xsl:text>
62 <xsl:element name=
"member">
63 <xsl:element name=
"parameter">
64 <xsl:value-of select=
"@name"/>
69 <xsl:template match=
"smbconfoption">
70 <!-- Include an index term -->
71 <xsl:element name=
"indexterm">
72 <xsl:element name=
"primary">
73 <xsl:value-of select=
"@name"/>
77 <xsl:variable name=
"linkcontent">
78 <xsl:element name=
"parameter">
79 <xsl:attribute name=
"moreinfo">
80 <xsl:text>none
</xsl:text>
82 <xsl:value-of select=
"@name"/>
86 <xsl:when test=
"text() != ''">
87 <xsl:text> =
</xsl:text>
88 <xsl:value-of select=
"text()"/>
94 <xsl:when test=
"$noreference = 1">
95 <xsl:value-of select=
"$linkcontent"/>
98 <xsl:element name=
"link">
99 <xsl:attribute name=
"linkend">
100 <xsl:value-of select=
"translate(translate(string(@name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
102 <xsl:value-of select=
"$linkcontent"/>
108 <xsl:template match=
"smbconfexample">
110 <xsl:when test=
"title = ''">
112 <xsl:text>Warning: smbconfexample does not have title!
</xsl:text>
116 <xsl:element name=
"example">
118 <xsl:when test=
"@id != ''">
119 <xsl:attribute name=
"id">
120 <xsl:value-of select=
"@id"/>
125 <xsl:element name=
"title">
126 <xsl:value-of select=
"title"/>
128 <xsl:element name=
"simplelist">
129 <xsl:apply-templates/>
134 <xsl:template match=
"smbconfexample/title">
137 <xsl:template match=
"smbconfblock">
138 <xsl:element name=
"simplelist">
139 <xsl:apply-templates/>
143 <xsl:template match=
"smbconfsection">
144 <xsl:element name=
"parameter">
145 <xsl:value-of select=
"@name"/>
149 <xsl:template match=
"smbconfcomment">
150 <xsl:text>#
</xsl:text>
151 <xsl:apply-templates/>
154 <xsl:template match=
"imagefile">
155 <xsl:element name=
"mediaobject">
156 <xsl:element name=
"imageobject">
157 <xsl:attribute name=
"role"><xsl:text>latex
</xsl:text></xsl:attribute>
158 <xsl:element name=
"imagedata">
159 <xsl:attribute name=
"fileref">
160 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/></xsl:attribute>
161 <xsl:attribute name=
"scale">
163 <xsl:when test=
"@scale != ''">
164 <xsl:value-of select=
"@scale"/>
168 <xsl:text>50</xsl:text>
172 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
175 <xsl:element name=
"imageobject">
176 <xsl:attribute name=
"role"><xsl:text>html
</xsl:text></xsl:attribute>
177 <xsl:element name=
"imagedata">
178 <xsl:attribute name=
"fileref">
179 <xsl:text>images/
</xsl:text><xsl:value-of select=
"imagefile"/><xsl:text>.png
</xsl:text></xsl:attribute>
180 <xsl:attribute name=
"scale">
182 <xsl:when test=
"@scale != ''">
183 <xsl:value-of select=
"@scale"/>
187 <xsl:text>100</xsl:text>
191 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
194 <xsl:element name=
"imageobject">
195 <xsl:element name=
"imagedata">
196 <xsl:attribute name=
"fileref">
197 <xsl:text>images/
</xsl:text><xsl:value-of select=
"imagefile"/><xsl:text>.png
</xsl:text></xsl:attribute>
198 <xsl:attribute name=
"scale">
200 <xsl:when test=
"@scale != ''">
201 <xsl:value-of select=
"@scale"/>
205 <xsl:text>50</xsl:text>
209 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>