Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 55894 invoked by uid 500); 2 Jun 2001 18:44:23 -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 Delivered-To: moderator for cocoon-dev@xml.apache.org Received: (qmail 53036 invoked from network); 2 Jun 2001 18:43:58 -0000 Message-ID: <001701c0eb93$ffa076c0$01c8c8c3@RAEL> From: "Carsten Ziegeler" To: Subject: AW: Bug in TraxTransformer resolve()?? Date: Sat, 2 Jun 2001 20:41:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi Rick, I don't have access to the cvs until Tuesday or Wednesday I fear. But I could look into it then if noone else has done it by then. Thanks! Carsten > Rick Tessner wrote: >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. > > > ["TraxTransformer.java.diff" (text/plain)] > > Index: src/org/apache/cocoon/transformation/TraxTransformer.java > =================================================================== > RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransfo \ > rmer.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; > } > > > > Rick Tessner rick@myra.com > MYRA Systems Corp. Fone: (250) 381 1335 x125 Phax: (250) 381 1304 > Cell: (250) 885 9452 > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org