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>

<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:act>
 <map:redirect-to uri="cocoon:/{1}/../_navigation.xml"/>
</map:match>

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
error.

Thanks for your help in advance,
Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to