[Yanel-commits] rev 21323 - public/yanel/trunk/src/contributions/resources/nutch/xslt

wwwyona at wyona.com wwwyona at wyona.com
Tue Jan 2 20:39:33 CET 2007


Author: wwwyona
Date: 2007-01-02 20:39:32 +0100 (Tue, 02 Jan 2007)
New Revision: 21323

Modified:
   public/yanel/trunk/src/contributions/resources/nutch/xslt/result2xhtml.xsl
Log:
exception message fixed

Modified: public/yanel/trunk/src/contributions/resources/nutch/xslt/result2xhtml.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/nutch/xslt/result2xhtml.xsl	2007-01-02 19:06:56 UTC (rev 21322)
+++ public/yanel/trunk/src/contributions/resources/nutch/xslt/result2xhtml.xsl	2007-01-02 19:39:32 UTC (rev 21323)
@@ -233,10 +233,16 @@
     <tr>
       <td colspan="2">
         <div style="color: red; font-size: 24px;"><i18n:message key="exception"/></div>
-        <xsl:variable name="message"><xsl:value-of select="substring-before(string(.), '#')"/></xsl:variable>
-        <xsl:variable name="directory"><xsl:value-of select="substring-after(string(.), '#')"/></xsl:variable>
-        <i18n:message key="{$message}"/><xsl:value-of select="$directory"/>
-        <xsl:value-of select="."/>
+        <xsl:choose>
+          <xsl:when test="contains(string(.), '#')">
+            <xsl:variable name="message"><xsl:value-of select="substring-before(string(.), '#')"/></xsl:variable>
+            <xsl:variable name="directory"><xsl:value-of select="substring-after(string(.), '#')"/></xsl:variable>
+            <i18n:message key="{$message}"/><xsl:value-of select="$directory"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="."/>
+          </xsl:otherwise>
+        </xsl:choose>
       </td>
     </tr>
   </xsl:template>




More information about the Yanel-commits mailing list