Using Saxon from VB6

安稳与你 提交于 2019-12-10 12:19:25

问题


I need to invoke XSLT 2.0 transformations from a legacy VB6 application. I had a very good previous experience with the command line version of Saxon, so I decided to give the Saxon's .NET version a try. This is my first serious experience with COM/.NET interoperation mechanism and, unfortunately, all my quick attempts to make Saxon .NET available to my VB6 application have failed: depending on the versions of Saxon and .NET that I tried, the Saxon API classes either don't seem to work or don't even show up in Object Browser.

I would really appreciate it if any of you would share your successful experience with using Saxon .NET from a VB6/VBA6 application (or any other COM application). It would be great to know which specific versions of Saxon and .NET had worked for you, which specific Saxon assemblies had to be registered for COM/.NET interop. A simple VB6 code example of transformation with a parameter would be a great icing on this cake. :)

Thank you!


回答1:


On Windows if you want to use COM and XSLT 2.0, then I would consider AltovaXML or now Raptor from Altova, they offer COM automation: http://manual.altova.com/RaptorXML/raptorxmlserver/index.html?rxcomnet_aboutcom.htm. Example is at http://manual.altova.com/RaptorXML/raptorxmlserver/index.html?rxcomnet_codeex_vbscript01.htm for VBScript. I don't think an application written with and for the .NET framework is suitable for COM automation unless the developer takes steps described in http://msdn.microsoft.com/en-US/library/zsfww439%28v=vs.80%29.aspx so I don't think having the .NET version of Saxon will simply allow you to use it with COM automation.




回答2:


I've no experience myself in calling .NET components from COM components.

However, you might like to take a look at Saxon/C and see if it's any use in this environment. Information here:

http://www.saxonica.com/saxon-c/index.xml



来源:https://stackoverflow.com/questions/23718405/using-saxon-from-vb6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!