You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by "Paladugu, Suresh" <su...@logicacmg.com> on 2005/10/26 07:45:02 UTC

Problem in understanding the Match statements And the Variables used in the Pipelines

Hi all,


 Could any one Please  tell me 

1)How  these match statements(a,b,c) are working.(i,e when the request comes how will the matching done)

2)In the third match statement there are  variables {1} and {2} ,I understood that {1} refers to publication-id and  {2} refers to parameter.But from where does the values for publication-id and parameter comes,is it  from the requested url ?

3)And what is the scope of the these variables({1},{2}) .(Bcos iam seeing same  variables in the in the next pipeline of the same Xmap)

  (a) <map:match pattern="lenya/**">

   (b)<map:match pattern="lenya-page/*/*/**">


   <!-- uri-parameter/{publication-id}/{parameter}/{area}/{uri} -->
  (c) <map:match pattern="uri-parameter/*/*/*/**">
        <map:mount uri-prefix="uri-parameter/{1}/{2}/" src="lenya/pubs/{1}/parameter-{2}.xmap" check-reload="true" reload-method="synchron"/>
      </map:match>



Cheers

Suresh...



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Problem in understanding the Match statements And the Variables used in the Pipelines

Posted by Felix Röthenbacher <fe...@wyona.com>.
Hi Suresh

Paladugu, Suresh wrote:
> Hi all,
> 
> 
>  Could any one Please  tell me 
> 
> 1)How  these match statements(a,b,c) are working.(i,e when the request comes how will the matching done)
> 
> 2)In the third match statement there are  variables {1} and {2} ,I understood that {1} refers to publication-id and  {2} refers to parameter.But from where does the values for publication-id and parameter comes,is it  from the requested url ?

Right, the url that matches the matcher is split and the values are
assigned to the variables {x}. Note that if you use sitemap elements
like <map:select>, <map:action> it is necessary to give the variable
in a hierarchical manner like {../1} as these sitemap elements put
the variables further up the stack.

> 
> 3)And what is the scope of the these variables({1},{2}) .(Bcos iam seeing same  variables in the in the next pipeline of the same Xmap)

The scope is per <map:match> ...</map:match statement, further you have
consider the stack-like structure of certain sitemap statements (see
above).

> 
>   (a) <map:match pattern="lenya/**">

Will match everything that starts with 'lenya/'.

> 
>    (b)<map:match pattern="lenya-page/*/*/**">

This matcher is an internal matcher, i.e. it's called
from the sitemap itself.

> 
> 
>    <!-- uri-parameter/{publication-id}/{parameter}/{area}/{uri} -->
>   (c) <map:match pattern="uri-parameter/*/*/*/**">
>         <map:mount uri-prefix="uri-parameter/{1}/{2}/" src="lenya/pubs/{1}/parameter-{2}.xmap" check-reload="true" reload-method="synchron"/>
>       </map:match>
> 

Here it get a little bit complicated as an additional sitemap is
mounted whereas the prefix is removed before passing the
request url to the mounted sitemap.

hth

- Felix

> 
> 
> Cheers
> 
> Suresh...
> 

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org