]> granicus.if.org Git - docbook-dsssl/commitdiff
Handle othercredits on title pages
authorNorman Walsh <ndw@nwalsh.com>
Wed, 1 Aug 2001 00:51:39 +0000 (00:51 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 1 Aug 2001 00:51:39 +0000 (00:51 +0000)
xsl/html/titlepage.xsl

index 954a8d6c28d878d62d981c9602ce4be4dd332e85..9256e4f4dd8ff243a80affde57aa6947df4ce96e 100644 (file)
 <xsl:template match="contrib" mode="titlepage.mode">
   <span class="{name(.)}">
     <xsl:apply-templates mode="titlepage.mode"/>
-    <br/>
   </span>
 </xsl:template>
 
 </xsl:template>
 
 <xsl:template match="othercredit" mode="titlepage.mode">
-  <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
-  <xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
-  <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+  <xsl:variable name="contrib" select="string(contrib)"/>
+  <xsl:choose>
+    <xsl:when test="contrib">
+      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+        <p class="{name(.)}">
+          <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+          <xsl:text>: </xsl:text>
+          <xsl:call-template name="person.name"/>
+          <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+          <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+        </p>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <p class="{name(.)}"><xsl:call-template name="person.name"/></p>
+      <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.othercredits">
+  <xsl:text>, </xsl:text>
+  <xsl:call-template name="person.name"/>
 </xsl:template>
 
 <xsl:template match="othername" mode="titlepage.mode">