BizTalk:XSLT与映射工具 [英] BizTalk: XSLT versus mapping tool

查看:67
本文介绍了BizTalk:XSLT与映射工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在进行从旧版系统生成的XML文件到EDI 834/837文件的映射过程.我们拥有BizTalk 2010,并且正在使用Microsoft内置的EDI模式.

We're doing a mapping process from an XML file generated by a legacy system to EDI 834/837 files. We have BizTalk 2010 and are using the Microsoft built in EDI schemas.

EDI文件非常复杂,而我们得到的XML文件也非常复杂,其中涉及很多内容.我开始使用映射工具,但是通过XSLT运行XML文件似乎可以消除很多麻烦.

The EDI files are fairly complex, and the XML file we are getting is also complex, with a lot of pieces bolted on. I started going through the mapping tool, but it seemed like there was a lot of repitition that I could eliminate by running the XML file through an XSLT.

我找到了以下链接,但我对仅一个来源不满意. http://blog.eliasen.dk/2009/07/08/CustomXSLTScriptingFunctoidOrBuiltinFunctoids.aspx

I found the following link, but I'm not happy with just one source. http://blog.eliasen.dk/2009/07/08/CustomXSLTScriptingFunctoidOrBuiltinFunctoidsAQuestionAboutReligion.aspx

那么,与仅构建自定义XSLT相比,使用映射工具还有其他优势吗?

So, any other advantages on using the mapping tool over just building a custom XSLT?

推荐答案

我对BizTalk映射的经验是,使用XSLT进行非常简单的操作对于地图可能非常复杂.

My experience with BizTalk maps is that things that are very simple to do with XSLT can be very complex with maps.

有关BizTalk映射的良好反例,请参阅《 BizTalk Server 2009中的Pro映射》一书.本书列举了一些您可以使用BizTalk映射完成的非常复杂的事情的示例,但缺点是它们实际上隐藏了编写脚本函子的所有复杂性.因此,地图根本不再是可视的(它们甚至在节点之间也没有链接,至少不能提供提示以推断出地图在做什么).

For good counter-examples of BizTalk maps, look at the book "Pro Mapping in BizTalk Server 2009". The book has some examples of very complex things you can achieve with BizTalk maps, but the downside to it is that in fact they have hidden all the complexity in scripting functoids. Therefore, the maps are not visual at all anymore (they don't even have links between nodes to provide at least hints to deduce what the map is doing).

XSLT比地图更直观,因为您可以在XSLT中看到生成的XML(请注意,文本"并不意味着不可视"-如果要在文本格式之间进行转换,那么自然的方法是通过查看文字来直观地看到转换)

XSLT can be more visual than a map, since you can see the resulting XML in the XSLT (keep in mind that "text" does not imply "not visual" - if you are transforming between text formats, then a natural way to visualize the transformation is by looking at text)

BizTalk映射可用于非常简单的映射,在该映射中,您实际上是将一组属性从一个结构复制到另一个具有相同属性的结构.但是,一旦您必须将一个结构映射到另一个不同的结构,就会很快得到一些难以编写且难以阅读/理解的东西.

BizTalk maps can be used for very simple mappings, where you are essentially copying a set of properties from one structure to another structure with the same properties. However, as soon as you have to map a structure to another different structure, you quickly get something that's hard to write AND hard to read/understand.

这篇关于BizTalk:XSLT与映射工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆