You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by richardgroote <ri...@gmail.com> on 2016/12/06 14:03:29 UTC

Saxon and root tag matching

Hello,

I've a question about using saxon and xslt within Apache Camel. Below is the
simplified camel configuration we're uising. The mock service returns some
XML.

When using the below xslt part than the result after the xslt is the
response of the mock service without the xml elements (namespaces are
declared).
<xsl:template match="/"><myoutput>out</myoutput></xsl:template>

When using the below xslt part (matching the root tag and declaring the
namespace) than the response is as expected.
<xsl:template match="cas:myResponse"><myoutput>out</myoutput></xsl:template>

When using a tool (XMLSpear or java client) matching on the '/' works. Does
anyone have a clue why this is not working?


<camel:route id="a" streamCache="true">
<camel:from uri="direct:someName" />
<camel:to
uri="spring-ws:http://localhost:8088/mockHttpBinding?timeout=10000" />
<camel:to uri="xslt:Response.xslt?saxon=true" />
</camel:route>

Kind regards,

Richard



--
View this message in context: http://camel.465427.n5.nabble.com/Saxon-and-root-tag-matching-tp5791134.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Saxon and root tag matching

Posted by richardgroote <ri...@gmail.com>.
Hello,

When adding a <camel:convertBodyTo type="java.lang.String"/> after the
spring-ws call than the response is fine. The response of the spring
webservice call is DomSource (SAAJMessageFactory is used).


Kind regards,

Richard



--
View this message in context: http://camel.465427.n5.nabble.com/Saxon-and-root-tag-matching-tp5791134p5791135.html
Sent from the Camel - Users mailing list archive at Nabble.com.