[jsword-svn] r2202 - trunk/bibledesktop/src/main/resources/xsl/cswing

dmsmith at crosswire.org dmsmith at crosswire.org
Sun Jan 8 22:09:51 MST 2012


Author: dmsmith
Date: 2012-01-08 22:09:51 -0700 (Sun, 08 Jan 2012)
New Revision: 2202

Modified:
   trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
Log:
Fixed a title bug causing the title to show up twice. Also centered headings.

Modified: trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
===================================================================
--- trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2012-01-07 23:53:07 UTC (rev 2201)
+++ trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2012-01-09 05:09:51 UTC (rev 2202)
@@ -146,7 +146,7 @@
           H4 { font-size:  90%; font-weight: bold; }
           H5 { font-size:  85%; font-weight: bold; }
           H6 { font-size:  80%; font-weight: bold; }
-          .heading { color: #669966; }
+          .heading { color: #669966; text-align: center; }
           .canonical { color: #666699; }
           .gen { color: #996666; }
           div.margin { font-size:90%; }
@@ -466,7 +466,7 @@
 
   <xsl:template match="note" mode="jesus">
     <xsl:if test="$Notes = 'true'">
-     <!-- If there is a following sibling that is a note, emit a separator -->
+      <!-- If there is a following sibling that is a note, emit a separator -->
       <xsl:variable name="siblings" select="../child::node()"/>
       <xsl:variable name="next-position" select="position() + 1"/>
       <xsl:choose>
@@ -783,22 +783,27 @@
   </xsl:template>
 
   <!--=======================================================================-->
-  <xsl:template match="title[@subType ='x-preverse' or @subtype = 'x-preverse']">
+  <xsl:template match="title[@subType ='x-preverse' or @subtype = 'x-preverse']" priority="1">
   <!-- Done by a line in [verse]
-    <h3 class="heading">
-      <xsl:apply-templates/>
-    </h3>
+    <xsl:call-template name="render-title"/>
   -->
   </xsl:template>
 
-  <xsl:template match="title[@subType ='x-preverse' or @subtype = 'x-preverse']" mode="jesus">
+  <xsl:template match="title[@subType ='x-preverse' or @subtype = 'x-preverse']" priority="1" mode="jesus">
   <!-- Done by a line in [verse]
-    <h3 class="heading">
-      <xsl:apply-templates/>
-    </h3>
+    <xsl:call-template name="render-title"/>
   -->
   </xsl:template>
  
+  <!--=======================================================================-->
+  <xsl:template match="title" priority="0">
+    <xsl:call-template name="render-title"/>
+  </xsl:template>
+
+  <xsl:template match="title" priority="0" mode="jesus">
+    <xsl:call-template name="render-title"/>
+  </xsl:template>
+
  <!--=======================================================================-->
   <xsl:template name="render-title">
     <!-- Always show canonical titles or if headings is turned on -->
@@ -840,24 +845,6 @@
   </xsl:template>
 
   <!--=======================================================================-->
-  <xsl:template match="title[@level]">
-    <xsl:call-template name="render-title"/>
-  </xsl:template>
-
-  <xsl:template match="title[@level]" mode="jesus">
-    <xsl:call-template name="render-title"/>
-  </xsl:template>
-
-  <!--=======================================================================-->
-  <xsl:template match="title">
-    <xsl:call-template name="render-title"/>
-  </xsl:template>
-
-  <xsl:template match="title" mode="jesus">
-    <xsl:call-template name="render-title"/>
-  </xsl:template>
-
-  <!--=======================================================================-->
   <xsl:template match="reference">
     <xsl:choose>
       <xsl:when test="$XRef = 'true'">




More information about the jsword-svn mailing list