> From: Bartomeu Adrover [mailto:[EMAIL PROTECTED]] > > Hello, I use cocoon 2.01 with apache tomcat 4.01 in windows nt. I > construct an page with varius xml source with <ma:part> tag: > <map:match pattern="index.xml"> > <map:aggregate element="root"> > <map:part src="cocoon:/noticies.xsrc"/> > <map:part src="personalsci.xml"/> > <map:part src="index.xml"/> > </map:aggregate> > <map:act type="request"> > <map:transform src="xsl/principal.xsl"> > <map:parameter name="use-request-parameters" value="true"/> > <map:parameter name="homePath" value="{context}/sci"/> > </map:transform> > </map:act> > <map:serialize type="html-iso"/> > </map:match> > The problem is the part <map:part src="cocoon:/noticies.xsrc"/>. This > part get the informatio from other server and sometimes this service is > unaviable. If I consult the url direcly "http://www.uib.es....." when is > unavible all the pipeline return an error. > I thing a solution: use an pipeline that request this url and if an > error happens then process the xml error code and return an usefull xml > for my first pipeline: > <map:pipeline> > <map:match pattern="noticies.xsrc"> > <map:generate > src="http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI& p_ubi_ > codalf=SCIIncidencies"/> > > <map:serialize type="xml-iso"/> > </map:match> > > <map:handle-errors> > <map:transform src="xsl/noticies_error.xsl"/> > <map:serialize type="xml-iso" status-code="200"/> > </map:handle-errors> > </map:pipeline> > When I request the second pipeline I recive the correct xml, but in the > first pipeline continue return an error (url unaviable). > Have one any idea?.
This map:handle-errors is not executed when you invoke the pipeline from internally, using cocoon: uri. Instead, add this handle-error to the first pipeline with the aggregate. Vadim --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>