Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 5461 invoked from network); 7 Oct 2000 17:56:20 -0000 Received: from unknown (HELO ?195.115.98.1?) (195.115.98.1) by locus.apache.org with SMTP; 7 Oct 2000 17:56:20 -0000 Received: from maileu.imediation.com by [195.115.98.1] via smtpd (for locus.apache.org [63.211.145.10]) with SMTP; 7 Oct 2000 18:56:24 UT Received: (private information removed) Message-ID: <9B3E950CB293D411ADF4009027B0A4D20939B6@maileu.imediation.com> From: Sebastien Sahuc To: xalan-dev@xml.apache.org, cocoon-dev@xml.apache.org Subject: RE: [C2][Xalan2] Transformation failure if SAX events generated p rogramatically Date: Sat, 7 Oct 2000 18:56:07 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="windows-1252" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N dims wrote : > We have some code that generates SAX > events which need to be fed to the Transformer (instead of > reading from an XML file). This > produces invalid output. Enclosed is the code and sample > based on SAX2SAX. > Note that if you use > foo.xml which is exactly the XML generated by the code > programatically then you get valid output. Well not exactly the same. Indeed there are ONE BIG difference in the way both method deal with namspaces : If you put a simple filter between the StatusGenerator and the transfomer that trace the contentHandler's methods, you'll get : startDocument startPrefixMapping(, http://apache.org/cocoon/2.0/status) startPrefixMapping(xlink, http://www.w3.org/1999/xlink) startElement(http://apache.org/cocoon/2.0/status, statusinfo, statusinfo ... startElement(http://apache.org/cocoon/2.0/status, group, group ... [and so on ...] Whereas if you put the same filter between the XMLReader (parser) and the transformer the trace change a little bit: setDocumentLocator startDocument startElement(, statusinfo, statusinfo ... startElement(, group, group ... So the output is not the same.. far away to be the same. I would even say that they are completely different ! :-) Sebastien