cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Brick <>
Subject Re: "{../0}" "{../../locale}" - What is this stuff???
Date Wed, 09 Jun 2004 17:59:34 GMT
Well I think I'm tracking this stuff down little by little.  It looks like {0} represents the
*entire* matched value (minus the path).
So, for example, if the match pattern was "*.xml" and the URL was http://foo/bar/simple.xml,
{0} would equal "simple.xml".
I'm still trying to figure out from my first example why has {../0} and {../../locale} when
seems like they should be at the same level... I'll report the results of my findings if I
any after some more trial & error in the hopes that it will help somebody else.

--- Terry Brick <> wrote:
> Thanks for the link, that helped me understand the basics of the 'path' structure the
> are referring to.
> I'm trying hard to understand this before posting such basic questions to the list...
I really
> am... but I'm still have some trouble grasping this and have spent too much time on it.

> However,
> it doesn't really address a few other elements to my question.  
> a) For example, i understand that if "*.xml" is matched, then "{1}" refers to the text
> by
> the first wildcard.  So, this implies a 1-based index (as opposed to 0-based).  So then
what the
> heck is {0}?
> b) The example I put in my first email also had "{../../locale}".  This is also not covered
> this document.  My assumption is that it is reference to a URL parameter that has been
> submitted?
> c) And finally, either I don't understand one example in the Wiki document or there is
> mistake....
> It states, "So if you insert a new level e.g. by calling an action or a matcher. You
have to
> refer
> the previous level to get the same value from the Matcher."
> ... it then gives this example ...
>  <map:match pattern="images/*.gif">
>     <map:act type="resource-exists">
>       <map:parameter name="url" value="resources/images/{1}.gif">
>       <!-- new level -->
>       <map:read src="resources/images/{../1}.gif" mime-type="images/gif"/>
>     </map:act>
>  </map:match>
>  ...
> Conceptually (not literally) shouldn't it be something like?....
>  <map:match pattern="images/*.gif">
>     {1}
>     <!-- new level -->
>     <map:act>
>       {../1}
>       <!-- new level -->
>       <map:read>
>          {../../1}
>       </map:read>
>     </map:act>
>  </map:match>

Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message