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

dmsmith at crosswire.org dmsmith at crosswire.org
Sat Feb 9 06:06:36 MST 2013


Author: dmsmith
Date: 2013-02-09 06:06:36 -0700 (Sat, 09 Feb 2013)
New Revision: 2268

Modified:
   trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
Log:
Update BibleDesktop's OSIS -> HTML to have SWORD standard variant support and to look for strong: and robinson: before x-Strongs: and x-Robinson. Probably should remove these deprecated x- values.

The old ThML WHNU used to have variants. That module is now OSIS.

Modified: trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
===================================================================
--- trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2013-02-09 13:02:52 UTC (rev 2267)
+++ trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2013-02-09 13:06:36 UTC (rev 2268)
@@ -91,6 +91,9 @@
   <!-- Whether to output superscript verse numbers or normal size ones -->
   <xsl:param name="TinyVNum" select="'true'"/>
 
+  <!-- Whether to output superscript verse numbers or normal size ones -->
+  <xsl:param name="Variant" select="'x-1'"/>
+
   <!-- The CSS stylesheet to use. The url must be absolute. -->
   <xsl:param name="css"/>
   
@@ -533,12 +536,12 @@
   <xsl:template match="w">
     <!-- Output the content followed by all the lemmas and then all the morphs. -->
     <xsl:apply-templates/>
-    <xsl:if test="$Strongs = 'true' and (starts-with(@lemma, 'x-Strongs:') or starts-with(@lemma, 'strong:'))">
+    <xsl:if test="$Strongs = 'true' and (starts-with(@lemma, 'strong:') or starts-with(@lemma, 'x-Strongs:'))">
       <xsl:call-template name="lemma">
         <xsl:with-param name="lemma" select="@lemma"/>
       </xsl:call-template>
     </xsl:if>
-    <xsl:if test="$Morph = 'true' and (starts-with(@morph, 'x-Robinson:') or starts-with(@morph, 'robinson:'))">
+    <xsl:if test="$Morph = 'true' and (starts-with(@morph, 'robinson:') or starts-with(@morph, 'x-Robinson:'))">
       <xsl:call-template name="morph">
         <xsl:with-param name="morph" select="@morph"/>
       </xsl:call-template>
@@ -562,12 +565,12 @@
   <xsl:template match="w" mode="jesus">
     <!-- Output the content followed by all the lemmas and then all the morphs. -->
     <xsl:apply-templates mode="jesus"/>
-    <xsl:if test="$Strongs = 'true' and (starts-with(@lemma, 'x-Strongs:') or starts-with(@lemma, 'strong:'))">
+    <xsl:if test="$Strongs = 'true' and (starts-with(@lemma, 'strong:') or starts-with(@lemma, 'x-Strongs:'))">
       <xsl:call-template name="lemma">
         <xsl:with-param name="lemma" select="@lemma"/>
       </xsl:call-template>
     </xsl:if>
-    <xsl:if test="$Morph = 'true' and (starts-with(@morph, 'x-Robinson:') or starts-with(@morph, 'robinson:'))">
+    <xsl:if test="$Morph = 'true' and (starts-with(@morph, 'robinson:') or starts-with(@morph, 'x-Robinson:'))">
       <xsl:call-template name="morph">
         <xsl:with-param name="morph" select="@morph"/>
       </xsl:call-template>
@@ -655,7 +658,7 @@
     <xsl:variable name="orig-morph" select="substring-after($morph, ':')"/>
     <xsl:variable name="protocol">
       <xsl:choose>
-        <xsl:when test="starts-with($orig-work, 'x-Robinson') or starts-with($orig-work, 'robinson')">
+        <xsl:when test="starts-with($orig-work, 'robinson') or starts-with($orig-work, 'x-Robinson')">
           <xsl:value-of select="$greek.morph.protocol"/>
         </xsl:when>
         <xsl:otherwise>
@@ -718,7 +721,7 @@
         <font size="{substring-before(substring-after(@type, 'font-size: '), ';')}"><xsl:apply-templates/></font>
       </xsl:when>
       <xsl:when test="@type = 'x-variant'">
-        <xsl:if test="@subType = 'x-class-1'">
+        <xsl:if test="@subType = $Variant">
           <xsl:apply-templates/>
         </xsl:if>
       </xsl:when>
@@ -737,7 +740,7 @@
         <font size="{substring-before(substring-after(@type, 'font-size: '), ';')}"><xsl:apply-templates mode="jesus"/></font>
       </xsl:when>
       <xsl:when test="@type = 'x-variant'">
-        <xsl:if test="@subType = 'x-class:1'">
+        <xsl:if test="@subType = $Variant">
           <xsl:apply-templates mode="jesus"/>
         </xsl:if>
       </xsl:when>




More information about the jsword-svn mailing list