You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Charles Yates <cy...@lanelib.stanford.edu> on 2002/05/22 18:52:28 UTC

handling errors occuring in aggregate

Hello list,
     Does anyone have a graceful way of handling errors that occur in
one <map:part> of a <map:aggregate> element?  For example a portion of
my sitemap.xmap:

<map:match pattern="**.html>
  <map:aggregate element="document">
    <map:part src="cocoon://{1}.xml"/>
    <map:part src="xdocs/menu.xml"/>
  </map:aggregate>
  <!-- transform and serialize -->
</map:match>

problem:
     If an error occurs in the cocoon://{1}.xml part, first a empty
<document/> element is transformed and serialized to a html document,
then the the <map:handle-errors> produced document is serialized to a
second document, concatenated with the first. (see
http://shine.stanford.edu:8080/laneweb/no/link/here.html)

ideal solution:
     I would like the <map:handle-errors> output to occur within the
<document> element so that the resulting page would not contain two
documents.

full sitemap.xmap available at
http://shine.stanford.edu/cgi-bin/viewcvs.cgi/laneweb/src/content/sitemap.xmap

     Thanks for any help,

	Charles



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: handling errors occuring in aggregate

Posted by Peter Royal <pr...@apache.org>.
On Wednesday 22 May 2002 12:52 pm, Charles Yates wrote:
> ideal solution:
>      I would like the <map:handle-errors> output to occur within the
> <document> element so that the resulting page would not contain two
> documents.

Don't use aggregation. Make your pipeline something like

File Generator -> XSLT to wrap in <document/> and add X/CInclude line for 
menu -> X/CInclude transformer to include menu.

-pete

-- 
peter royal -> proyal@apache.org

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>