From cocoon-dev-return-16100-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Mon Aug 13 13:10:05 2001 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 80651 invoked by uid 500); 13 Aug 2001 13:10:04 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 80628 invoked from network); 13 Aug 2001 13:10:03 -0000 From: "Carsten Ziegeler" To: Subject: AW: [c2 todo] handle error inside pipeline Date: Mon, 13 Aug 2001 15:10:45 +0200 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 5.0.5 |September 22, 2000) at 13.08.2001 15:10:01, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 5.0.5 |September 22, 2000) at 13.08.2001 15:10:01 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > -----Urspr=FCngliche Nachricht----- > Von: Gerhard Froehlich [mailto:g-froehlich@gmx.de] > Gesendet: Sonntag, 12. August 2001 13:04 > An: cocoon > Betreff: [c2 todo] handle error inside pipeline > > > Hi Team, > following todo in the pipeline: > -->Check how to handle the mixing of output streams when an error inside a > pipeline occurs. > -->When the pipeline has something written to the output stream > and then an > error occurs the > -->result is the first written part with the appended exception. One > solution could be > -->configurable intermediate output stream. > > Let me try to retrace this problem: > A pipeline serializes for example a xml to pdf with fop. Now fop starts to > serialize the > xml to pfd. In the middle of the processing fop throws an > exception, because > the xsl > stylesheet is buggy. But a part of the document is already serialized and > because of that > the acrobat reader opens and displays a corrupt pdf document. > Know you want something between the final output stream which handles this > errors, and throws > for example a ProcessingException. > > Do I have the point if the problem? > Yes, this is exactly the problem. If you use any other serializer, e.g. html, and an exception occurs in the middle of the processing, the response contains the "first correct part" of the html, the exception triggers the "pipeline", the ErrorNotifier creates SAX events for the exception and these SAX events are handled by "pipeline", e.g. by using a stylesheet to transform this to html. Now the whole response consists of the "first correct part in html" and the exception in html, which is quiet a mess on the client. If you use PDF (or the FOPSerializer) an intermediate output stream is already created which should avoid the scenario you described above. We had several weeks ago a discussion on this topic. I think the most other developers (excluding me) favored the "configurable per pipeline" approach, which means the sitemap editor has to take care, which pipelines should use this intermediate output stream and which not (default is not). This decission was made because of possible performance lost if the intermediate output stream was used everywhere. Carsten Open Source Group sunShine - b:Integrated =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn www.sundn.de mailto: cziegeler@sundn.de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Cheers > Gerhard > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org