【问题标题】:boss Fuse trasformation XML usinf XSLTboss 使用 XSLT 融合转换 XML
【发布时间】:2018-04-06 09:20:52
【问题描述】:

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>

我想使用我的 converterXsl.xsl 格式类来转换 file:///d:/inxslt 这个路径中的 xml 我在这里进一步尝试了这个不起作用

【问题讨论】:

    标签: java jboss jbossfuse


    【解决方案1】:

    尝试使用以下骆驼路线的定义。

    <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>
    

    请根据您的需要调整文件路径。特别要注意 XSLT 组件的符号。

    希望对你有帮助 ;-)

    【讨论】:

    • 嗨不需要使用任何java类吗?这将使用此 xslt 转换我的 xml?
    • 不需要 java 类。它应该转换您的 XML 文件。你遇到任何错误吗?可以分享一下吗?
    猜你喜欢
    • 1970-01-01
    • 2011-08-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多