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 27799 invoked from network); 3 Oct 2000 10:07:32 -0000 Received: from unknown (HELO ?195.115.98.1?) (195.115.98.1) by locus.apache.org with SMTP; 3 Oct 2000 10:07:32 -0000 Received: from maileu.imediation.com by [195.115.98.1] via smtpd (for locus.apache.org [63.211.145.10]) with SMTP; 3 Oct 2000 11:07:39 UT Received: (private information removed) Message-ID: From: Sebastien Sahuc To: cocoon-dev@xml.apache.org Subject: RE: [C2] Short TODO list [was CLI almost there] Date: Tue, 3 Oct 2000 11:03:56 +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 > -----Original Message----- > From: Davanum Srinivas [mailto:dims@yahoo.com] > Sent: Tuesday, October 03, 2000 12:42 AM > To: cocoon-dev@xml.apache.org > Cc: Scott_Boag@lotus.com > Subject: Re: [C2] Short TODO list [was CLI almost there] > > > Scott, > > Just trying to help. Though am unable to test anything, here > are the C2 files with modifications > for Xalan2. You can use them if you want to :) > I had a quick look at your XalanTranformer, and I kind of disagree the way you're using DOM to load the StyleSheet document. Why don't you use the trax.TemplatesBuilder which purpose is precisely to build a cleaner-lighweight-internal Object model from a SAX2 XMLReader ? So instead of writing (starting at line 85 of XalanTransformer.java) : DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); org.w3c.dom.Document outNode = docBuilder.newDocument(); InputSource xslsrc = resolver.resolveEntity(null,xsluri); org.w3c.dom.Node doc = docBuilder.parse(xslsrc); trax.Templates templates = processor.processFromNode(doc); transformer = templates.newTransformer(); You should write : XMLREader reader = XMLReaderFactory.createXMLReader(); trax.TemplatesBuilder templatesBuilder = processor.getTemplatesBuilder(); reader.setContentHandler (templatesBuilder); reader.parse(resolver.resolveEntity(null,xsluri)); trax.Templates templates = templatesBuilder.getTemplates(); trax.Transformer transformer = templates.newTransformer(); And so on. This approach would allow you to set the templates object in the 'store' component, and every new request will make a call to the method templates.newTransformer() since the 'templates' instance is thread safe from spec. All the best, Sebastien > One file that i did not attach is a helper for converting > NodeIterator to NodeList as i wrote to > you in my prev. e-mail. > > Thanks, > dims > > --- Scott_Boag@lotus.com wrote: > > > > The other issue that will effect Cocoon 2 is that we've > moved to use the > > serialize.* interfaces instead of the Xerces interfaces > (see my previous > > note on this). I suspect this will be a pretty dramatic > impact, though I > > hope I'm wrong. > > > > > The problem is that extensions are used and Xalan2 is not > up to snuff, > > > > Yep, sorry, still not done in spite of my promise. I hope > to get this > > fixed by tomorrow. > > > > -scott > > > > > > > > > > > > > > > "Nicola Ken > > > > > Barozzi" To: > , > > > > Scott Boag/CAM/Lotus) > > > > pereva.it> Subject: Re: > [C2] Short TODO list [was CLI almost > > there] > > > > > > > 10/02/00 > > > > > 07:47 AM > > > > > Please > > > > > respond to > > > > > cocoon-dev > > > > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > From: "Davanum Srinivas" > > To: ; > > Sent: Monday, October 02, 2000 1:40 PM > > Subject: Re: [C2] Short TODO list [was CLI almost there] > > > > > > > > > Is there anyone that wants to help replacing Xalan1 > with Xalan2 using > > > > > the TRaX interfaces? > > > > > > > > +100000 > > > > > > Does this mean just replacing XSLTProcessor with > trax.Processor? anything > > else? > > > > No, unfortunately things go much deeper, that is just the tip of the > > iceberg. > > The problem is that extensions are used and Xalan2 is not > up to snuff, > > AFAIK, but mostly the ting is that Xalan support was hardcoded. > > I agree with Stefano, that XSL use in C2 code should be pluggable. > > > > nicola_ken > > > > > > > > > > > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! > http://photos.yahoo.com/ >