commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r264910 - /jakarta/commons/proper/commons-build/trunk/commons-site.jsl
Date Wed, 31 Aug 2005 01:24:49 GMT
Author: psteitz
Date: Tue Aug 30 18:24:45 2005
New Revision: 264910

URL: http://svn.apache.org/viewcvs?rev=264910&view=rev
Log:
Add message template to make compatible with xdoc 1.9.2.

Modified:
    jakarta/commons/proper/commons-build/trunk/commons-site.jsl

Modified: jakarta/commons/proper/commons-build/trunk/commons-site.jsl
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/commons-site.jsl?rev=264910&r1=264909&r2=264910&view=diff
==============================================================================
--- jakarta/commons/proper/commons-build/trunk/commons-site.jsl (original)
+++ jakarta/commons/proper/commons-build/trunk/commons-site.jsl Tue Aug 30 18:24:45 2005
@@ -20,6 +20,7 @@
 <jsl:stylesheet select="$doc"
   xmlns:define="jelly:define"
   xmlns:j="jelly:core"
+  xmlns:fmt="jelly:fmt"
   xmlns:jsl="jelly:jsl"
   xmlns:log="jelly:log"
   xmlns:util="jelly:util"
@@ -543,5 +544,29 @@
 
    <!-- CDATA and text nodes pass-thru -->
    <jsl:template match="text()"><x:expr select="."/></jsl:template>
+
+  <!-- process a message -->
+  <!-- Key is more important than message... -->
+  <jsl:template match="message" trim="true">
+    <j:set var="_key">
+      <x:expr select="@key" />
+    </j:set>
+    <j:set var="_bundle">
+      <x:expr select="@bundle" />
+    </j:set>
+    <j:if test="${!empty(_key)}">
+      <!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
+      <j:if test="${empty(_bundle)}">
+        <fmt:message key="${_key}" bundle="${myMsg}" />
+      </j:if>
+      <j:if test="${!empty(_bundle)}">
+        <fmt:bundle basename="${_bundle}">
+          <fmt:message key="${_key}" />
+        </fmt:bundle>
+      </j:if>
+    </j:if>
+    <jsl:applyTemplates />
+  </jsl:template>
+
 
 </jsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message