cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lassi Immonen <limmo...@malla.urova.fi>
Subject [C2]Sitemap.xsl patch
Date Wed, 08 Nov 2000 09:58:59 GMT
Hi,

Following pathch to sitemap allows using actions
in resources like in example. It just adds 
Map objectModel = environment.getObjectModel();
to resource call.


Thanks, 
	Lassi

Example
-----sitemap.xmap----

 <map:resource name="translate">
     <map:act type="lang_select"> 
	<map:generate src="digma/site/translate_{1}.xml"/>
    </map:act>  
	<map:transform src="digma/stylesheets/simple2html.xsl"/>
	<map:serialize type="html"/>
  </map:resource>

<map:match pattern="restest/*">
   	<map:redirect-to resource="translate"/>
  </map:match>


----diff-----

--- sitemap.old.xsl	Tue Nov 07 16:21:42 2000
+++ sitemap.xsl	Tue Nov 07 14:10:24 2000
@@ -64,6 +64,7 @@
     import org.apache.cocoon.acting.Action;
     import org.apache.cocoon.environment.Environment;
     import org.apache.cocoon.matching.Matcher;
+    import org.apache.cocoon.matching.helpers.WildcardURIMatcher;
     import org.apache.cocoon.selection.Selector;
     import org.apache.cocoon.sitemap.AbstractSitemap;
     import org.apache.cocoon.sitemap.ComponentHolder;
@@ -272,6 +273,7 @@
         throws Exception {
           List list = null;
           Parameters param = null;
+	  Map objectModel = environment.getObjectModel();	  
           <xsl:apply-templates select="./*"/>
           return false;
         }
Mime
View raw message