You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Lassi Immonen <li...@malla.urova.fi> on 2000/11/08 10:58:59 UTC

[C2]Sitemap.xsl patch

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;
         }