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=
"http://db2latex.sourceforge.net/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=
"ISO-8859-1" 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.book.varsets" select=
"''"/>
72 <xsl:variable name=
"latex.hyphenation.tttricks">1</xsl:variable>
73 <xsl:variable name=
"latex.titlepage.file"></xsl:variable>
74 <xsl:template name=
"latex.thead.row.entry">
75 <xsl:text>{\bfseries
</xsl:text><xsl:apply-templates/><xsl:text>}
</xsl:text>
77 <xsl:variable name=
"latex.documentclass">sambadoc
</xsl:variable>
78 <xsl:variable name=
"latex.babel.language">english
</xsl:variable>
79 <xsl:variable name=
"ulink.footnotes" select=
"1"/>
80 <xsl:variable name=
"ulink.show" select=
"0"/>
82 <xsl:template match=
"smbconfblock/smbconfoption">
83 <xsl:text> </xsl:text><xsl:value-of select=
"@name"/>
84 <xsl:if test=
"text() != ''">
85 <xsl:text> =
</xsl:text>
86 <xsl:value-of select=
"text()"/>
88 <xsl:text> </xsl:text>
91 <xsl:template match=
"smbconfblock/smbconfcomment">
92 <xsl:text>#
</xsl:text>
93 <xsl:apply-templates/>
94 <xsl:text> </xsl:text>
97 <xsl:template match=
"smbconfblock/smbconfsection">
98 <xsl:value-of select=
"@name"/>
99 <xsl:text> </xsl:text>
102 <xsl:template match=
"smbconfoption">
103 <xsl:text>\smbconfoption{
</xsl:text>
104 <xsl:call-template name=
"scape">
105 <xsl:with-param name=
"string" select=
"@name"/>
107 <xsl:text>}
</xsl:text>
110 <xsl:when test=
"text() != ''">
111 <xsl:text> =
</xsl:text>
112 <xsl:call-template name=
"scape">
113 <xsl:with-param name=
"string" select=
"text()"/>
119 <xsl:template match=
"smbconfblock">
120 <xsl:text> \begin{lstlisting}[language=smbconf,style=smbconfblock]
</xsl:text>
121 <xsl:apply-templates/>
122 <xsl:text>\end{lstlisting}
</xsl:text>
125 <xsl:template match=
"smbconfsection">
126 <xsl:text>\smbconfsection{
</xsl:text>
127 <xsl:call-template name=
"scape">
128 <xsl:with-param name=
"string" select=
"@name"/>
130 <xsl:text>}
</xsl:text>
133 <xsl:template match=
"imagefile">
134 <xsl:text>\includegraphics[scale=
</xsl:text>
136 <xsl:when test=
"@scale != ''"><xsl:value-of select=
"@scale div 100"/></xsl:when>
138 <xsl:otherwise><xsl:text>.50</xsl:text></xsl:otherwise>
140 <xsl:text>]{
</xsl:text>
141 <xsl:value-of select=
"$latex.imagebasedir"/><xsl:text>images/
</xsl:text>
142 <xsl:value-of select=
"text()"/>
143 <xsl:text>}
</xsl:text>
146 <!-- smb.conf documentation -->
148 <xsl:template match=
"description"><xsl:apply-templates/></xsl:template>
150 <xsl:template match=
"value"><xsl:apply-templates/></xsl:template>
152 <xsl:template match=
"synonym"><xsl:apply-templates/></xsl:template>
154 <xsl:template match=
"related"><xsl:apply-templates/></xsl:template>
156 <xsl:template match=
"//samba:parameterlist">
157 <xsl:apply-templates>
158 <xsl:sort select=
"varlistentry/term/anchor"/>
159 </xsl:apply-templates>
162 <xsl:template match=
"value/comment">
163 <xsl:text> #
</xsl:text>
164 <xsl:apply-templates/>
167 <xsl:template match=
"//samba:parameter">
168 <xsl:text>\subsubsection{
</xsl:text><xsl:value-of select=
"@name"/><xsl:text>}
</xsl:text>
169 <xsl:text>\index{
</xsl:text><xsl:value-of select=
"@name"/><xsl:text>|it}
</xsl:text>
171 <xsl:for-each select=
"synonym">
172 <xsl:text>\subsubsection{
</xsl:text><xsl:value-of select=
"."/><xsl:text>}
</xsl:text>
173 <xsl:text>\index{
</xsl:text><xsl:value-of select=
"."/><xsl:text>|it}
</xsl:text>
174 <xsl:text>This parameter is a synonym for \smbconfoption{
</xsl:text><xsl:value-of select=
"../@name"/><xsl:text>}.
</xsl:text>
177 <xsl:variable name=
"context">
178 <xsl:text> (
</xsl:text>
179 <xsl:value-of select=
"@context"/>
180 <xsl:text>)
</xsl:text>
183 <!-- Print default value-->
184 <xsl:text> </xsl:text>
185 <xsl:text>Default:
</xsl:text>
186 <xsl:text>\emph{
</xsl:text>
188 <xsl:when test=
"value[@type='default'] != ''">
189 <xsl:value-of select=
"@name"/>
190 <xsl:text> =
</xsl:text>
191 <xsl:apply-templates select=
"value"/>
194 <xsl:text>No default
</xsl:text>
197 <xsl:text>}
</xsl:text>
198 <xsl:text> </xsl:text>
200 <!-- Generate list of examples -->
201 <xsl:text> </xsl:text>
202 <xsl:for-each select=
"value[@type='example']">
203 <xsl:text> </xsl:text>
204 <xsl:text>Example:
</xsl:text>
205 <xsl:text>\emph{
</xsl:text><xsl:value-of select=
"../@name"/>
206 <xsl:text> =
</xsl:text>
207 <xsl:apply-templates select=
"."/>
208 <xsl:text>}
</xsl:text>
209 <xsl:text> </xsl:text>
213 <xsl:apply-templates select=
"description"/>