cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: What is an anchor?
Date Mon, 29 Mar 2004 18:41:34 GMT
Sylvain Wallez wrote:

> Upayavira wrote:
>
>> I've just finished implementing my nested VariableResolver. No idea 
>> whether it works, though - that bit comes next.
>>
>> Anyway, one thing in the existing PreparedVariableResolver is an 
>> Anchor variable. I've never come across these. Can someone give me an 
>> example of how they might work, so that I can make sure they still 
>> work with the new VariableResolver?
>
>
>
> This is a little-know feature that allows to put a "name" attribute on 
> sitemap statements declaring variables (matchers & actions) and then 
> refer to the sitemap variables provided by these components using an 
> anchor-like notation instead of crawling up the variable stack using 
> "../../..".
>
> There was a lot of discussions about the good syntax for this feature, 
> and you may find more about it at [1] and the surrounding thread.
>
> Basically, this allows to write:
> <map:act type="locale" name="i18n">
>  <map:match pattern="*.html">
>    <!-- notice the use of "#i18n" below -->
>    <map:generate src="{1}-{#i18n:locale}.xml"/>
>    ... 

Ah, splendid. That's great. That looks simple enough to implement.

Regards, Upayavira



Mime
View raw message