From cocoon-dev-return-18325-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Thu Nov 01 16:54:58 2001 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 28897 invoked by uid 500); 1 Nov 2001 16:54:56 -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 28872 invoked from network); 1 Nov 2001 16:54:54 -0000 From: =?iso-8859-1?Q?J=F6rn_Heid?= To: "Cocoon-Dev" Subject: Problem with xslt pipelining: Demonstration Date: Thu, 1 Nov 2001 17:55:23 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0014_01C162FE.60EC5200" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0014_01C162FE.60EC5200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I've just written a little demo application to demonstrate the problem. First, compile the file TestGenerator. Add it to the sitemap: Put the simple xsl into the xsl subdir. Add the following to the pipelines: Call the pipeline. The result should appear when the last System.out ("Finished") is reached. If you comment out the line a part of the result should appear while processing (depends on the buffer). You can change the number of generated elements if you reach "Finished" before the output can be seen. I used the patch from Joerg Henne to set the buffer to 1. For me the result appears after about 20 elements if I comment out the xslt transformation. When the xslt transformation take place, I have to wait until "Finished". ------=_NextPart_000_0014_01C162FE.60EC5200 Content-Type: application/octet-stream; name="TestGenerator.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="TestGenerator.java" import org.apache.cocoon.Constants;=0A= import org.apache.cocoon.generation.*;=0A= import org.apache.avalon.framework.parameters.Parameters;=0A= import org.apache.cocoon.ProcessingException;=0A= import org.apache.cocoon.environment.*;=0A= import org.apache.cocoon.environment.http.*;=0A= import org.apache.cocoon.xml.AbstractXMLProducer;=0A= import org.xml.sax.*;=0A= import org.xml.sax.helpers.*;=0A= =0A= =0A= import java.io.IOException;=0A= import java.util.Map;=0A= import java.io.*;=0A= =0A= =0A= =0A= public class TestGenerator extends AbstractGenerator {=0A= private AttributesImpl nullAttr =3D new AttributesImpl ();=0A= =0A= =0A= public synchronized void generate () throws SAXException {=0A= contentHandler.startDocument ();=0A= contentHandler.startElement ("", "root", "root", nullAttr);=0A= for (int i =3D 0; i < 100; i++) {=0A= System.out.println ("Fire");=0A= contentHandler.startElement ("", "hr", "hr", nullAttr);=0A= contentHandler.endElement ("", "hr", "hr");=0A= try { Thread.sleep (100); } catch (Exception ex) {}=0A= }=0A= =0A= contentHandler.endElement ("", "root", "root");=0A= contentHandler.endDocument ();=0A= System.out.println ("Finished");=0A= }=0A= =0A= }=0A= ------=_NextPart_000_0014_01C162FE.60EC5200 Content-Type: text/xml; name="test.xsl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="test.xsl" =20 Processing... =20 =20 hr:
------=_NextPart_000_0014_01C162FE.60EC5200 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org ------=_NextPart_000_0014_01C162FE.60EC5200--