]> granicus.if.org Git - docbook-dsssl/commitdiff
Cleanup
authorNorman Walsh <ndw@nwalsh.com>
Tue, 19 May 2009 13:53:49 +0000 (13:53 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 19 May 2009 13:53:49 +0000 (13:53 +0000)
docbook/relaxng/docbook/spec/fo.xsl

index 25d55c4f04204f3a13917ec6ce9297e54a973636..99a48bed68efaa2b9a3672895ad2555e80608d45 100644 (file)
   </fo:block>
 
   <fo:block margin-left="0.3in">
-    <xsl:for-each select="db:othercredit[@otherclass = 'chair']">
-      <fo:block>
-       <xsl:apply-templates select="db:personname"/>
-      </fo:block>
-    </xsl:for-each>
+    <xsl:apply-templates select="db:othercredit[@otherclass = 'chair']"
+                        mode="spec.titlepage"/>
   </fo:block>
 
   <xsl:variable name="editors" select="db:authorgroup/db:editor|db:editor"/>
   </fo:block>
 
   <fo:block margin-left="0.3in">
-    <xsl:for-each select="$editors">
-      <fo:block>
-       <xsl:apply-templates select="db:personname"/>
-      </fo:block>
-    </xsl:for-each>
+    <xsl:apply-templates select="$editors" mode="spec.titlepage"/>
   </fo:block>
 
   <xsl:variable name="replaces" select="db:bibliorelation[@type='replaces']"/>
   </fo:block>
 </xsl:template>
 
+<xsl:template match="db:editor|db:editor|db:othercredit" mode="spec.titlepage">
+  <fo:block>
+    <xsl:apply-templates select="db:personname" mode="spec.titlepage"/>
+    <xsl:if test="db:affiliation/db:orgname">
+      <xsl:text>, </xsl:text>
+      <xsl:apply-templates select="db:affiliation/db:orgname"/>
+    </xsl:if>
+    <xsl:if test="db:email">
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates select="db:email"/>
+    </xsl:if>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="db:personname" mode="spec.titlepage">
+  <fo:inline>
+    <xsl:apply-templates select="db:firstname"/>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates select="db:surname"/>
+  </fo:inline>
+</xsl:template>
+
 <!-- ============================================================ -->
 
 </xsl:stylesheet>