cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuryx <>
Subject Re: Help on sitemap
Date Thu, 14 Mar 2002 06:36:50 GMT
бчцЫ/eNet/╪╪йУ╥ЧнЯйбр╣╡©/о╣мЁ╡©/вэ╪Ю wrote:

> Hello All,
>         I hava a question for sitemap
>         how can i write a sitmap:
>                 if i request http://site/test.xml
>                                 it will transform by default.xsl
>                 if i request http://site/test.xml?sytle=test.xsl
>                                 it will transform by test.xsl
> Thanks
Try define sitemap parameter in action from request
public class MyAction extends AbstractAction {
  public Map act (Redirector redirector,
                  SourceResolver resolver,
                  Map objectModel,
                  String source,
                  Parameters params) {

    Map sitemapParams = new HashMap();
    Request request = (Request) 
    String mStyle=request.getParameter("style");
    sitemapParams.put("style", mStyle);

    return sitemapParams;

in sitemap:

   <map:match pattern="test/*">
    <map:generate type="serverpages" src="work/test/{1}.xsp"/>
    <map:act type="MyAction">

    <map:transform src="work/test/{style}"/>

    <map:serialize type="html"/>


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message