1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version='
1.0'
3 xmlns:
samba=
"http://www.samba.org/samba/DTD/samba-doc">
4 <xsl:import href=
"db2latex-xsl/xsl/docbook.xsl"/>
5 <xsl:import href=
"strip-references.xsl"/>
7 <xsl:param name=
"latex.mapping.xml" select=
"document('latex.overrides.xml')"/>
9 <xsl:param name=
"generate.toc">
13 book toc,title,figure,table,example,equation
14 /chapter toc,title,lop
30 <!-- Show real name of the link rather then user specified description -->
31 <xsl:template match=
"link">
32 <xsl:variable name=
"target" select=
"key('id',@linkend)[1]"/>
33 <xsl:variable name=
"refelem" select=
"local-name($target)"/>
34 <xsl:if test=
"$refelem=''">
35 <xsl:message><xsl:text>XRef to nonexistent id:
</xsl:text><xsl:value-of select=
"@linkend"/></xsl:message>
36 <xsl:text>XrefId[?
</xsl:text>
37 <xsl:apply-templates/>
38 <xsl:text>?]
</xsl:text>
41 <xsl:call-template name=
"generate.hyperlink">
42 <xsl:with-param name=
"target" select=
"$target"/>
43 <xsl:with-param name=
"text">
44 <xsl:call-template name=
"generate.xref.text">
45 <xsl:with-param name=
"target" select=
"$target"/>
51 <!-- LaTeX doesn't accept verbatim stuff in titles -->
52 <xsl:template match=
"//title/filename|//title/command|//title/parameter|//title/constant">
53 <xsl:variable name=
"content">
54 <xsl:apply-templates/>
56 <xsl:if test=
"$content != ''">
57 <xsl:value-of select=
"$content" />
61 <xsl:output method=
"text" encoding=
"UTF-8" indent=
"yes"/>
62 <xsl:variable name=
"l10n.gentext.default.language" select=
"'en'"/>
63 <xsl:variable name=
"latex.document.font">default
</xsl:variable>
64 <xsl:variable name=
"latex.example.caption.style"></xsl:variable>
65 <xsl:variable name=
"latex.hyperref.param.pdftex">hyperfigures,hyperindex,citecolor=black,urlcolor=black,filecolor=black,linkcolor=black,menucolor=red,pagecolor=black
</xsl:variable>
66 <xsl:variable name=
"admon.graphics.path">xslt/figures
</xsl:variable>
67 <xsl:variable name=
"latex.use.tabularx">1</xsl:variable>
68 <xsl:variable name=
"latex.fancyhdr.lh"></xsl:variable>
69 <xsl:variable name=
"latex.use.fancyhdr"></xsl:variable>
70 <xsl:variable name=
"latex.use.parskip">1</xsl:variable>
71 <xsl:variable name=
"latex.use.ucs">1</xsl:variable>
72 <xsl:variable name=
"latex.inputenc">utf8
</xsl:variable>
73 <xsl:variable name=
"latex.book.varsets" select=
"''"/>
74 <xsl:variable name=
"latex.hyphenation.tttricks">1</xsl:variable>
75 <xsl:variable name=
"latex.titlepage.file"></xsl:variable>
76 <xsl:template name=
"latex.thead.row.entry">
77 <xsl:text>{\bfseries
</xsl:text><xsl:apply-templates/><xsl:text>}
</xsl:text>
79 <xsl:variable name=
"latex.documentclass">sambadoc
</xsl:variable>
80 <xsl:variable name=
"latex.babel.language">english
</xsl:variable>
81 <xsl:variable name=
"ulink.footnotes" select=
"1"/>
82 <xsl:variable name=
"ulink.show" select=
"0"/>
84 <xsl:template match=
"smbconfblock/smbconfoption">
85 <xsl:text> </xsl:text><xsl:value-of select=
"@name"/>
86 <xsl:if test=
"text() != ''">
87 <xsl:text> =
</xsl:text>
88 <xsl:value-of select=
"text()"/>
90 <xsl:text> </xsl:text>
93 <xsl:template match=
"smbconfblock/smbconfcomment">
94 <xsl:text>#
</xsl:text>
95 <xsl:apply-templates/>
96 <xsl:text> </xsl:text>
99 <xsl:template match=
"smbconfblock/smbconfsection">
100 <xsl:value-of select=
"@name"/>
101 <xsl:text> </xsl:text>
104 <xsl:template match=
"smbconfoption">
105 <xsl:text>\smbconfoption{
</xsl:text>
106 <xsl:call-template name=
"scape">
107 <xsl:with-param name=
"string" select=
"@name"/>
109 <xsl:text>}
</xsl:text>
112 <xsl:when test=
"text() != ''">
113 <xsl:text> =
</xsl:text>
114 <xsl:call-template name=
"scape">
115 <xsl:with-param name=
"string" select=
"text()"/>
121 <xsl:template match=
"smbconfblock">
122 <xsl:text> \begin{lstlisting}[language=smbconf,style=smbconfblock]
</xsl:text>
123 <xsl:apply-templates/>
124 <xsl:text>\end{lstlisting}
</xsl:text>
127 <xsl:template match=
"smbconfsection">
128 <xsl:text>\smbconfsection{
</xsl:text>
129 <xsl:call-template name=
"scape">
130 <xsl:with-param name=
"string" select=
"@name"/>
132 <xsl:text>}
</xsl:text>
135 <xsl:template match=
"imagefile">
136 <xsl:text>\includegraphics[scale=
</xsl:text>
138 <xsl:when test=
"@scale != ''"><xsl:value-of select=
"@scale div 100"/></xsl:when>
140 <xsl:otherwise><xsl:text>.50</xsl:text></xsl:otherwise>
142 <xsl:text>]{
</xsl:text>
143 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text>
144 <xsl:value-of select=
"text()"/>
145 <xsl:text>}
</xsl:text>
148 <!-- smb.conf documentation -->
150 <xsl:template match=
"description"><xsl:apply-templates/></xsl:template>
152 <xsl:template match=
"value"><xsl:apply-templates/></xsl:template>
154 <xsl:template match=
"synonym"><xsl:apply-templates/></xsl:template>
156 <xsl:template match=
"related"><xsl:apply-templates/></xsl:template>
158 <xsl:template match=
"//samba:parameterlist">
159 <xsl:text>\begin{description}
</xsl:text>
160 <xsl:apply-templates>
161 <xsl:sort select=
"samba:parameter/@name"/>
162 </xsl:apply-templates>
163 <xsl:text>\end{description}
</xsl:text>
166 <xsl:template match=
"value/comment">
167 <xsl:text> #
</xsl:text>
168 <xsl:apply-templates/>
171 <xsl:template match=
"/">
172 <xsl:apply-templates/>
175 <xsl:template match=
"refentry">
176 <xsl:text>\section{
</xsl:text><xsl:value-of select=
"refmeta/refentrytitle"/><xsl:text>}
</xsl:text>
177 <xsl:apply-templates/>
180 <xsl:template match=
"//samba:parameter">
181 <xsl:for-each select=
"synonym">
182 <xsl:text>\item[{
</xsl:text><xsl:value-of select=
"."/><xsl:text>}]\null{}
</xsl:text>
183 <xsl:text>\index{
</xsl:text><xsl:value-of select=
"."/><xsl:text>}
</xsl:text>
184 <xsl:text>This parameter is a synonym for \smbconfoption{
</xsl:text><xsl:value-of select=
"../@name"/><xsl:text>}.
</xsl:text>
187 <xsl:text>\item[{
</xsl:text><xsl:value-of select=
"@name"/>
188 <xsl:text> (
</xsl:text>
189 <xsl:value-of select=
"@context"/>
190 <xsl:text>)
</xsl:text>
191 <xsl:text>}]\null{}
</xsl:text>
192 <xsl:text>\index{
</xsl:text><xsl:value-of select=
"@name"/><xsl:text>}
</xsl:text>
194 <!-- Print default value-->
195 <xsl:text> </xsl:text>
196 <xsl:text>Default:
</xsl:text>
197 <xsl:text>\emph{
</xsl:text>
199 <xsl:when test=
"value[@type='default'] != ''">
200 <xsl:value-of select=
"@name"/>
201 <xsl:text> =
</xsl:text>
202 <xsl:apply-templates select=
"value"/>
205 <xsl:text>No default
</xsl:text>
208 <xsl:text>}
</xsl:text>
209 <xsl:text> </xsl:text>
211 <!-- Generate list of examples -->
212 <xsl:text> </xsl:text>
213 <xsl:for-each select=
"value[@type='example']">
214 <xsl:text> </xsl:text>
215 <xsl:text>Example:
</xsl:text>
216 <xsl:text>\emph{
</xsl:text><xsl:value-of select=
"../@name"/>
217 <xsl:text> =
</xsl:text>
218 <xsl:apply-templates select=
"."/>
219 <xsl:text>}
</xsl:text>
220 <xsl:text> </xsl:text>
224 <xsl:apply-templates select=
"description"/>