]> granicus.if.org Git - docbook-dsssl/commitdiff
Updated stylesheets to display data on titlepage from othercredit
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 30 Aug 2007 01:45:28 +0000 (01:45 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 30 Aug 2007 01:45:28 +0000 (01:45 +0000)
content (not just in author content). If there is an otherclass
attribute, the value of the is displayed. It really should also
look for the value of the class attribute, and use that unless it
is "other" (in which case it uses the otherclass value instead),
but that change will have to wait til later...

docbook/relaxng/docbook/howto/stylesheets/fo-ns.xsl
docbook/relaxng/docbook/howto/stylesheets/fo.xsl
docbook/relaxng/docbook/howto/stylesheets/html-ns.xsl
docbook/relaxng/docbook/howto/stylesheets/html.xsl

index 968e9b72e74b80377a4d1090939f8f394b5b7366..ecdaa674b8c6732caa3e5ce7cf61b431a3905048 100644 (file)
   <fo:block font-size="12pt" font-family="sans-serif">
     <xsl:text>Author</xsl:text>
     <xsl:if test="count(d:author) &gt; 1">s</xsl:if>
-    <xsl:text>:</xsl:text>
+    <xsl:if test="d:othercredit">
+      <xsl:text> and other credited contributors</xsl:text>
+    </xsl:if>
+   <xsl:text>:</xsl:text>
   </fo:block>
-  <xsl:apply-templates select="d:author" mode="howto-titlepage"/>
+  <xsl:apply-templates select="d:author|d:othercredit" mode="howto-titlepage"/>
 </xsl:template>
 
-<xsl:template match="d:author" mode="howto-titlepage">
+<xsl:template match="d:author|d:othercredit" mode="howto-titlepage">
   <fo:block xsl:use-attribute-sets="urilist">
     <xsl:apply-templates select="d:personname"/>
     <xsl:if test="d:email">
       <xsl:text>, </xsl:text>
       <xsl:apply-templates select="d:email"/>
     </xsl:if>
-  </fo:block>
+    <xsl:if test="@otherclass">
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="normalize-space(@otherclass)"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+ </fo:block>
 </xsl:template>
 
 <xsl:attribute-set name="monospace.properties">
index d45beb2ca29fb1ba92538d01ab6371b4a68c4b43..57daf83d302f03ef8009dbe732b807ceb69467ea 100644 (file)
   <fo:block font-size="12pt" font-family="sans-serif">
     <xsl:text>Author</xsl:text>
     <xsl:if test="count(author) &gt; 1">s</xsl:if>
+    <xsl:if test="othercredit">
+      <xsl:text> and other credited contributors</xsl:text>
+    </xsl:if>
     <xsl:text>:</xsl:text>
   </fo:block>
-  <xsl:apply-templates select="author" mode="howto-titlepage"/>
+  <xsl:apply-templates select="author|othercredit" mode="howto-titlepage"/>
 </xsl:template>
 
-<xsl:template match="author" mode="howto-titlepage">
+<xsl:template match="author|othercredit" mode="howto-titlepage">
   <fo:block xsl:use-attribute-sets="urilist">
     <xsl:apply-templates select="personname"/>
     <xsl:if test="email">
       <xsl:text>, </xsl:text>
       <xsl:apply-templates select="email"/>
     </xsl:if>
-  </fo:block>
+    <xsl:if test="@otherclass">
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="normalize-space(@otherclass)"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+ </fo:block>
 </xsl:template>
 
 <xsl:attribute-set name="monospace.properties">
index 6c5794dbe4f847119d2e9ecac12f41ab60789cb3..67b6cf43142db2a3f08486509263c917c8b6151a 100644 (file)
   <h4>
     <xsl:text>Author</xsl:text>
     <xsl:if test="count(d:author) &gt; 1">s</xsl:if>
+    <xsl:if test="d:othercredit">
+      <xsl:text> and other credited contributors</xsl:text>
+    </xsl:if>
     <xsl:text>:</xsl:text>
   </h4>
   <dl class="authorlist">
-    <xsl:apply-templates select="d:author" mode="howto-titlepage"/>
+    <xsl:apply-templates select="d:author|d:othercredit" mode="howto-titlepage"/>
   </dl>
 </xsl:template>
 
-<xsl:template match="d:author" mode="howto-titlepage">
+<xsl:template match="d:author|d:othercredit" mode="howto-titlepage">
   <dt>
     <xsl:apply-templates select="d:personname"/>
     <xsl:if test="d:email">
       <xsl:text>, </xsl:text>
       <xsl:apply-templates select="d:email"/>
     </xsl:if>
+    <xsl:if test="@otherclass">
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="normalize-space(@otherclass)"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
   </dt>
 </xsl:template>
 
index 3ea9edfc56834c86f17b1f99efd49f7a3826f7eb..cbccb252eddc5d739f1f1bde2d52e1f844ffca45 100644 (file)
   <h4>
     <xsl:text>Author</xsl:text>
     <xsl:if test="count(author) &gt; 1">s</xsl:if>
+    <xsl:if test="othercredit">
+      <xsl:text> and other credited contributors</xsl:text>
+    </xsl:if>
     <xsl:text>:</xsl:text>
   </h4>
   <dl class="authorlist">
-    <xsl:apply-templates select="author" mode="howto-titlepage"/>
+    <xsl:apply-templates select="author|othercredit" mode="howto-titlepage"/>
   </dl>
 </xsl:template>
 
-<xsl:template match="author" mode="howto-titlepage">
+<xsl:template match="author|othercredit" mode="howto-titlepage">
   <dt>
     <xsl:apply-templates select="personname"/>
     <xsl:if test="email">
       <xsl:text>, </xsl:text>
       <xsl:apply-templates select="email"/>
     </xsl:if>
+    <xsl:if test="@otherclass">
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="normalize-space(@otherclass)"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
   </dt>
 </xsl:template>