Search code examples
javajbossjbossfuse

boss Fuse trasformation XML usinf XSLT


http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">

<camelContext id="cbr-example-context" xmlns="http://camel.apache.org/schema/blueprint">

    <route id="cbr-route">
        <from id="_from1" uri="file:///d:/inxslt"/>
        <transform.xslt from="_from1" to="_to3" xsltFile="src/main/java/com/xslt/converterXsl.xsl"/>
        <to id="_to3" uri="file:///d:/outxslt"/>


    </route>
</camelContext>

i want to use my converterXsl.xsl format class to transform xml which is in file:///d:/inxslt this path i tried this further here not not working


Solution

  • try to use the following definition of the Camel route.

    <camelContext id="_context1" xmlns="http://camel.apache.org/schema/blueprint">
        <route id="_route1">
            <from id="_from1" uri="file:src/data?noop=true"/>
            <to id="_to1" uri="xslt:file:src/xml2html.xsl"/>
            <to id="_to2" uri="file:target/output"/>
        </route>
    </camelContext>
    

    Please, adjust file paths to your needs. Especially, notice notation of XSLT component.

    I hope it helps ;-)