gipm-help-2.doap: make schumaml and myself additional maintainers
[gimp-help-2.git] / stylesheets / authors_docbook.xsl
blob4877e5cbafebf9b53ff4e1960376f34e6175d4fe
1 <?xml version="1.0" encoding="UTF-8"?>
3 <!-- simple XSL transformation to create a docbook section -->
5 <xsl:stylesheet version="1.0"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 xmlns:dc="http://purl.org/dc/elements/1.1/"
8 exclude-result-prefixes="dc">
10 <!-- template "lang.split" -->
11 <xsl:import href="authors_common.xsl" />
13 <xsl:output method="xml" encoding="UTF-8" indent="yes"
14 doctype-public="-//OASIS//DTD DocBook XML V4.3//EN"
15 doctype-system="http://www.docbook.org/xml/4.3/docbookx.dtd"/>
17 <xsl:param name="roles">creator documenter artist technican</xsl:param>
18 <xsl:param name="print.roles.with.lang">creator documenter</xsl:param>
21 <!-- ============================================================= -->
22 <xsl:template match="/dc:gimp-authors">
23 <!-- ============================================================= -->
24 <xsl:comment>
25 Do not edit this file directly. It was generated automatically
26 from "stylesheets/authors.xml".
27 </xsl:comment>
29 <sect1 id="gimp-team" lang="en">
30 <title>
31 <xsl:choose>
32 <xsl:when test="dc:title">
33 <xsl:value-of select="dc:title"/>
34 <xsl:text> Authors and Contributors</xsl:text>
35 </xsl:when>
36 <xsl:otherwise>
37 <acronym>GIMP</acronym> User Manual Authors and Contributors
38 </xsl:otherwise>
39 </xsl:choose>
40 </title>
42 <variablelist>
43 <!-- create recursively "varlistentry" nodes -->
44 <xsl:call-template name="print.listentry">
45 <xsl:with-param name="roles">
46 <xsl:value-of select="normalize-space($roles)"/>
47 </xsl:with-param>
48 </xsl:call-template>
49 </variablelist>
50 </sect1>
51 </xsl:template>
53 <!-- ============================================================= -->
54 <xsl:template name="print.listentry">
55 <!-- ============================================================= -->
56 <!-- parameter: space-separated list of roles -->
57 <xsl:param name="roles" select="''"/>
58 <xsl:variable name="role">
59 <xsl:choose>
60 <xsl:when test="contains($roles,' ')">
61 <xsl:value-of select="substring-before($roles,' ')"/>
62 </xsl:when>
63 <xsl:otherwise>
64 <xsl:value-of select="$roles"/>
65 </xsl:otherwise>
66 </xsl:choose>
67 </xsl:variable>
68 <xsl:if test="$role != ''">
69 <varlistentry>
70 <term>
71 <xsl:variable name="name" select="concat($role,'s')"/>
72 <xsl:choose>
73 <xsl:when test="$name = 'creators'">
74 <xsl:text>Content Writers</xsl:text>
75 </xsl:when>
76 <xsl:when test="$name = 'documenters'">
77 <xsl:text>Proof Reading</xsl:text>
78 </xsl:when>
79 <xsl:when test="$name = 'artists'">
80 <xsl:text>Graphics, Stylesheets</xsl:text>
81 </xsl:when>
82 <xsl:when test="$name = 'technicans'">
83 <xsl:text>Build System, Technical Contributions</xsl:text>
84 </xsl:when>
85 <xsl:otherwise>
86 <xsl:message>
87 <xsl:text>ERROR: Unknown role '</xsl:text>
88 <xsl:value-of select="$name"/>
89 <xsl:text>' in "authors_docbook.xml".</xsl:text>
90 </xsl:message>
91 <xsl:text>FIXME</xsl:text>
92 </xsl:otherwise>
93 </xsl:choose>
94 </term>
95 <listitem>
96 <simplelist type="inline">
97 <!-- whether to print "John Doe (English)" or "John Doe" -->
98 <xsl:variable name="with.language">
99 <xsl:choose>
100 <xsl:when test="contains($print.roles.with.lang, $role)">
101 <xsl:value-of select="1"/>
102 </xsl:when>
103 <xsl:otherwise>
104 <xsl:value-of select="0"/>
105 </xsl:otherwise>
106 </xsl:choose>
107 </xsl:variable>
108 <!-- extract authors and contributors -->
109 <xsl:choose>
110 <!-- technicans may be creators or contributors -->
111 <xsl:when test="$role = 'technican'">
112 <xsl:for-each select="//dc:contributor[contains(@role, $role)] |
113 //dc:creator[contains(@role, $role)]">
114 <xsl:call-template name="print.item">
115 <xsl:with-param name="print.language" select="$with.language"/>
116 </xsl:call-template>
117 </xsl:for-each>
118 </xsl:when>
119 <!-- print contributors? -->
120 <xsl:when test="$role != 'creator'">
121 <xsl:for-each select="//dc:contributor[contains(@role, $role)]">
122 <xsl:call-template name="print.item">
123 <xsl:with-param name="print.language" select="$with.language"/>
124 </xsl:call-template>
125 </xsl:for-each>
126 </xsl:when>
127 <!-- print creators -->
128 <xsl:otherwise>
129 <xsl:for-each select="//dc:creator">
130 <xsl:call-template name="print.item">
131 <xsl:with-param name="print.language" select="$with.language"/>
132 </xsl:call-template>
133 </xsl:for-each>
134 </xsl:otherwise>
135 </xsl:choose>
136 </simplelist>
137 </listitem>
138 </varlistentry>
139 <!-- if necessary, print next list entry -->
140 <xsl:if test="contains($roles,' ')">
141 <xsl:call-template name="print.listentry">
142 <xsl:with-param name="roles">
143 <xsl:value-of select="substring-after($roles,' ')"/>
144 </xsl:with-param>
145 </xsl:call-template>
146 </xsl:if>
147 </xsl:if>
148 </xsl:template>
150 <!-- ============================================================= -->
151 <xsl:template name="print.item">
152 <!-- ============================================================= -->
153 <xsl:param name="print.language">1</xsl:param>
154 <member>
155 <phrase>
156 <xsl:apply-templates match="." />
157 <xsl:if test="@lang != '' and $print.language != 0">
158 <xsl:text> (</xsl:text>
159 <xsl:call-template name="lang.split">
160 <xsl:with-param name="lang" select="@lang" />
161 </xsl:call-template>
162 <xsl:text>)</xsl:text>
163 </xsl:if>
164 </phrase>
165 </member>
166 </xsl:template>
167 </xsl:stylesheet>