[jsword-devel] Lexical Word form in MorphGNT
Mullins, Steven
Steven.Mullins at dmme.virginia.gov
Wed May 14 09:32:19 MST 2008
This is my first code contribution to this project. Woo Hoo!
Right now in the MorphGNT module, if Strongs numbers are checked yes, nothing is shown. This is because in the MorphGNT module, the value for the strongs numbers in the source is not a strongs number, it is the dictionary (lexical) form of the word. With this code added, and strongs checked yes, the lexical form will display inline in square brackets. The other modules do not appear to be affected.
Changes were made based on revision 1859.
bibledesktop.diff
Index: src/main/resources/xsl/cswing/simple.xsl
===================================================================
--- src/main/resources/xsl/cswing/simple.xsl (revision 1859)
+++ src/main/resources/xsl/cswing/simple.xsl (working copy)
@@ -130,6 +130,7 @@
SUB.lemma { font-size: 75%; color: red; }
SUP.verse { font-size: 75%; color: gray; }
SUP.note { font-size: 75%; color: green; }
+ FONT.lex { color: red; }
FONT.jesus { color: red; }
FONT.speech { color: blue; }
FONT.strike { text-decoration: line-through; }
@@ -528,6 +529,11 @@
<xsl:with-param name="morph" select="@morph"/>
</xsl:call-template>
</xsl:if>
+ <xsl:if test="$Strongs = 'true' and starts-with(@lemma, 'lemma.Strong:')">
+ <xsl:call-template name="lemma">
+ <xsl:with-param name="lemma" select="@lemma"/>
+ </xsl:call-template>
+ </xsl:if>
<!--
except when followed by a text node or non-printing node.
This is true whether the href is output or not.
@@ -572,8 +578,11 @@
<xsl:when test="substring($orig-lemma, 1, 1) = 'H'">
<xsl:value-of select="$hebrew.def.protocol"/>
</xsl:when>
+ <xsl:when test="substring($orig-lemma, 1, 1) = 'G'">
+ <xsl:value-of select="$greek.def.protocol"/>
+ </xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$greek.def.protocol"/>
+ <xsl:value-of select="'lex:'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -598,6 +607,9 @@
</xsl:choose>
</xsl:variable>
<xsl:choose>
+ <xsl:when test="$protocol = 'lex:'">
+ <font class="lex">[<xsl:value-of select="$orig-lemma"/>]</font>
+ </xsl:when>
<xsl:when test="$separator = ''">
<!-- <sub class="strongs"><a href="{$protocol}{$orig-lemma}">S<xsl:number level="any" from="/osis//verse" format="1"/><xsl:number value="$sub" format="a"/></a></sub> -->
<sub class="strongs"><a href="{$protocol}{$orig-lemma}"><xsl:value-of select="format-number(substring($orig-lemma,2),'#')"/></a></sub>
jsword.diff
Index: src/main/java/org/crosswire/jsword/book/OSISUtil.java
===================================================================
--- src/main/java/org/crosswire/jsword/book/OSISUtil.java (revision 1859)
+++ src/main/java/org/crosswire/jsword/book/OSISUtil.java (working copy)
@@ -199,14 +199,20 @@
* Constant for a Strong's numbering lemma
*/
public static final String LEMMA_STRONGS = "strong:"; //$NON-NLS-1$
- public static final String MORPH_ROBINSONS = "robinson:"; //$NON-NLS-1$
-
+ public static final String MORPH_ROBINSONS = "robinson:"; //$NON-NLS-1$
+
/**
* Constant for Strong's numbering morphology
*/
public static final String MORPH_STRONGS = "x-StrongsMorph:T"; //$NON-NLS-1$
/**
+ * Constant for a Strong's numbering lemma in MorphGreek Module
+ * which is really the lexical form of the word.
+ */
+ public static final String LEMMA_LEXICAL = "lemma.Strong:"; //$NON-NLS-1$
+
+ /**
* Constant to help narrow down what we use "q" for. In this case: blockquote
*/
public static final String Q_BLOCK = "blockquote"; //$NON-NLS-1$
More information about the jsword-devel
mailing list