cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: What is an anchor?
Date Mon, 29 Mar 2004 16:48:11 GMT
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"/>
    ...
  </map:match>
</map:act>

Sylvain

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=103444203330586&w=2

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message