Gert-Jan, It seems like a reasonable use case so I'd like to give it a shot to fix this. Do you think you can create a unit test or something that demonstrates the problem? That would make it a lot easier to troubleshoot and fix your issue.
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/5/4 Gert-Jan van de Streek <[email protected]>: > > I want to pass an xml fragment to an xslt. I have the following code where > the queue holds xml messages > > from("activemq:example.A") > .setHeader("agent.id", new XPathExpression("/")) > .process(new ReadLocalFile()) > .to("xslt:transform.xsl") > > > The xslt looks like: > > ... > <xsl:param name="agent.xml"/> > > <xsl:template match="/"> > <xsl:value-of select="$agent.xml/agent/id" /> > > > I would expect the xml fragment to be available as a nodeset in the xsl, but > I get the following exception: > > javax.xml.transform.TransformerException: java.lang.RuntimeException: > Invalid conversion from > 'com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList' to 'node-set'. > at > com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:670) > at > com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300) > at > org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:83) > ... > > Any ideas on how to solve this? >
