Good evening, Andreas

Am 03.02.2008 um 21:06 schrieb Andreas Hartmann:

Hi Jürgen,

Juergen Ragaller schrieb:

[...]

I had to override the sitemap of the usecasedocument module to get cforms fully working: I added the i18n catalogue of the cocoon cform framework to the i18n transformer and uncommented the xhtml2xhtml transformation
(It interfered with the dojo scripts in the header section).

do you think your changes are generic enough to be committed? I guess editing DB content with CForms using the usecasedocument module is quite a common scenario, and would add a lot of value to Lenya.

I'm not a 100% shure. What I do not understand (yet) is the purpose of the xhtml2xhtml.xsl transformation step in usecasedocument/sitemap.xmap.
Can you explain it's purpose?

Adding the cocoon i18n should be ok, I think.

Below I attached what I did to get the cform usecase working on top of the usecasedocument module.

Thanks for taking a look at this.


Jürgen


PATCH
----------



Index: /lenya_trunk/src/modules/usecasedocument/sitemap.xmap
===================================================================
---/lenya_trunk/src/modules/usecasedocument/sitemap.xmap (revision 617772)
+++ /lenya_trunk/src/modules/usecasedocument/sitemap.xmap       (working copy)
@@ -24,12 +24,23 @@

 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

-  <map:components>
-    <map:transformers default="xslt">
- <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer"/>
-    </map:transformers>
-    <map:selectors>
- <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector"/>
+  <map:components>
+    <map:transformers default="xslt">
+ <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer"/>
+      <map:transformer name="i18n"
+        src="org.apache.cocoon.transformation.I18nTransformer">
+        <catalogues default="cmsui">
+ <catalogue id="cmsui" name="cmsui" location="cocoon://i18n- catalogue/"/>
+          <catalogue id="forms" name="messages"
+            location="resource://org/apache/cocoon/forms/system/i18n"/>
+        </catalogues>
+        <cache-at-startup>true</cache-at-startup>
+      </map:transformer>
+
+
+    </map:transformers>
+    <map:selectors>
+ <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector"/>
     </map:selectors>
   </map:components>

@@ -62,6 +73,12 @@
         <map:transform type="cinclude"/>
         <map:transform type="forms" />
         <map:transform type="i18n">
+
+        <catalogues default="mymessages">
+          <catalogue id="mymessages" name="messages" location="i18n"/>
+          <catalogue id="forms" name="messages"
+            location="resource://org/apache/cocoon/forms/system/i18n"/>
+        </catalogues>
<map:parameter name="locale" value="{page- envelope:document-language}"/>
         </map:transform>

@@ -74,12 +91,16 @@
         </map:transform>
<map:transform src="fallback://lenya/xslt/cforms/add-xhtml- namespace.xsl"/>

+
+        <!-- this was removed from the usecasedocument sitemap
+             if present, it interferes with the dojo scripts
<map:transform src="fallback://lenya/modules/xhtml/xslt/ xhtml2xhtml.xsl"> <map:parameter name="rendertype" value="{request- param:rendertype}"/> <map:parameter name="nodeid" value="{page- envelope:document-name}"/> <map:parameter name="language" value="{page- envelope:document-language}"/>
         </map:transform>
-
+         -->
+
         <map:serialize type="xml"/>

      </map:match>
@@ -98,5 +119,5 @@
     </map:pipeline>

   </map:pipelines>
-       
+
 </map:sitemap>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to