i'm new to Camel and have seen the example etc and the 'How do I use dynamic
URI in To' posting and infor on Expressions etc.
What i need to do, and cant quite work out how to do, is use the content of
the XML i wish to transform to derive the name of the XSL to use.
Essentially i have an existing JBI setup which does this:

  <saxon:xslt service="cvsrx1_0:requests-xslt" endpoint="requests-xslt">
    <saxon:expression>
      
      <bean
class="org.apache.servicemix.expression.JAXPStringXPathExpression">
        
        <constructor-arg
value="concat(local-name(/*[local-name(.)='Envelope']/*[local-name(.)='Body']/*),'.xsl')"
/>
      </bean>
    </saxon:expression>
  </saxon:xslt>

The above is routed/reference like this:

  <eip:static-routing-slip service="cvsrx1_0:routing-slip"
endpoint="routing-slip">
    <eip:targets>
      <eip:exchange-target service="cvsrx1_0:requests-xslt" />
      <eip:exchange-target service="cvsrx1_0:rx-legacy-http" />
      <eip:exchange-target service="cvsrx1_0:responses-xslt" />
    </eip:targets>
  </eip:static-routing-slip>


where 'routing-slip' is passed a SOAP message.

So, use Camel DSL i *think* i could do something like

.to("xslt:${local-name(/*[local-name(.)='Envelope']/*[local-name(.)='Body']/*)}.xsl")

Can i do this, i.e use an XPath expression to derive the name of the XSL
from the XML/SOAP?

I saw that from 2.9 a header can be set, maybe thats the way to go - again
can that be doen using DSL?

Thanks for the help

Martin




--
View this message in context: 
http://camel.465427.n5.nabble.com/Dynamic-XSL-from-Content-tp5725634.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to