[gimp-help/gimp-help-2-10] Issue #317: Change categories of AUTHORS



commit 3105a254b506dd1f7f9d04908a82f1f54e466ec7
Author: Jacob Boerema <jgboerema gmail com>
Date:   Sat Mar 19 19:10:00 2022 -0400

    Issue #317: Change categories of AUTHORS
    
    This commit implements a simplification and more consistent use of
    authors.xml.
    It also makes the output in AUTHORS and preface.html more alike.
    
    We don't use the creator tag anymore, but for now I didn't completely
    remove it from the dtd, jsut made it not required and not used in our
    current xsl files.
    
    I added an extra contributor role translator and moved all contributors
    with non English as language to that role.
    All English creators and contributors now are contributors with the
    documenter role.
    
    (cherry picked from commit 90d077a5255908e0774d3be64625f9d5f5610f73)

 stylesheets/authors.dtd         |   2 +-
 stylesheets/authors.xml         | 206 ++++++++++++++++++++--------------------
 stylesheets/authors_docbook.xsl |  18 ++--
 stylesheets/authors_text.xsl    | 147 +++++++++++++++++++++-------
 4 files changed, 225 insertions(+), 148 deletions(-)
---
diff --git a/stylesheets/authors.dtd b/stylesheets/authors.dtd
index bf077a46a..fd0c81863 100644
--- a/stylesheets/authors.dtd
+++ b/stylesheets/authors.dtd
@@ -1,6 +1,6 @@
 <!-- simple DTD for GIMP authors -->
 
-<!ELEMENT gimp-authors (creator+, contributor+)>
+<!ELEMENT gimp-authors (creator*, contributor+)>
 <!ATTLIST gimp-authors xmlns CDATA #FIXED "http://purl.org/dc/elements/1.1/";>
 
 <!ELEMENT creator (#PCDATA)>
diff --git a/stylesheets/authors.xml b/stylesheets/authors.xml
index 65e911372..123712f66 100644
--- a/stylesheets/authors.xml
+++ b/stylesheets/authors.xml
@@ -1,116 +1,112 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE gimp-authors SYSTEM "authors.dtd">
 
-<!-- This file is supposed to list all gimp-help documenters and contributors.-->
+<!-- This file is supposed to list all gimp-help contributors.-->
+<!-- There are 4 contributor roles defined: documenter, translator, artist and technican. -->
 <!-- It's in XML format so that it can easily be used for the About dialog. -->
 <!-- It has been copied from gimp and customized. -->
 
 <gimp-authors xmlns="http://purl.org/dc/elements/1.1/";>
-  <title>GIMP User Manual</title>
-  <creator role="documenter" lang="es">Alex Muñoz</creator>
-  <creator role="documenter" lang="fr">Alexandre Franke</creator>
-  <creator role="documenter" lang="ru">Alexandre Prokoudine</creator>
-  <creator role="documenter" lang="es">Angelo Córdoba Inunza</creator>
-  <creator role="documenter" lang="de">Christian Kirbach</creator>
-  <creator role="documenter" lang="es">Daniel Francis</creator>
-  <creator role="documenter" lang="es">Daniel Mustieles</creator>
-  <creator role="documenter" lang="de">Daniel Winzen</creator>
-  <creator role="documenter" lang="zh_CN">Delin Chang</creator>
-  <creator role="documenter" lang="el">Dimitris Spingos</creator>
-  <creator role="documenter" lang="pt_BR">Djavan Fagundes</creator>
-  <creator role="documenter" lang="pt_BR">Enrico Nicoletto</creator>
-  <creator role="documenter" lang="pt_BR">Felipe Ribeiro</creator>
-  <creator role="documenter" lang="es">Guiu Rocafort</creator>
-  <creator role="documenter" lang="ja">Jiro Matsuzawa</creator>
-  <creator role="documenter" lang="da">Joe Hansen</creator>
-  <creator role="documenter" lang="pt_BR">João S. O. Bueno</creator>
-  <creator role="documenter" lang="fr en">Julien Hardelin</creator>
-  <creator role="technican" lang="da">Kenneth Nielsen</creator>
-  <creator role="documenter" lang="nn">Kolbjørn Stuestøl</creator>
-  <creator role="documenter" lang="it">Marco Ciampa</creator>
-  <creator role="documenter" lang="es">María Majadas</creator>
-  <creator role="documenter" lang="es">Milagros Infante Montero</creator>
-  <creator role="documenter" lang="it">Milo Casagrande</creator>
-  <creator role="documenter" lang="pl">Piotr Drąg</creator>
-  <creator role="documenter" lang="pt_BR">Rafael Ferreira</creator>
-  <creator role="documenter artist technican" lang="de en">Róman Joost</creator>
-  <creator role="documenter" lang="ko">Seong-ho Cho</creator>
-  <creator role="documenter" lang="ja">SimaMoto,RyōTa (島本良太)</creator>
-  <creator role="documenter" lang="de en">Sven Claussner</creator>
-  <creator role="documenter" lang="fi">Timo Jyrinki</creator>
-  <creator role="documenter" lang="de">Ulf-D. Ehlert</creator>
-  <creator role="documenter" lang="ru">Vitaly Lomov</creator>
-  <creator role="documenter" lang="pt_BR">Willer Gomes Junior</creator>
-  <creator role="documenter" lang="ru">Yuri Myasoedov</creator>
-  <creator role="documenter" lang="ca">Equip de Softcatalà</creator>
-  <creator role="documenter" lang="en">Jacob Boerema (Wormnest)</creator>
-
-  <contributor role="documenter" lang="fr">Stéphane Poumaer</contributor>
-  <contributor role="documenter technican" lang="de en">Axel Wernicke</contributor>
-  <contributor role="documenter" lang="it">Alessandro Falappa</contributor>
-  <contributor role="documenter" lang="es">Manuel Quiñones</contributor>
-  <contributor role="documenter" lang="es">Ignacio AntI</contributor>
-  <contributor role="documenter" lang="ko">Choi Ji-Hui(최지희)</contributor>
-  <contributor role="documenter technican" lang="ru">Nickolay V. Shmyrev</contributor>
-  <contributor role="documenter" lang="sv">Albin Bernharsson</contributor>
-  <contributor role="documenter" lang="sv">Daniel Nylander</contributor>
-  <contributor role="documenter" lang="pl">Patrycja Stawiarska</contributor>
-  <contributor role="documenter" lang="en">Andrew Pitonyak</contributor>
-  <contributor role="documenter" lang="cs en">Jakub Friedl</contributor>
-  <contributor role="documenter" lang="nl">Hans De Jonge</contributor>
-  <contributor role="documenter" lang="nl">Raymon Van Wanrooij</contributor>
-  <contributor role="documenter" lang="hr">Semka Kuloviæ-Debals</contributor>
-  <contributor role="documenter" lang="en">Sally C. Barry</contributor>
+  <contributor role="translator" lang="de">Adolf Gerold</contributor>
+  <contributor role="translator" lang="sv">Albin Bernharsson</contributor>
+  <contributor role="translator" lang="it">Alessandro Falappa</contributor>
+  <contributor role="translator" lang="es">Alex Muñoz</contributor>
+  <contributor role="translator" lang="de">Alexander Weiher</contributor>
+  <contributor role="translator" lang="fr">Alexandre Franke</contributor>
+  <contributor role="documenter translator" lang="ru">Alexandre Prokoudine</contributor>
+  <contributor role="translator" lang="it">Andrea Zito</contributor>
+  <contributor role="documenter">Andrew Pitonyak</contributor>
+  <contributor role="translator" lang="es">Angelo Córdoba Inunza</contributor>
+  <contributor role="technican">Anne Schneider</contributor>
+  <contributor role="documenter translator technican" lang="de">Axel Wernicke</contributor>
+  <contributor role="translator" lang="de">Ben</contributor>
+  <contributor role="translator" lang="zh_CN">Cai Qian (蔡芊)</contributor>
+  <contributor role="documenter">Calum Mackay</contributor>
+  <contributor role="translator" lang="fr">Cédric Gémy</contributor>
+  <contributor role="translator" lang="ko">Choi Ji-Hui(최지희)</contributor>
+  <contributor role="technican">Chris Hübsch</contributor>
+  <contributor role="translator" lang="de">Christian Kirbach</contributor>
+  <contributor role="documenter technican">Daniel Egger</contributor>
+  <contributor role="translator" lang="es">Daniel Francis</contributor>
+  <contributor role="documenter">Daniel Hornung</contributor>
+  <contributor role="translator" lang="es">Daniel Mustieles</contributor>
+  <contributor role="translator" lang="sv">Daniel Nylander</contributor>
+  <contributor role="technican">Daniel Richard</contributor>
+  <contributor role="translator" lang="de">Daniel Winzen</contributor>
+  <contributor role="documenter">Daryl Lee</contributor>
+  <contributor role="translator" lang="cs">David 'Ilicz' Klementa</contributor>
+  <contributor role="translator" lang="zh_CN">Delin Chang</contributor>
+  <contributor role="translator" lang="el">Dimitris Spingos</contributor>
+  <contributor role="translator" lang="pt_BR">Djavan Fagundes</contributor>
+  <contributor role="translator" lang="de">Domingo Stephan</contributor>
+  <contributor role="translator" lang="pt_BR">Enrico Nicoletto</contributor>
+  <contributor role="translator" lang="ca">Equip de Softcatalà</contributor>
+  <contributor role="translator" lang="zh_CN">Eric Lamarque</contributor>
+  <contributor role="translator" lang="pt_BR">Felipe Ribeiro</contributor>
+  <contributor role="translator" lang="ru">Grigory Bakunov</contributor>
+  <contributor role="translator" lang="es">Guiu Rocafort</contributor>
+  <contributor role="translator" lang="nl">Hans De Jonge</contributor>
+  <contributor role="technican">Henrik Brix Andersen (brix)</contributor>
+  <contributor role="translator" lang="es">Ignacio AntI</contributor>
+  <contributor role="documenter technican">Jacob Boerema (Wormnest)</contributor>
+  <contributor role="documenter translator" lang="cs">Jakub Friedl</contributor>
   <contributor role="artist">Jakub Steiner</contributor>
-  <contributor role="documenter technican" lang="en">Daniel Egger</contributor>
-  <contributor role="artist">Øyvind Kolås</contributor>
-  <contributor role="technican documenter" lang="en de">Sven Neumann</contributor>
+  <contributor role="documenter">Jan Smith</contributor>
+  <contributor role="translator" lang="ja">Jiro Matsuzawa</contributor>
+  <contributor role="translator" lang="da">Joe Hansen</contributor>
+  <contributor role="translator" lang="pt_BR">João S. O. Bueno</contributor>
+  <contributor role="documenter translator" lang="fr">Julien Hardelin</contributor>
+  <contributor role="translator" lang="fr">Karine Delvare</contributor>
+  <contributor role="technican" lang="da">Kenneth Nielsen</contributor>
+  <contributor role="translator" lang="nn">Kolbjørn Stuestøl</contributor>
+  <contributor role="translator" lang="es">Manuel Quiñones</contributor>
+  <contributor role="documenter translator" lang="it">Marco Ciampa</contributor>
+  <contributor role="translator" lang="it">Marco Marega</contributor>
+  <contributor role="translator" lang="es">María Majadas</contributor>
+  <contributor role="translator" lang="de">Markus Reinhardt</contributor>
+  <contributor role="documenter">Mel Boyce (syngin)</contributor>
+  <contributor role="translator" lang="de">Michael Hölzen</contributor>
   <contributor role="technican">Michael Natterer (mitch)</contributor>
-  <contributor role="technican">Henrik Brix Andersen (brix)</contributor>
-  <contributor role="technican">Thomas Schraitle</contributor>
-  <contributor role="technican">Chris Hübsch</contributor>
-  <contributor role="technican">Anne Schneider</contributor>
+  <contributor role="documenter">Mick Curtis</contributor>
+  <contributor role="translator" lang="it">Mike Vargas</contributor>
+  <contributor role="translator" lang="es">Milagros Infante Montero</contributor>
+  <contributor role="translator" lang="it">Milo Casagrande</contributor>
+  <contributor role="translator technican" lang="ru">Nickolay V. Shmyrev</contributor>
+  <contributor role="translator" lang="sv">Niklas Mattison</contributor>
+  <contributor role="documenter">Oliver Ellis (Red Haze)</contributor>
+  <contributor role="translator" lang="nl">Oliver Heesakke</contributor>
+  <contributor role="translator" lang="ru">Oleg Fritz</contributor>
+  <contributor role="artist">Øyvind Kolås</contributor>
+  <contributor role="translator" lang="pl">Patrycja Stawiarska</contributor>
   <contributor role="technican">Peter Volkov</contributor>
-  <contributor role="technican">Daniel Richard</contributor>
-  <contributor role="technican">Jacob Boerema (Wormnest)</contributor>
-  <contributor role="documenter" lang="de">Domingo Stephan</contributor>
-  <contributor role="documenter" lang="de">Thomas Lotze</contributor>
-  <contributor role="documenter" lang="de">Thomas Güttler</contributor>
-  <contributor role="documenter" lang="zh_CN">Zhong Yaotang</contributor>
-  <contributor role="documenter" lang="en">Calum Mackay</contributor>
-  <contributor role="documenter" lang="de">Thomas S Lendo</contributor>
-  <contributor role="documenter" lang="en">Mel Boyce (syngin)</contributor>
-  <contributor role="documenter" lang="en">Oliver Ellis (Red Haze)</contributor>
-  <contributor role="documenter" lang="de">Markus Reinhardt</contributor>
-  <contributor role="documenter" lang="de">Alexander Weiher</contributor>
-  <contributor role="documenter" lang="de">Michael Hölzen</contributor>
-  <contributor role="documenter" lang="fr">Raymond Ostertag</contributor>
-  <contributor role="documenter" lang="fr">Cédric Gémy</contributor>
-  <contributor role="documenter" lang="fr">Sébastien Barre</contributor>
-  <contributor role="documenter" lang="sv">Niklas Mattison</contributor>
-  <contributor role="documenter" lang="en">Daryl Lee</contributor>
-  <contributor role="documenter" lang="en">William Skaggs</contributor>
-  <contributor role="documenter" lang="zh_CN">Cai Qian (蔡芊)</contributor>
-  <contributor role="documenter" lang="zh_CN">Yang Hong (杨红)</contributor>
-  <contributor role="documenter" lang="zh_CN">Xceals</contributor>
-  <contributor role="documenter" lang="zh_CN">Eric Lamarque</contributor>
-  <contributor role="documenter" lang="nl">Robert van Drunen</contributor>
-  <contributor role="documenter" lang="it">Marco Marega</contributor>
-  <contributor role="documenter" lang="it">Mike Vargas</contributor>
-  <contributor role="documenter" lang="it">Andrea Zito</contributor>
-  <contributor role="documenter" lang="fr">Karine Delvare</contributor>
-  <contributor role="documenter" lang="cs">David 'Ilicz' Klementa</contributor>
-  <contributor role="documenter" lang="en">Jan Smith</contributor>
-  <contributor role="documenter" lang="de">Adolf Gerold</contributor>
-  <contributor role="documenter" lang="ru">Roxana Chernogolova</contributor>
-  <contributor role="documenter" lang="ru">Grigory Bakunov</contributor>
-  <contributor role="documenter" lang="ru">Oleg Fritz</contributor>
-  <contributor role="documenter" lang="en">Mick Curtis</contributor>
-  <contributor role="documenter" lang="ru">Vitaly Lomov</contributor>
-  <contributor role="documenter" lang="fr">Pierre PERRIER</contributor>
-  <contributor role="documenter" lang="nl">Oliver Heesakke</contributor>
-  <contributor role="documenter" lang="en de">Susanne Schmidt</contributor>
-  <contributor role="documenter" lang="de">Ben</contributor>
-  <contributor role="documenter" lang="en">Daniel Hornung</contributor>
-  <contributor role="documenter" lang="en de">Sven Claussner</contributor>
+  <contributor role="translator" lang="fr">Pierre PERRIER</contributor>
+  <contributor role="documenter translator" lang="pl">Piotr Drąg</contributor>
+  <contributor role="translator" lang="pt_BR">Rafael Ferreira</contributor>
+  <contributor role="translator" lang="nl">Raymon Van Wanrooij</contributor>
+  <contributor role="translator" lang="fr">Raymond Ostertag</contributor>
+  <contributor role="translator" lang="nl">Robert van Drunen</contributor>
+  <contributor role="documenter translator artist technican" lang="de">Róman Joost</contributor>
+  <contributor role="translator" lang="ru">Roxana Chernogolova</contributor>
+  <contributor role="documenter">Sally C. Barry</contributor>
+  <contributor role="translator" lang="fr">Sébastien Barre</contributor>
+  <contributor role="translator" lang="hr">Semka Kuloviæ-Debals</contributor>
+  <contributor role="translator" lang="ko">Seong-ho Cho</contributor>
+  <contributor role="translator" lang="ja">SimaMoto,RyōTa (島本良太)</contributor>
+  <contributor role="translator" lang="fr">Stéphane Poumaer</contributor>
+  <contributor role="documenter translator" lang="de">Susanne Schmidt</contributor>
+  <contributor role="documenter translator" lang="de">Sven Claussner</contributor>
+  <contributor role="documenter technican translator" lang="de">Sven Neumann</contributor>
+  <contributor role="translator" lang="de">Thomas Güttler</contributor>
+  <contributor role="translator" lang="de">Thomas S Lendo</contributor>
+  <contributor role="translator" lang="de">Thomas Lotze</contributor>
+  <contributor role="technican">Thomas Schraitle</contributor>
+  <contributor role="translator" lang="fi">Timo Jyrinki</contributor>
+  <contributor role="translator" lang="de">Ulf-D. Ehlert</contributor>
+  <contributor role="translator" lang="ru">Vitaly Lomov</contributor>
+  <contributor role="translator" lang="pt_BR">Willer Gomes Junior</contributor>
+  <contributor role="documenter">William Skaggs</contributor>
+  <contributor role="translator" lang="zh_CN">Xceals</contributor>
+  <contributor role="translator" lang="zh_CN">Yang Hong (杨红)</contributor>
+  <contributor role="translator" lang="ru">Yuri Myasoedov</contributor>
+  <contributor role="translator" lang="zh_CN">Zhong Yaotang</contributor>
 </gimp-authors>
diff --git a/stylesheets/authors_docbook.xsl b/stylesheets/authors_docbook.xsl
index c5f19d33f..3240ab31a 100644
--- a/stylesheets/authors_docbook.xsl
+++ b/stylesheets/authors_docbook.xsl
@@ -14,8 +14,8 @@
               doctype-public="-//OASIS//DTD DocBook XML V4.3//EN"
               doctype-system="http://www.docbook.org/xml/4.3/docbookx.dtd"/>
 
-  <xsl:param name="roles">creator documenter artist technican</xsl:param>
-  <xsl:param name="print.roles.with.lang">creator documenter</xsl:param>
+  <xsl:param name="roles">documenter translator artist technican</xsl:param>
+  <xsl:param name="print.roles.with.lang">translator</xsl:param>
 
 
   <!-- ============================================================= -->
@@ -38,7 +38,7 @@
           </xsl:otherwise>
         </xsl:choose>
       </title>
-    
+
       <variablelist>
         <!-- create recursively "varlistentry" nodes -->
         <xsl:call-template name="print.listentry">
@@ -47,7 +47,7 @@
           </xsl:with-param>
         </xsl:call-template>
       </variablelist>
-    </sect1> 
+    </sect1>
   </xsl:template>
 
   <!-- ============================================================= -->
@@ -70,11 +70,11 @@
         <term>
           <xsl:variable name="name" select="concat($role,'s')"/>
           <xsl:choose>
-            <xsl:when test="$name = 'creators'">
-              <xsl:text>Content Writers</xsl:text>
-            </xsl:when>
             <xsl:when test="$name = 'documenters'">
-              <xsl:text>Proof Reading</xsl:text>
+              <xsl:text>Documentation</xsl:text>
+            </xsl:when>
+            <xsl:when test="$name = 'translators'">
+              <xsl:text>Translations</xsl:text>
             </xsl:when>
             <xsl:when test="$name = 'artists'">
               <xsl:text>Graphics, Stylesheets</xsl:text>
@@ -85,7 +85,7 @@
             <xsl:otherwise>
               <xsl:message>
                 <xsl:text>ERROR: Unknown role '</xsl:text>
-                <xsl:value-of select="$name"/> 
+                <xsl:value-of select="$name"/>
                 <xsl:text>' in "authors_docbook.xml".</xsl:text>
               </xsl:message>
               <xsl:text>FIXME</xsl:text>
diff --git a/stylesheets/authors_text.xsl b/stylesheets/authors_text.xsl
index 11669a84a..53f8be209 100644
--- a/stylesheets/authors_text.xsl
+++ b/stylesheets/authors_text.xsl
@@ -11,56 +11,137 @@
 
   <xsl:output method="text" />
 
+  <xsl:param name="roles">documenter translator artist technican</xsl:param>
+  <xsl:param name="print.roles.with.lang">translator</xsl:param>
+
   <xsl:template match="/dc:gimp-authors">
     <xsl:text>This file is generated from authors.xml, do not edit it directly.
-</xsl:text>
+
+GIMP User Manual Contributors
+=============================</xsl:text>
+    <xsl:call-template name="print.listentry">
+      <xsl:with-param name="roles">
+        <xsl:value-of select="normalize-space($roles)"/>
+      </xsl:with-param>
+    </xsl:call-template>
     <xsl:text>
-Active Contributors
-===================
 </xsl:text>
-    <xsl:apply-templates select="//dc:creator" />
+  </xsl:template>
 
-    <xsl:text>
+  <!-- ============================================================= -->
+  <xsl:template name="print.listentry">
+  <!-- ============================================================= -->
+    <!-- parameter: space-separated list of roles -->
+    <xsl:param name="roles" select="''"/>
+    <xsl:variable name="role">
+      <xsl:choose>
+        <xsl:when test="contains($roles,' ')">
+          <xsl:value-of select="substring-before($roles,' ')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$roles"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="$role != ''">
+      <xsl:variable name="name" select="concat($role,'s')"/>
+      <xsl:choose>
+        <xsl:when test="$name = 'documenters'">
+          <xsl:text>
 
-Contributors in the past
-========================
+Documentation
+-------------</xsl:text>
+        </xsl:when>
+        <xsl:when test="$name = 'translators'">
+          <xsl:text>
 
-Writers
--------
-</xsl:text>
-    <xsl:apply-templates select="//dc:contributor[contains(@role, 'documenter')]" />
+Translations
+------------</xsl:text>
+        </xsl:when>
+        <xsl:when test="$name = 'artists'">
+          <xsl:text>
 
-    <xsl:text>
 Graphics, Stylesheets
----------------------
-</xsl:text>
-    <xsl:apply-templates select="//dc:contributor[contains(@role, 'artist')]" />
+---------------------</xsl:text>
+        </xsl:when>
+        <xsl:when test="$name = 'technicans'">
+          <xsl:text>
 
-    <xsl:text>
-Buildsystem, Technical Contributions
-------------------------------------
-</xsl:text>
-    <xsl:apply-templates select="//dc:contributor[contains(@role, 'technican')]">
-      <xsl:with-param name="print_language" select="0" />
-    </xsl:apply-templates>
+Build System, Technical Contributions
+-------------------------------------</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message>
+            <xsl:text>ERROR: Unknown role '</xsl:text>
+            <xsl:value-of select="$name"/>
+            <xsl:text>' in "authors_docbook.xml".</xsl:text>
+          </xsl:message>
+          <xsl:text>FIXME</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      <!-- whether to print "John Doe (English)" or "John Doe" -->
+      <xsl:variable name="with.language">
+        <xsl:choose>
+          <xsl:when test="contains($print.roles.with.lang, $role)">
+            <xsl:value-of select="1"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="0"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <!-- extract authors and contributors -->
+      <xsl:choose>
+        <!-- technicans may be creators or contributors -->
+        <xsl:when test="$role = 'technican'">
+          <xsl:for-each select="//dc:contributor[contains(@role, $role)] |
+                                //dc:creator[contains(@role, $role)]">
+            <xsl:call-template name="print.item">
+              <xsl:with-param name="print.language" select="$with.language"/>
+            </xsl:call-template>
+          </xsl:for-each>
+        </xsl:when>
+        <!-- print contributors? -->
+        <xsl:when test="$role != 'creator'">
+          <xsl:for-each select="//dc:contributor[contains(@role, $role)]">
+            <xsl:call-template name="print.item">
+              <xsl:with-param name="print.language" select="$with.language"/>
+            </xsl:call-template>
+          </xsl:for-each>
+        </xsl:when>
+        <!-- print creators -->
+        <xsl:otherwise>
+          <xsl:for-each select="//dc:creator">
+            <xsl:call-template name="print.item">
+              <xsl:with-param name="print.language" select="$with.language"/>
+            </xsl:call-template>
+          </xsl:for-each>
+        </xsl:otherwise>
+      </xsl:choose>
+      <!-- if necessary, print next list entry -->
+      <xsl:if test="contains($roles,' ')">
+        <xsl:call-template name="print.listentry">
+          <xsl:with-param name="roles">
+            <xsl:value-of select="substring-after($roles,' ')"/>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
 
+  <!-- ============================================================= -->
+  <xsl:template name="print.item">
+  <!-- ============================================================= -->
+    <xsl:param name="print.language">1</xsl:param>
     <xsl:text>
 </xsl:text>
-  </xsl:template>
- 
-  <!-- Print creator/contributor and (optionally) his/her languages -->
-  <xsl:template match="//dc:creator | //dc:contributor">
-    <xsl:param name="print_language">1</xsl:param>
-    <xsl:value-of select="."/>
-    <xsl:if test="@lang != '' and $print_language != 0">
-      <xsl:text> (</xsl:text>
+<xsl:apply-templates match="." />
+    <xsl:if test="@lang != '' and $print.language != 0">
+      <xsl:text>(</xsl:text>
       <xsl:call-template name="lang.split">
         <xsl:with-param name="lang" select="@lang" />
       </xsl:call-template>
       <xsl:text>)</xsl:text>
     </xsl:if>
-    <xsl:text>
-</xsl:text>
   </xsl:template>
-
 </xsl:stylesheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]