简体   繁体   English

如何在DataWeave Mule的flowVar变量上应用XSLT转换?

[英]How to apply an XSLT transformation over flowVar variable on DataWeave Mule?

I would like to apply an XSLT transformation over a flowVar variable which contains an XML, and I don't know how to specify that on DataWeave Mule. 我想在包含XML的flowVar变量上应用XSLT转换,但我不知道如何在DataWeave Mule上指定它。

Thanks in advance, Juan Andres 在此先感谢Juan Andres

In the dataweave, you don't need to specify XSLT. 在数据编织中,您无需指定XSLT。 Some operations which you would like to do in XSLT are also available in Dataweave. 您希望在XSLT中执行的某些操作在Dataweave中也可用。

Let us know what exact is your source/target format. 让我们知道您的源/目标格式到底是什么。

MuleSoft recommends using DataWeave as it's a universal transformation engine, which replaces a multiple of separate transformers that could used. MuleSoft建议使用DataWeave,因为它是通用转换引擎,可以代替可能使用的多个单独的转换器。 If you have an XLST, you don't supply this to dataweave as it won't be understood. 如果您有XLST,则不会将其提供给dataweave,因为它不会被理解。 You will have to recreate the transformation that you want to use within dataweave from the XLST - there is no option to convert or access an XLST from a dataweave transformation. 您将不得不从XLST重新创建要在dataweave中使用的转换-没有选择从dataweave转换转换或访问XLST的选项。

There is an XLST transformer that is shipped in Mule; Mule附带有一个XLST变压器。 it's outside of dataweave and was available as the default in earlier versions. 它在dataweave之外,并且在早期版本中作为默认设置可用。 You will not find it within the Mule Palette, but there is an example given here - https://docs.mulesoft.com/mule-user-guide/v/3.7/xslt-transformer - but this might not be available in later versions of Mule. 骡子调色板中你不会找到它,但这里给出一个例子- https://docs.mulesoft.com/mule-user-guide/v/3.7/xslt-transformer -但是这可能不会在以后提供版本的M子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM