> I made the following change to ./etc/system.properties: I don't recommend changing ./etc/system.properties to Saxon because it won't work honestly.
Saxon (xslt2 implementation) is a bundle and is loaded just before camel-saxon but it doesn't matter, "javax.xml.transform.TransformerFactory" won't see saxon because it is on system classloader and system classloader don't see bundles classloaders. The only proper way to use saxon is to ... create net.sf.saxon.TransformerFactoryImpl myself in the blueprint/or spring dm and provide it via "transformerFactory" parameter in camel. Secondly when you use Saxon you need to be aware: that saxon works better when you work on Saxon data format (NodeInfo/DocumentInfo) and your all xslts use the same Saxon transformer factory instance. So in my app I have one bundle which exports transformer factory OSGI service and I inject the same service instance where I need. (I have own Camel xslt and xpaths endpoint as well, because Camel one doesn't support working on Saxon native data format and so you can consider having own xslt/xpath camel endpoint as well and solve this issue there). PS. You can try to.. copy Saxon jar to ./lib But there is nice readme.txt: "This directory is the standard Java classpath directory. Any jar in this folder will be part of the main classloader used to load Karaf. However, in OSGi, classes defined in these jars won't be available to other bundles unless one of the org.osgi.framework.system.packages.extra or org.osgi.framework.bootdelegation properties in the etc/config.properties file is modified to export or delegate the packages. Please refer to the OSGi Core Specification for more information on these properties and the OSGi classloading mechanism." But I don't recommend touching this dir until it is your last resort, because this is a hack and you can't control how the rest smx bundles are configured. -- Regards, Mateusz Nowakowski -----Original Message----- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Sunday, June 24, 2012 09:49 To: users@camel.apache.org Subject: Re: camel xslt 2.0 support Hi You can try upgrading SMX. On Fri, Jun 22, 2012 at 6:46 PM, weather99 <fflei...@harris.com> wrote: > I tried installing camel-saxon but got the same results. > > I made the following change to ./etc/system.properties: > #javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tra > nsformerFactoryImpl > javax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactory > Impl > > This also had no effect. I'm still at the same place. My camel xslt > 2.0 transform returns prolog only. When using a bean xslt 2.0 > transformer the bean returns errors for xslt 2.0 tags. Removing the > xalan-2.7.1.jar from ./ib/endorsed causes my route to fail to load. > > I have no problem getting this to work in standalone Camel. I have > been able to duplicate the problem in standalone Camel by putting a > xalan jar file on my classpath. In that case, the Camel xslt > transformer gives me a prolog only. > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-xslt-2-0-support-tp5646214p571 > 4932.html Sent from the Camel - Users mailing list archive at > Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen