cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject RE: funny problem with sitemap & session validator
Date Mon, 02 Jul 2001 21:44:17 GMT
Sitemap have list of maps, every map have name - value pairs, values can be accessed
from sitemap as {name}.
Every <map:match="*">, <map:act>, and some other tags pushes extra map into list,
and closing tags (</map:match>) pops this extra map.

if you use just {1}, or {2}, etc, it uses map which is on top of the list.
if you need to access map which is underneath, you need to use "../".

Example:

<map:match pattern="test*/*">
  <!-- Here: asterisks are accessible as {1}, {2} -->
  <map:act type="header">
  <!-- this action sets header "pragma" to "no-cache" and also puts it into map -->

    <map:parameter name="pragma" value="no-cache"/>
    <!-- Here: asterisks are accessible as {../1}, {../2} -->
    <!-- Here: header "pragma" is accessible as {extra} -->
    <map:match pattern="test*/test*">
      <!-- Here: asterisks from first matcher are accessible as {../../1}, {../../2} -->
      <!-- Here: header "pragma" is accessible as {../extra} -->
      <!-- Here: asterisks from second matcher are accessible as {1}, {2} -->
    </map:match>
  </map:act>
</map:match>

Hope this helps.

Vadim

> -----Original Message-----
> From: java guru [mailto:javacocoon@yahoo.co.in]
> Sent: Monday, July 02, 2001 17:18
> To: cocoon-users@xml.apache.org; vgritsenko@hns.com
> Subject: RE: funny problem with sitemap & session validator
> 
> 
> Thanks for the reply..it worked..but can u please
> explain why?..
> 
> Thanks for u time..
> 
>  --- Vadim Gritsenko <vgritsenko@hns.com> wrote: >
> Looks like that instead of <map:read
> > src="docs/images/{1}.gif" mime-type="image/gif"/>
> > you need to use <map:read
> > src="docs/images/{../1}.gif" mime-type="image/gif"/>
> > 
> > Note: {1} replaced with {../1}.
> > 
> > If it does not help, post your entire pipeline.
> > 
> > Vadim
> > 
> > > -----Original Message-----
> > > From: java guru [mailto:javacocoon@yahoo.co.in]
> > > Sent: Monday, July 02, 2001 16:37
> > > To: cocoon-users@xml.apache.org
> > > Subject: funny problem with sitemap & session
> > validator
> > > 
> > > 
> > > Hi.,
> > > 1. The following match pattern is used in examples
> > to
> > > read/generate the image/file requested as {1} 
> > > 
> > >    <map:match pattern="images/*.gif">
> > >     <map:read src="docs/images/{1}.gif"
> > > mime-type="image/gif"/>
> > >    </map:match>
> > > 
> > > 
> > > 2. Say for example, i need to serve the page/image
> > > after i validate the user session. So I have
> > included
> > > the above match pattern inside the session
> > validator
> > > action.
> > > 
> > > 3. But i am having problem serving the page/image.
> > > Cocoon2 is not able to get the name of page/image
> > > requested by {1} anymore and its looking for
> > something
> > > like ".xsp" or ".gif" and failing to locate
> > obviously.
> > > 
> > > Any input in this regard is highly appreciated..
> > > 
> > > 
> > >   
> > > 
> > >
> >
> ____________________________________________________________
> > > Do You Yahoo!?
> > > For regular News updates go to
> > http://in.news.yahoo.com
> > 
> > 
> >
> ---------------------------------------------------------------------
> > 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:
> > <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:
> > <cocoon-users-help@xml.apache.org>
> >  
> 
> ____________________________________________________________
> Do You Yahoo!?
> For regular News updates go to http://in.news.yahoo.com
> 
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message