cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Young <byo...@bju.edu>
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>

<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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message