cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Young <>
Subject map:redirect's never return...
Date Tue, 25 Feb 2003 18:49:07 GMT
I have built a "looping" matcher in my root sitemap.xmap.

<map:match pattern="_navigation.xml">
 <map:generate src="{defaults:content}/_null-navigation.xml"/>
 <map:serialize type="xml"/>

<map:match pattern="**/_navigation.xml">
 <map:act type="resource-exists">
  <map:parameter name="url" value="{defaults:content}/{1}/_navigation.xml"/>
  <map:generate src="{defaults:content}/{../1}/_navigation.xml"/>
  <map:transform src="{defaults:design}/nav2xhtml.xsl"/>
  <map:serialize type="xml"/>
 <map:redirect-to uri="cocoon:/{1}/../_navigation.xml"/>

These matchers let you select part of use the cocoon:// psuedo-protocol to
select the nearest _navigation.xml file. This allows the page to "inherit"
the navigation from one of it's predecessors.

This works fine so long as I request it from the root sitemap (e.g.,
"cocoon:/"). If I request the _navigation.xml from a sub-sitemap, I get a
StackOverflow error. It's almost as if the lopping some how changes the
context to the point that it never returns to the sub-sitemap. Requesting a
cocoon:/directory/_navigation.xml in a cinclude tag cause the same sort of

Thanks for your help in advance,

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

View raw message