Hi,

There’s a problem with saxon 6.5.2 when working with cocoon – I can’t say it’s a bug, but it is certainly a strange behaviour:

 

Cocoon caches Templates objects for later use. When they’re needed it passes this object to the TransformerFactoryImpl of saxon, requesting a new TransforerHandler. The Templates object (PreparedStyleSheet in this case) holds a reference to the factory that was ORIGINALLY used to build it and thus, the new TransformerHandler that’s returned, uses the URIResolver that was given to the original factory, and in the case of working with cocoon, this object is usually an object (TraxTransformer) that was already recycled, its uriResolver nullified. I think it might be more logical to re-set the URIResolver of the Controller object before returning it, as if a brand new handler was created from the source XSL.

 

Mike, I would like to hear your opinion on the subject, it might be that cocoon is abusing the Templates interface, but still, it’s a problem if these objects can’t be cached.

 

Thanks

 

Ytai Ben-Tsvi