]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for mulitple authorinitial elements in a revhistory/revision.
authorBob Stayton <bobs@sagehill.net>
Tue, 8 Mar 2005 08:56:19 +0000 (08:56 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 8 Mar 2005 08:56:19 +0000 (08:56 +0000)
xsl/fo/block.xsl
xsl/fo/titlepage.xsl

index 3ee8fa208da5b8f71dc70929d2ecc26f3d38c802..ac0f38a60000c2ff6c84e57da0c86fd85645ffda 100644 (file)
 </xsl:template>
 
 <xsl:template match="revhistory/revision">
-  <xsl:variable name="revnumber" select=".//revnumber"/>
-  <xsl:variable name="revdate"   select=".//date"/>
-  <xsl:variable name="revauthor" select=".//authorinitials"/>
-  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <xsl:variable name="revnumber" select="revnumber"/>
+  <xsl:variable name="revdate"   select="date"/>
+  <xsl:variable name="revauthor" select="authorinitials"/>
+  <xsl:variable name="revremark" select="revremark|revdescription"/>
   <fo:table-row>
     <fo:table-cell>
       <fo:block>
     </fo:table-cell>
     <fo:table-cell>
       <fo:block>
-        <xsl:apply-templates select="$revauthor[1]"/>
+        <xsl:for-each select="$revauthor">
+          <xsl:apply-templates select="."/>
+          <xsl:if test="position() != last()">
+           <xsl:text>, </xsl:text>
+         </xsl:if>
+       </xsl:for-each>
       </fo:block>
     </fo:table-cell>
   </fo:table-row>
index 1ac8e86bd4db836e115e22191996d2aa02c0ac62..37c2ddb4438a235f1ada261c5cd4cdcdbc808171 100644 (file)
 </xsl:template>
 
 <xsl:template match="revhistory/revision" mode="titlepage.mode">
-  <xsl:variable name="revnumber" select=".//revnumber"/>
-  <xsl:variable name="revdate"   select=".//date"/>
-  <xsl:variable name="revauthor" select=".//authorinitials"/>
-  <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+  <xsl:variable name="revnumber" select="revnumber"/>
+  <xsl:variable name="revdate"   select="date"/>
+  <xsl:variable name="revauthor" select="authorinitials"/>
+  <xsl:variable name="revremark" select="revremark|revdescription"/>
   <fo:table-row>
     <fo:table-cell>
       <fo:block>
     </fo:table-cell>
     <fo:table-cell>
       <fo:block>
-        <xsl:apply-templates select="$revauthor[1]" mode="titlepage.mode"/>
+        <xsl:for-each select="$revauthor">
+          <xsl:apply-templates select="." mode="titlepage.mode"/>
+          <xsl:if test="position() != last()">
+            <xsl:text>, </xsl:text>
+          </xsl:if>
+        </xsl:for-each>
       </fo:block>
     </fo:table-cell>
   </fo:table-row>
 <!-- book recto -->
 
 <xsl:template match="bookinfo/authorgroup|info/authorgroup"
-             mode="titlepage.mode" priority="2">
+              mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:if test="@id">
       <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
 </xsl:template>
 
 <xsl:template match="bookinfo/author|info/author"
-             mode="titlepage.mode" priority="2">
+              mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:call-template name="person.name"/>
   </fo:block>
 </xsl:template>
 
 <xsl:template match="bookinfo/corpauthor|info/corpauthor"
-             mode="titlepage.mode" priority="2">
+              mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
 <xsl:template match="bookinfo/pubdate|info/pubdate"
-             mode="titlepage.mode" priority="2">
+              mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:call-template name="gentext">
       <xsl:with-param name="key" select="'published'"/>