简体   繁体   中英

Using Saxon from VB6

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!

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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