cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simeon Walker <>
Subject map:handle-errors and sub sitemaps
Date Tue, 19 Mar 2002 11:54:30 GMT
     I am having trouble handling ResourceNotFound errors in my
sub-sitemaps. My main sitemap just deals with aggregation, stylesheet
selection and transformation to html. The sub-sitemaps define
the production xml.

If I request a page that does not exist the top level sitemap
won't handle the error (I think) since there are matches for ** and
**/ which request content from sub-sitemaps. If the requested file
does not exist I can see the exception in the logs but no error
handler is called. I simply get my page/menus etc with blank

I have tried serializing xml from the sub-sitemap error handler
so that the root sitemap could transform this and produce a readable
message. But, I am correct in thinking this is not allowed?

Perhaps I could use the resource-exists action in the sub-sitemaps?
I can't find an example of this anywhere. I can get it to work in
the case where the file exists but what happens when it doesn't?

<map:match pattern="**.xml">
   <map:act type="lang-select">
     <map:act type="resource-exists" url="{../1}_{lang}.xml">
       <map:generate src="{../../1}_{../lang}.xml"/>
   <map:serialize type="xml"/>

In this example, how can I send something else back when the
resource does not exist?


Simeon Walker,                      email:
School of Biological Sciences,      phone: +44 (0)1248 383702
University of Wales, Bangor,        fax: +44 (0)1248 382569
Gwynedd, LL57 2UW, UK.              www:

Please check that your question has not already been answered in the
FAQ before posting. <>

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

View raw message