1 DocBook XML 4.2 source code for smb.conf(5) documentation for Samba 3.0
3 Author of the document: Alexander Bokovoy <ab@samba.org>
5 Welcome to new smb.conf(5) documentation build system! This directory
6 contains a new incarnation of Samba's smb.conf(5) Docbook XML 4.2
7 sources. Note that the output might be unsatisfying untill all smb.conf(5)
8 parameters will converted to new format (see Chapter 4 for details).
17 4. Current status of converted parameters
22 In order to compile smb.conf(5) documentation from Docbook XML 4.2
25 - a working libxml2 and libxslt installation, together with xsltproc utility
27 - a locally installed Docbook XSL 4.2 or higher
29 - a working xmlcatalog to eliminate Web access for Docbook XSL
31 The latter requisite is important: we do not specify local copies of
32 Docbook XSL stylesheets in our XSLTs because of real nightmare in their
33 location in most distributions. Fortunately, libxml2 provides standard
34 way to access locally installed external resources via so-called
35 'xmlcatalog' tool. It is working in RedHat, Mandrake, ALT Linux, and
36 some other distributions but wasn't at the moment of this writting (Late
42 smb.conf(5) sources consist of a number of XML files distributed across
43 a number of subdirectories. Each subdirectory represents a group of
44 smb.conf(5) parameters dedicated to one specific task as described in
45 Samba's loadparm.c source file (and shown in SWAT).
47 Each XML file in subdirectories represents one parameter description,
48 together with some additional meta-information about it. Complete list
49 of meta-information attributes
52 -------------------------------------------------------------------
53 name smb.conf(5) parameter name
54 context G for global, S for services
55 basic set to 1 if loadparm.c's description
56 wizard includes appropriate flag for
57 advanced this parameter (FLAG_BASIC,
58 developer FLAG_ADVANCED, FLAG_WIZARD, FLAG_DEVELOPER)
59 -------------------------------------------------------------------
61 Main XML file for smb.conf(5) is smb.conf.5.xml. It contains a general
62 stub for man page and several XML instructions to include:
64 - a list of global parameters (auto-generated);
66 - a list of service parameters (auto-generated);
68 - a complete list of alphabetically sorted parameters (auto-generated).
73 In order to combine and build final version of smb.conf(5) we apply a
74 set of XSLT stylesheets to smb.conf(5) sources. Following is the
75 complete description of existing stylesheets in smb.conf(5) source tree:
77 1. [expand-smb.conf.xsl] Main driver, produces big XML source with all
78 smaller components combined. The resulted tree is then feed to Docbook
79 XSL for final producing.
81 This stylesheet performs two main transformations:
83 - Replaces <samba:parameter> tag by <varlistentry> one;
85 - Generates <term> and <anchor> tags for each <samba:parameter>.
87 The latter step needs some explanation. We generate automatically
88 <anchor> and <term> tags based on meta-information about parameter. This
89 way all anchors have predictable names (capitalized parameter name with
90 all spaces supressed) and we really don't need to dublicate data.
92 There was only one exception to the generation rule in smb.conf.5.sgml:
93 "use spnego" parameter had anchor SPNEGO which is now unified to
94 USESPNEGO. This also fixes a bug in SWAT which was unable to find SPNEGO
97 2. [generate-context.xsl] An utility stylesheet which main purpose is to
98 produce a list of parameters which are applicable for selected context
101 The generate-context.xsl is run twice to generate both
102 parameters.global.xml and parameters.service.xml which are included then
103 by smb.conf.5.xml. This stylesheet relies on parameters.all.xml file
104 which is generated by [generate-file-list.sh] shell script.
106 The parameters.all.xml file contains a complete list of include
107 instructions for XSLT processor to include all small XML files from
110 3. [man.xsl] Our local copy of Docbook XML to man(5) transformer. It
111 fixes some annoying errors in official Docbook XSL stylesheets and adds
112 our tuned parameters. This file really belongs to upper level where it
113 would occur later, as we'll move to Docbook XML completely.
115 4. [split-original-smb.conf.xsl] This stylesheet isn't required anymore.
116 It was used for initial split of SGML-based smb.conf.5.sgml onto a set
117 of per-parameter XML files. I left it in source tree just for historical
123 1. Generate [parameters.all.xml]:
124 sh generate-file-list.sh >parameters.all.xml
126 2. Generate [parameters.global.xml]:
127 xsltproc --xinclude \
128 --param smb.context "'G'" \
129 --output parameters.global.xml \
130 generate-context.xsl parameters.all.xml
132 3. Generate [parameters.service.xml]:
133 xsltproc --xinclude \
134 --param smb.context "'S'" \
135 --output parameters.service.xml \
136 generate-context.xsl parameters.all.xml
138 4. Process smb.conf.5.xml (for example, to HTML):
139 xsltproc --xinclude expand-smb.conf.xsl smb.conf.5.xml | \
140 xsltproc http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl - > smb.conf.5.html
142 Note that in step 4 we are not saving preprocessed smb.conf.5.xml to
143 disk and directly passing it to the next XSLT processor (in this case --
144 Docbook XML to HTML generator).
146 For convenience, this sequence of commands is added into source tree as
149 Current state of converted parameters
150 -------------------------------------
152 Only 'base' parameters converted so far to serve as example of
155 All undocumented parameters are listed in doc-status file in of Samba's
158 Any help is greatly appreciated.