You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/02/27 01:21:22 UTC

svn commit: r155602 - in lenya/trunk/src/webapp/lenya: usecases/usecase.xmap xslt/info/root.xsl

Author: gregor
Date: Sat Feb 26 16:21:19 2005
New Revision: 155602

URL: http://svn.apache.org/viewcvs?view=rev&rev=155602
Log:
Enhanced site area XSLT to support both old-style XSP and new-style JX tabs

Modified:
    lenya/trunk/src/webapp/lenya/usecases/usecase.xmap
    lenya/trunk/src/webapp/lenya/xslt/info/root.xsl

Modified: lenya/trunk/src/webapp/lenya/usecases/usecase.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/usecase.xmap?view=diff&r1=155601&r2=155602
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/usecase.xmap (original)
+++ lenya/trunk/src/webapp/lenya/usecases/usecase.xmap Sat Feb 26 16:21:19 2005
@@ -30,7 +30,6 @@
       </map:match>
       
      <!-- view for usecases that are displayed in a tab in the site area --> 
-     <!--TODO root.xsl does not expect the page:page element currently -->
      <map:match pattern="view-tab/**">
         <map:generate type="jx" src="{1}.jx"/>
         <map:transform type="i18n">
@@ -50,7 +49,7 @@
             <map:parameter name="languages" value="{page-envelope:publication-languages-csv}"/>
           </map:transform>
         <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/info/default.xml"/>
-        <map:serialize type="xml"/>
+        <map:serialize type="xhtml"/>
       </map:match>
     </map:pipeline>
 

Modified: lenya/trunk/src/webapp/lenya/xslt/info/root.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/info/root.xsl?view=diff&r1=155601&r2=155602
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/info/root.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/info/root.xsl Sat Feb 26 16:21:19 2005
@@ -20,6 +20,8 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   >
   
   <xsl:param name="contextprefix"/>
@@ -99,7 +101,15 @@
               </td>     
               <td valign="top" width="80%">
                 <div id="lenya-info-content">
-                  <xsl:copy-of select="*"/>
+                  <!-- support both old-style tabs and new-style JX tabs -->
+                  <xsl:choose>
+                    <xsl:when test="/page:page">
+                      <xsl:copy-of select="page:page/node()"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:copy-of select="*"/>
+                    </xsl:otherwise>
+                  </xsl:choose>
                 </div>
               </td>
             </tr>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org