Hi John,

unfortunately, it is not enough to set 'fred' as a session attribute, who
would have to set
it as a sitemap parameter just as Artur said.
You can do this inside an action (actions return a java.util.Map and you can
use the keys 
stored in it as sitemap parameters. I don't know if it is there in 2.0.1 but
in 2.0.2 you can look
in the docs under User Guide / Concepts / Actions and there at
'Communication between Sitemap
and Action'.
As Artur also pointed out you can call a resource with some parameters which
you can then use as
sitemap parameters inside the map:resource tag.

Judith

> -----Ursprüngliche Nachricht-----
> Von:  John Austin [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 24. Mai 2002 00:37
> An:   [EMAIL PROTECTED]
> Betreff:      Re: Question: what is {session-id} ? in a sitemap.xmap ?
> 
> 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]>

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