You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/06 23:04:17 UTC

svn commit: r619174 - in /lenya/trunk/src/modules/xhtml/config: menu.xml menu.xsp

Author: andreas
Date: Wed Feb  6 14:04:15 2008
New Revision: 619174

URL: http://svn.apache.org/viewvc?rev=619174&view=rev
Log:
Converting xhtml module menu to plain XML.

Added:
    lenya/trunk/src/modules/xhtml/config/menu.xml
      - copied, changed from r618794, lenya/trunk/src/modules/xhtml/config/menu.xsp
Removed:
    lenya/trunk/src/modules/xhtml/config/menu.xsp

Copied: lenya/trunk/src/modules/xhtml/config/menu.xml (from r618794, lenya/trunk/src/modules/xhtml/config/menu.xsp)
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/config/menu.xml?p2=lenya/trunk/src/modules/xhtml/config/menu.xml&p1=lenya/trunk/src/modules/xhtml/config/menu.xsp&r1=618794&r2=619174&rev=619174&view=diff
==============================================================================
--- lenya/trunk/src/modules/xhtml/config/menu.xsp (original)
+++ lenya/trunk/src/modules/xhtml/config/menu.xml Wed Feb  6 14:04:15 2008
@@ -6,9 +6,9 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,58 +18,30 @@
 
 <!-- $Id: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ -->
 
-<xsp:page 
-    language="java" 
-    xmlns:xsp="http://apache.org/xsp"
-    xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-    xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
->
-
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
-  </xsp:structure>
+<menu xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
+  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+  xmlns="http://apache.org/cocoon/lenya/menubar/1.0">
   
-  <menu>
-
-    <menus>
-      <menu i18n:attr="name" name="File">
-        <block areas="site authoring" id="create">
-          <item uc:usecase="sitemanagement.create" href="?doctype=xhtml"><i18n:translate>
-              <i18n:text>New ... Document</i18n:text>
-              <i18n:param><i18n:text>resourceType-xhtml</i18n:text></i18n:param>
-            </i18n:translate>
-          </item>
+  <menus>
+    <menu i18n:attr="name" name="File">
+      <block areas="site authoring" id="create">
+        <item uc:usecase="sitemanagement.create" href="?doctype=xhtml"><i18n:translate>
+          <i18n:text>New ... Document</i18n:text>
+          <i18n:param><i18n:text>resourceType-xhtml</i18n:text></i18n:param>
+        </i18n:translate>
+        </item>
+      </block>
+    </menu>
+    
+    <menu i18n:attr="name" name="Edit">
+        <block areas="authoring" resourceTypes="xhtml">
+          <item uc:usecase="kupu.edit" href="?"><i18n:text>With Kupu</i18n:text></item>
+          <item uc:usecase="bxe.edit" href="?"><i18n:text>With BXE</i18n:text></item>
+          <item uc:usecase="editors.forms" href="?form=xhtml"><i18n:text>With Forms</i18n:text></item>
+          <item uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
         </block>
-      </menu>
-      
-      <menu i18n:attr="name" name="Edit">
-        <xsp:logic>
-          try {
-              Object doc = <input:get-attribute module="page-envelope" as="object" name="document"/>;
-              if (doc instanceof Document &amp;&amp; ((Document) doc).exists()) {
-                  String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
-                  if ("xhtml".equals(doctype)) {
-                      <block areas="authoring">
-                        <item uc:usecase="kupu.edit" href="?"><i18n:text>With Kupu</i18n:text></item>
-                        <item uc:usecase="bxe.edit" href="?"><i18n:text>With BXE</i18n:text></item>
-                        <item uc:usecase="editors.forms"><xsp:attribute name="href"><xsp:expr>"?form=" + doctype</xsp:expr></xsp:attribute><i18n:text>With Forms</i18n:text></item>
-                        <item uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
-                      </block>
-                  }
-              }
-          }
-          catch (Exception e) {
-              throw new ProcessingException("Error during menu generation: ", e);
-          }
-        </xsp:logic>
-      </menu>
-      
-    </menus>
+    </menu>
     
-  </menu>
-</xsp:page>
+  </menus>
+  
+</menu>



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