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: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"/>
14 <xsl:include href=
"strip-references.xsl"/>
15 <xsl:include href=
"expand-smbconfdoc.xsl"/>
17 <!-- This is needed to copy content unchanged -->
18 <xsl:template match=
"@*|node()">
20 <xsl:apply-templates select=
"@*|node()"/>
24 <xsl:template name=
"smbconfoption">
25 <xsl:param name=
"name"/>
26 <xsl:param name=
"content"/>
27 <xsl:variable name=
"linkcontent">
28 <xsl:element name=
"parameter">
29 <xsl:attribute name=
"moreinfo">
30 <xsl:text>none
</xsl:text>
32 <xsl:value-of select=
"$name"/>
36 <xsl:when test=
"$content != ''">
37 <xsl:text> =
</xsl:text>
38 <xsl:value-of select=
"$content"/>
44 <xsl:when test=
"$noreference = 1">
45 <xsl:value-of select=
"$linkcontent"/>
48 <xsl:element name=
"link">
49 <xsl:attribute name=
"linkend">
50 <xsl:value-of select=
"translate(translate(string($name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
52 <xsl:value-of select=
"$linkcontent"/>
58 <xsl:template match=
"related">
59 <xsl:element name=
"para">
60 <xsl:text>Related command:
</xsl:text>
61 <xsl:call-template name=
"smbconfoption">
62 <xsl:with-param name=
"name" select=
"text()"/>
67 <xsl:template match=
"smbconfblock/smbconfoption">
68 <xsl:element name=
"member">
69 <xsl:element name=
"indexterm">
70 <xsl:value-of select=
"@name"/>
73 <xsl:when test=
"text() != ''">
74 <xsl:element name=
"parameter">
75 <xsl:value-of select=
"@name"/>
76 <xsl:text> =
</xsl:text>
77 <xsl:value-of select=
"text()"/>
84 <xsl:template match=
"smbconfblock/smbconfcomment">
85 <xsl:element name=
"member">
86 <xsl:text>#
</xsl:text>
87 <xsl:apply-templates/>
91 <xsl:template match=
"smbconfblock/smbconfsection">
92 <xsl:element name=
"member">
93 <xsl:text> </xsl:text>
95 <xsl:element name=
"member">
96 <xsl:element name=
"parameter">
97 <xsl:value-of select=
"@name"/>
102 <xsl:template match=
"smbconfoption">
103 <xsl:call-template name=
"smbconfoption">
104 <xsl:with-param name=
"name" select=
"@name"/>
105 <xsl:with-param name=
"content"><xsl:copy-of select=
"text()"/></xsl:with-param>
110 <xsl:template match=
"smbconfblock">
111 <xsl:element name=
"simplelist">
112 <xsl:apply-templates/>
116 <xsl:template match=
"smbconfsection">
117 <xsl:element name=
"parameter">
118 <xsl:value-of select=
"@name"/>
122 <xsl:template match=
"imagefile">
123 <xsl:element name=
"mediaobject">
124 <xsl:element name=
"imageobject">
125 <xsl:attribute name=
"role"><xsl:text>html
</xsl:text></xsl:attribute>
126 <xsl:element name=
"imagedata">
127 <xsl:attribute name=
"fileref">
128 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
129 <xsl:attribute name=
"scale">
131 <xsl:when test=
"@scale != ''">
132 <xsl:value-of select=
"@scale"/>
136 <xsl:text>100</xsl:text>
140 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
143 <xsl:element name=
"imageobject">
144 <xsl:element name=
"imagedata">
145 <xsl:attribute name=
"fileref">
146 <xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/><xsl:text>.png
</xsl:text></xsl:attribute>
147 <xsl:attribute name=
"scale">
149 <xsl:when test=
"@scale != ''">
150 <xsl:value-of select=
"@scale"/>
154 <xsl:text>50</xsl:text>
158 <xsl:attribute name=
"scalefit"><xsl:text>1</xsl:text></xsl:attribute>
161 <xsl:element name=
"imageobject">
162 <xsl:attribute name=
"role"><xsl:text>latex
</xsl:text></xsl:attribute>
163 <xsl:element name=
"imagedata">
164 <xsl:attribute name=
"fileref">
165 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text><xsl:value-of select=
"text()"/></xsl:attribute>