cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <c.ziege...@online.de>
Subject AW: Bug in TraxTransformer resolve()??
Date Sat, 02 Jun 2001 18:41:17 GMT
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


Mime
View raw message