Sergey, I stepped through the XSLTJaxbProvider code, and I think I found the
problem.  The following line in marshalToOutputStream:

TransformerHandler th =
factory.newTransformerHandler(createTemplates(getOutTemplates(mt),
outParamsMap, outProperties));

I found that the createTemplates method is creating a new TemplatesImpl,
which implements Templates, but is not an instance of PreparedStylesheet. 
Apparently the saxon transformer factory checks to make sure the Templates
are an instance of PreparedStylesheet, and throws an exception if not:

if (!(templates instanceof PreparedStylesheet)) {
            throw new TransformerConfigurationException("Templates object
was not created by Saxon");
        }

For now, I've made my own copy of XSLTJaxbProvider, and replaced the above
code with:

TransformerHandler th = factory.newTransformerHandler(getOutTemplates(mt));

This works, and my xslt template is being applied.  It looks like this will
not pass parameters and out properties to the transformer, which doesn't
currently affect me.
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/XSLTJaxbProvider-getting-TransformerConfigurationException-Templates-object-was-not-created-by-Saxon-tp1046769p1111305.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to