cocoon-dev mailing list archives

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

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:


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

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


Amir Rosen
CTI Squared
+972-9-9605200 (258)

To unsubscribe, e-mail:
For additional commands, email:

View raw message