You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vjekoslav Nesek <vn...@tis.hr> on 2001/06/15 11:28:03 UTC

How to pass sitemap parameters to XSP

Hi Cocooners!

First congratulations on exelent work. Cocoon2 is shaping up
quite nicely. 

What I would like to do is to pass parameter into XSP from
sitemap. Here is a part of sitemap:

   <map:match pattern="funsms/*)">
    <map:generate type="serverpages" src="docs/funsms/category.xsp">
     <map:parameter name="category_id" value="{1}"/>
    </map:generate>
    <map:serialize type="xml"/>
   </map:match>

How can I get hold of category_id  in XSP... Sorry if this is RTFM.

Also sitemaps compiles in background and replaces old sitemap
only after compilation finishes? If so can it be turned off since it is
kinda irritating while developing. 

Thanks,
Vjekoslav Nesek

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: How to pass sitemap parameters to XSP

Posted by Sergio Carvalho <se...@acm.org>.
On Fri, 15 Jun 2001 11:28:03 +0200
Vjekoslav Nesek <vn...@tis.hr> wrote:

> Hi Cocooners!
> 
> First congratulations on exelent work. Cocoon2 is shaping up
> quite nicely. 
> 
> What I would like to do is to pass parameter into XSP from
> sitemap. Here is a part of sitemap:
> 
>    <map:match pattern="funsms/*)">
>     <map:generate type="serverpages" src="docs/funsms/category.xsp">
>      <map:parameter name="category_id" value="{1}"/>
>     </map:generate>
>     <map:serialize type="xml"/>
>    </map:match>
> 
> How can I get hold of category_id  in XSP... Sorry if this is RTFM.

Include this snippet:
<xsp:expr>parameters.getParameter("category_id", "default_value")</xsp:expr>

> Also sitemaps compiles in background and replaces old sitemap
> only after compilation finishes? If so can it be turned off since it is
> kinda irritating while developing. 

Have a look at the bottom of cocoon.xconf. Switch sitemap reloading to synchronous. You can also force reloading by adding a cocoon-reload=true parameter to the HTTP request (e.g. http://somehost.com/?cocoon-reload=true)


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: How to pass sitemap parameters to XSP

Posted by Torsten Curdt <tc...@dff.st>.
> Hi Cocooners!
> 
> First congratulations on exelent work. Cocoon2 is shaping up
> quite nicely. 
> 
> What I would like to do is to pass parameter into XSP from
> sitemap. Here is a part of sitemap:
> 
>    <map:match pattern="funsms/*)">
>     <map:generate type="serverpages" src="docs/funsms/category.xsp">
>      <map:parameter name="category_id" value="{1}"/>
>     </map:generate>
>     <map:serialize type="xml"/>
>    </map:match>
> 
> How can I get hold of category_id  in XSP... Sorry if this is RTFM.

In the XSP try:

 String fromSitemap = parameters.getParameter("category_id","default");

 
> Also sitemaps compiles in background and replaces old sitemap
> only after compilation finishes? If so can it be turned off since it is
> kinda irritating while developing. 

In cocoon.xconf set your sitemap reloading from asynchron to synchron.
--
Torsten

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>