cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Rosen" <a...@cti2.com>
Subject BUG: TraxTransformer uses cached URI resolver
Date Wed, 28 Aug 2002 12:17:08 GMT
Hi,

There's a bug in TraxTransformer when using Saxon with caching.

JAXP doesn't state clearly which URIResolver object should be used when creating a new TransformerHandler
for a SAX Templates object.

In Saxon there is a URIResolver in the Templates object, and there's a URIResolver in the
TransformerFactory creating the new TransformerHandler object. Saxon uses the one from the
Templates that is already obsolete in our case since it might have been recylced and reused.
According to Michael Kay (Saxon), JAXP doesn't state which URIResolver should be used so his
implementation is ok.

Anyway, our solution is simple, we should set the URIResolver we want to use explicitly:

in TransformerHandler#getTransformerHandler(Source, XMLFilter) there's the code:

TransformerHandler handler = getTransformerFactory().newTransformerHandler(templates);
handler.getTransformer().setErrorListener(new TraxErrorHandler(getLogger()));
return handler;

before returning the handler we should add the line:

handler.getTransformer().setURIResolver(this);


A comment has been sent to JSR 63 about this issue.

BTW:
I'm using:
- cocoon 2.0.3-dev
- saxon 6.5.2



Thanks,

Amir Rosen
CTI Squared
amir@cti2.com
+972-9-9605200 (258)
 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message