libsmbconf: fix documentation of transaction calls.
[obnox/samba/samba-obnox.git] / docs-xml / xslt / generate-attributions.xsl
1 <?xml version='1.0'?>
2 <!--
3         Generate Docbook/XML file with attributions based on chapter/author tags
4         (C) Jelmer Vernooij 2003
5
6         Published under the GNU GPLv3 or later
7 -->
8 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9                                 version="1.1">
10
11 <xsl:output method="xml" doctype-public="-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" doctype-system="http://www.samba.org/samba/DTD/samba-doc" indent="yes"/>
12
13 <!-- Remove all character data -->
14 <xsl:template match="@*|node()">
15    <xsl:apply-templates select="@*|node()"/>
16 </xsl:template>
17
18 <xsl:template match="/">
19         <xsl:element name="preface">
20                 <xsl:element name="title"><xsl:text>Attribution</xsl:text></xsl:element>
21                 <xsl:apply-templates/>
22         </xsl:element>
23 </xsl:template>
24
25 <xsl:template match="chapter|preface">
26         <xsl:choose>
27                 <xsl:when test="chapterinfo/author != ''">
28                         <xsl:element name="para">
29                                 <xsl:element name="link">
30                                         <xsl:attribute name="linkend"><xsl:value-of select="@id"/></xsl:attribute>
31                                         <xsl:value-of select="title"/>
32                                 </xsl:element>
33                                 <xsl:text>&#10;&#9;</xsl:text>
34                                 <xsl:element name="itemizedlist">
35                                         <xsl:apply-templates/>
36                                 <xsl:text>&#9;</xsl:text>
37                                 </xsl:element>
38                                 <xsl:text>&#10;</xsl:text>
39                         </xsl:element>
40                 </xsl:when>
41         </xsl:choose>
42 </xsl:template>
43
44 <xsl:template match="chapterinfo/author">
45         <xsl:choose>
46         <xsl:when test="firstname != ''">
47         <xsl:text>&#9;</xsl:text>
48         <xsl:element name="listitem">
49                 <xsl:element name="para">
50                         <xsl:value-of select="firstname"/>
51                         <xsl:if test="othername != ''">
52                                 <xsl:text> </xsl:text>
53                                 <xsl:value-of select="othername"/>
54                                 <xsl:text> </xsl:text>
55                         </xsl:if>
56                         <xsl:text> </xsl:text><xsl:value-of select="surname"/>
57                         <xsl:choose>
58                                 <xsl:when test="affiliation/address/email != ''">
59                                         <xsl:element name="ulink">
60                                                 <xsl:attribute name="noescape">
61                                                 <xsl:text>1</xsl:text>
62                                                 </xsl:attribute>
63                                                 <xsl:attribute name="url">
64                                                         <xsl:text>mailto:</xsl:text>
65                                                         <xsl:value-of select="affiliation/address/email"/>
66                                                 </xsl:attribute>
67                                         </xsl:element>
68                                 </xsl:when>
69                         </xsl:choose>
70                         <xsl:choose>
71                                 <xsl:when test="contrib != ''">
72                                         <xsl:text> (</xsl:text>
73                                                 <xsl:value-of select="contrib"/>
74                                         <xsl:text>) </xsl:text>
75                                         </xsl:when>
76                         </xsl:choose>
77                 </xsl:element>
78         </xsl:element>
79         <xsl:text>&#10;</xsl:text>
80         </xsl:when>
81         </xsl:choose>
82 </xsl:template>
83
84 </xsl:stylesheet>