]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed handling of multiple authors in PDF metadata. Removed obsolete comment.
authorJirka Kosek <jirka@kosek.cz>
Wed, 29 Dec 2004 16:58:58 +0000 (16:58 +0000)
committerJirka Kosek <jirka@kosek.cz>
Wed, 29 Dec 2004 16:58:58 +0000 (16:58 +0000)
xsl/fo/xep.xsl

index d9eb307926ae7f35184247c76347a469bc5ba510..1e5cf42920e5c7a16e2fd8e09c5ddf34953315a9 100644 (file)
        * Document information (XEP 2.5 meta information extensions)
      ******************************************************************** -->
 
-<!-- ********************************************************************
-     Document information
-     In PDF bookmarks can't be used characters with code>255. This version of file
-     translates characters with code>255 back to ASCII.
-
-        Pavel Zampach (zampach@volny.cz)
-
-     ********************************************************************-->
-
 <!-- FIXME: Norm, I changed things so that the top-level element (book or set)
      does not appear in the TOC. Is this the right thing? -->
 
 <xsl:template name="xep-document-information">
   <rx:meta-info>
-    <xsl:if test="(//author)[1]">
+    <xsl:variable name="authors" select="(//author|//editor|//authorgroup)[1]"/>
+    <xsl:if test="$authors">
       <xsl:element name="rx:meta-field">
         <xsl:attribute name="name">author</xsl:attribute>
         <xsl:attribute name="value">
-          <xsl:call-template name="person.name">
-            <xsl:with-param name="node" select="(//author)[1]"/>
-          </xsl:call-template>
+          <xsl:choose>
+            <xsl:when test="$authors[self::authorgroup]">
+              <xsl:call-template name="person.name.list">
+                <xsl:with-param name="person.list" select="$authors/*[self::author|self::corpauthor|self::othercredit|self::editor]"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:call-template name="person.name">
+                <xsl:with-param name="node" select="$authors"/>
+              </xsl:call-template>
+            </xsl:otherwise>
+          </xsl:choose>
         </xsl:attribute>
       </xsl:element>
     </xsl:if>