On Thursday 23 May 2002 18:23, you wrote:

Thanks. It is pretty clear that {name} is a variable. My question 
should have been: How do I discover the valid values for {name} ?
The example I was looking at used {session-id} which is intuitively 
linked to the session-id I would get from <session:get-attribute 
name="session-id"/>. Is my inference correct? Does it therefore follow 
that I can use any attribute from the session context ? If I set a 
session attribute named 'fred' with the value 'flintstone' does {fred}
evaluate to 'flintstone' in a sitemap ?

Is the definition of {name} documented anywhere ? Is there any way of 
enumerating defined names ? 

>From what I know, basically {name} is a representation of
> a sitemap parameter which are used by sitemap components.
> For example, if your pipeline wants to call another (resource)
> pipeline you with a target parameter you would do it this way
> <map:call resource="simple-page">
>  <map:parameter name="target" value="some/path/to/something"/>
> </map:call>
>
> now in your "simple-page" pipline you can access that target
> paramter with {target} so you can have:
>   <map:resource name="simple-page">
>      <map:generate type="file" src="{target}.xml"/>
>      <map:transform src="stylesheets/page/simple-page2html.xsl">
>         <map:parameter name="view-source" value="{target}.xml"/>
>      </map:transform>
>      <map:serialize/>
>   </map:resource>
>
> Also, if you implement actions the return of the act() method
> is a map that will be added to the session paramters.
> In your action of you do
> sitemapParam.put("session-id", getSessionID()); then
> in your pipeline you can do
> <map:match pattern="something">
>   <map:act type="my-action">
>    <map:generate src="something/{session-id}"/>
>     ...
>  </map:act>
> </map:match>
>

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to