From cocoon-dev-return-13909-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Sat Jun 02 05:27:34 2001 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 95764 invoked by uid 500); 2 Jun 2001 05:27:33 -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 95753 invoked from network); 2 Jun 2001 05:27:33 -0000 X-Mailer: exmh version 2.0.2 2/24/98 To: cocoon-dev@xml.apache.org Subject: Re: AW: Bug in TraxTransformer resolve()?? In-reply-to: Your message of "Fri, 01 Jun 2001 09:20:44 +0200." Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_20207080180" Date: Fri, 01 Jun 2001 22:27:13 -0700 From: Rick Tessner Message-ID: <7745C16DA99.AAA6C25@mail.myra.com> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N --==_Exmh_20207080180 Content-Type: text/plain; charset=us-ascii On Fri, 01 Jun 2001 09:20:44 +0200, "Carsten Ziegeler" wrote: >I just checked some ideas to make it at least work, but unfortunalety >Xalan prevents us from a working version. >So, to avoid any problems with the XSL specification, we can't use >the cocoon urls in xsl:include etc for now. When the problem in Xalan >is fixed, we can use it. Hi Carsten, I think I found a solution to this ... I'm not so certain anymore that this is a xalan issue. I've attached a patch that through some preliminary testing seems to work. It hasn't been extensively tested by any means since I'm not aware of all the issues surrounding the URIResolver bits. This fix basically includes the URI along with the InputStream in returning the javax.xml.transform.stream.StreamSource from the resolve() method. With this, the "base" parameter is no longer being passed in as null. --==_Exmh_20207080180 Content-Type: text/plain ; name="TraxTransformer.java.diff"; charset=us-ascii Content-Description: TraxTransformer.java.diff Content-Disposition: attachment; filename="TraxTransformer.java.diff" Index: src/org/apache/cocoon/transformation/TraxTransformer.java =================================================================== RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java,v retrieving revision 1.15 diff -u -r1.15 TraxTransformer.java --- src/org/apache/cocoon/transformation/TraxTransformer.java 2001/06/01 06:19:56 1.15 +++ src/org/apache/cocoon/transformation/TraxTransformer.java 2001/06/02 05:18:36 @@ -274,7 +274,7 @@ + new File(parent.getParentFile(), href).getAbsolutePath()); } } - return new javax.xml.transform.stream.StreamSource(xslSource.getInputStream()); + return new javax.xml.transform.stream.StreamSource(xslSource.getInputStream(), xslSource.getSystemId()); } catch (IOException e) { throw new javax.xml.transform.TransformerException(e); } catch (SAXException e) { @@ -288,13 +288,7 @@ if(tfactory == null) { tfactory = (SAXTransformerFactory) TransformerFactory.newInstance(); tfactory.setErrorListener(new TraxErrorHandler(getLogger())); - // FIXME (CZ) - // The current Xalan Version 2.1.0 passes sometimes only - // a null pointer to the resolve method as the base argument. - // So we can add this if the problem is solved. - // Until then resolving of our special urls will not work - // using include of the stylesheets. - // tfactory.setURIResolver(this); + tfactory.setURIResolver(this); } return tfactory; } --==_Exmh_20207080180 Content-Type: text/plain; charset=us-ascii Rick Tessner rick@myra.com MYRA Systems Corp. Fone: (250) 381 1335 x125 Phax: (250) 381 1304 Cell: (250) 885 9452 "Hmmm. They have the Internet on computers now!" --==_Exmh_20207080180 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 --==_Exmh_20207080180--