[Tynstep-svn] r238 - in trunk/step: step-core/src/main/java/com/tyndalehouse/step/core/xsl/impl step-core/src/main/resources step-core/src/main/resources/com/tyndalehouse/step/core/service/impl step-web/src/main/resources

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Tue Apr 17 06:06:17 MST 2012


Author: ChrisBurrell
Date: 2012-04-17 06:06:17 -0700 (Tue, 17 Apr 2012)
New Revision: 238

Modified:
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/xsl/impl/InterlinearProviderImpl.java
   trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl
   trunk/step/step-core/src/main/resources/log4j.properties
   trunk/step/step-web/src/main/resources/log4j.properties
Log:
TYNSTEP-113

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/xsl/impl/InterlinearProviderImpl.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/xsl/impl/InterlinearProviderImpl.java	2012-04-17 12:07:11 UTC (rev 237)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/xsl/impl/InterlinearProviderImpl.java	2012-04-17 13:06:17 UTC (rev 238)
@@ -28,6 +28,8 @@
 import org.crosswire.jsword.passage.NoSuchKeyException;
 import org.jdom.Content;
 import org.jdom.Element;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.tyndalehouse.step.core.exceptions.StepInternalException;
 import com.tyndalehouse.step.core.xsl.InterlinearProvider;
@@ -41,6 +43,7 @@
  * 
  */
 public class InterlinearProviderImpl implements InterlinearProvider {
+    private static final Logger LOGGER = LoggerFactory.getLogger(InterlinearProviderImpl.class);
 
     /**
      * bestAccuracy gives a word by its dual key (strong,morph)
@@ -98,6 +101,9 @@
     public String getWord(final String verseNumber, final String strong, final String morph) {
         // we use a linked hashset, because we want the behaviour of a set while we add to it,
         // but at the end, we will want to return the elements in order
+        LOGGER.trace("Retrieving word for verse [{}], strong [{}], morph [{}]", new Object[] { verseNumber,
+                strong, morph });
+
         final Set<String> results = new LinkedHashSet<String>();
         if (isBlank(strong)) {
             // we might as well return, as we have no information to go on

Modified: trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl
===================================================================
--- trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl	2012-04-17 12:07:11 UTC (rev 237)
+++ trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl	2012-04-17 13:06:17 UTC (rev 238)
@@ -542,42 +542,46 @@
 		<!-- start the block -->
 		
 		<span class="{$classes}" onclick="javascript:showAllStrongMorphs("{@lemma} {@morph}")">
-			<!-- 1st - Output first line or a blank if no text available. -->
-			<span class="text">
-				<xsl:call-template name="outputNonBlank">
-					<xsl:with-param name="string">
-						<xsl:value-of select="concat($innerWordText, $nextText)" />
-					</xsl:with-param>
-				</xsl:call-template>
-			</span>
+				<xsl:variable name="remainingText" select="concat($innerWordText, $nextText)" />				
 
-			<!-- 2nd - Output strongs if turned on. If turned on and no Strong then 
-				we need a blank. So always call template if turned on -->
-			<xsl:if test="$StrongsNumbers = 'true'">
-				<span class="strongs">
-					<xsl:value-of
-						select="jsword:com.tyndalehouse.step.core.utils.XslHelper.getSpanFromAttributeName(@lemma, $strongFunctionCall)" />
+			<xsl:if test="normalize-space($remainingText) != ''">
+				<!-- 1st - Output first line or a blank if no text available. -->
+				<span class="text">
+					<xsl:call-template name="outputNonBlank">
+						<xsl:with-param name="string" select="$remainingText" />
+					</xsl:call-template>
 				</span>
-			</xsl:if>
+	
+				<!-- 2nd - Output strongs if turned on. If turned on and no Strong then 
+					we need a blank. So always call template if turned on -->
+				<xsl:if test="$StrongsNumbers = 'true'">
+					<span class="strongs">
+						<xsl:value-of
+							select="jsword:com.tyndalehouse.step.core.utils.XslHelper.getSpanFromAttributeName(@lemma, $strongFunctionCall)" />
+					</span>
+				</xsl:if>
+	
+				<!-- 3rd - Output morphology if turned on. If turned on and no morphology, 
+					we need a blank. -->
+				<xsl:if test="$Morph = 'true'">
+					<span class="morphs">
+						<xsl:value-of
+							select="jsword:com.tyndalehouse.step.core.utils.XslHelper.getSpanFromAttributeName(@morph, $morphFunctionCall)" />
+					</span>
+				</xsl:if>
+	
+	
+				<!-- 4th - We output the interlinears if provided and we do so recursively -->
+				<xsl:if test="normalize-space($interlinearVersion) != ''">
+					<xsl:call-template name="interlinear">
+						<xsl:with-param name="versions" select="$interlinearVersion" />
+					</xsl:call-template>
+				</xsl:if>
 
-			<!-- 3rd - Output morphology if turned on. If turned on and no morphology, 
-				we need a blank. -->
-			<xsl:if test="$Morph = 'true'">
-				<span class="morphs">
-					<xsl:value-of
-						select="jsword:com.tyndalehouse.step.core.utils.XslHelper.getSpanFromAttributeName(@morph, $morphFunctionCall)" />
-				</span>
 			</xsl:if>
 
-
-			<!-- 4th - We output the interlinears if provided and we do so recursively -->
-			<xsl:if test="normalize-space($interlinearVersion) != ''">
-				<xsl:call-template name="interlinear">
-					<xsl:with-param name="versions" select="$interlinearVersion" />
-				</xsl:call-template>
-			</xsl:if>
 			<!-- end the block -->
-		</span>
+			</span>
 	</xsl:template>
   
   <xsl:template name="interlinear">

Modified: trunk/step/step-core/src/main/resources/log4j.properties
===================================================================
--- trunk/step/step-core/src/main/resources/log4j.properties	2012-04-17 12:07:11 UTC (rev 237)
+++ trunk/step/step-core/src/main/resources/log4j.properties	2012-04-17 13:06:17 UTC (rev 238)
@@ -10,3 +10,4 @@
 # Categories
 org.crosswire.jsword.book.sword.ConfigEntry=WARN
 log4j.category.com.tyndalehouse.step=INFO
+log4j.category.com.tyndalehouse.step.core.xsl.impl.InterlinearProviderImpl=TRACE
\ No newline at end of file

Modified: trunk/step/step-web/src/main/resources/log4j.properties
===================================================================
--- trunk/step/step-web/src/main/resources/log4j.properties	2012-04-17 12:07:11 UTC (rev 237)
+++ trunk/step/step-web/src/main/resources/log4j.properties	2012-04-17 13:06:17 UTC (rev 238)
@@ -5,9 +5,10 @@
 # A1 uses PatternLayout.
 log4j.appender.A1=org.apache.log4j.ConsoleAppender
 log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d %-5p %l %x - %m%n
+log4j.appender.A1.layout.ConversionPattern=%d %-5p %x - %m%n
 
+log4j.category.com=WARN
 log4j.category.com.tyndalehouse=INFO
 log4j.category.com.tyndalehouse.step.rest.controllers.FrontController=INFO
 log4j.category.org.crosswire.jsword.book.sword.ConfigEntry=WARN
-
+log4j.category.com.tyndalehouse.step.core.xsl.impl.InterlinearProviderImpl=TRACE




More information about the Tynstep-svn mailing list