2 <!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
3 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
4 xmlns:
exsl=
"http://exslt.org/common"
5 xmlns:
samba=
"http://www.samba.org/samba/DTD/samba-doc"
7 extension-element-prefixes=
"exsl">
9 <xsl:output method=
"xml"/>
11 <!-- Parse all varlistentries and extract those of them which are descriptions of smb.conf
12 parameters. We determine them by existence of <anchor> element inside <term> element.
13 If <anchor> is there, then its 'id' attribute is translated to lower case and is used
14 as basis for file name for that parameter.
16 <xsl:template match=
"smbfile">
17 <!-- reconstruct varlistentry - not all of them will go into separate files
18 and also we must repair the main varlistentry itself.
20 <xsl:variable name=
"content">
21 <xsl:apply-templates/>
23 <!-- Now put varlistentry into separate file _if_ it has anchor associated with it -->
24 <xsl:variable name=
"filename"><xsl:text>output/examples/
</xsl:text><xsl:value-of select=
"@name"/></xsl:variable>
25 <!-- Debug message for an operator, just to show progress of processing :) -->
27 <xsl:text>Writing
</xsl:text>
28 <xsl:value-of select=
"$filename"/>
30 <!-- Write finally varlistentry to a separate file -->
31 <exsl:document href=
"{$filename}"
35 omit-xml-declaration=
"yes">
36 <xsl:copy-of select=
"$content"/>