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:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 17:18
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]]
> > > Sent: Monday, July 02, 2001 16:37
> > > To: [EMAIL PROTECTED]
> > > 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:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> >  
> 
> ____________________________________________________________
> 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: <[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