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
[EMAIL PROTECTED]
+972-9-9605200 (258)
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to