Saxon 9.x vs XQSharp vs AltovaXML for .net

I need an XSLT 2.0 processor to use in .net 4.0. I found out that XSLT 2.0 is not supported by .net. Alternatives are third-party engines such as Saxon 9.x or XQSharp. I need XSLT 2.0 support for a commercial production environment where performance is critical. Questions:

  • Saxon 9.x or XQSharp, which one do I need to choose?
  • What is pro and con of two products?
  • Are there any other alternatives?
  • What about AltovaXML compared to Saxon 9.x or XQSharp?
+6
source share
3 answers

In recent weeks, I have used XQSharp, Saxon 9.x, and AltovaXml to rewrite my program using Microsoft XSLT1. Here are my impressions:

AltovaXML

  • It is free (but the free version is limited and does not come with the source).
  • The website is fine, so you can find what you need.
  • Api is simple easy to configure
  • Has api for different languages
  • It uses COM, in other words, requires built-in code interaction
  • This is the slowest engine I use.

Xqsharp

  • .NET friendly
  • Excellent exceptions with a good description
  • Faster than AltovaXml
  • It is not free and the source is not provided

Saxon 9.x

  • Not a friendly site, it’s hard to find what you are looking for
  • Created by Michael Kay (W3C Specification Editor for XSLT 2.0)
  • The fastest XSLT2 engine I've used
  • In a limited open source release, with schema support and streaming with proprietary versions
  • Based on Java, but comes with a packaged IKVM port in .NET.

For my comparison of XML and XSLT translation performance (XSLT1):

  • 0.02 s Microsoft XSLT1 Engine
  • 0.45 with Saxon 9.x
  • 0.60 with XQSharp (with OptimizationLevel.None)
  • 0.90 s XQSharp (default setting)
  • 1.20 with AltovaXml
+7
source

I am an XQSharp developer, but I will try to give an unbiased answer.

Both XQSharp and Saxon are good products. Each of them has a high standard, and both are aimed at excellent performance. My best advice is to download trial versions and test using the transforms you expect to run. We would be interested to know how you are doing.

If you work in a .NET environment, I expect XQSharp to have several advantages. First, it is developed in .NET, and Saxon is developed in Java and uses IKVM to work in .NET. You might want to compare the Java and .NET editions of Saxon to determine if this imposes performance overhead.

XQSharp is designed for good integration with classes from the .NET Framework System.Xml and System.Xml.XPath namespaces. For example, an implementation uses XPathNavigators. You may find this dating useful.

XQSharp implements and extends the function found in XslCompiledTransform to call .NET from XSLT, which may seem useful to you.

See this list of implementations .

+4
source

I could not find out how to answer the answer above (which gave me some useful tips), so I will post it here: AltovaXML changed its policy regarding AltovaXML.dll. You can get the version for free, but it lacks some features. Therefore, you are better off buying a license. It also seems that Altova has a memory problem, because the program seems to continue to work even after you close the connection.

Saxon has a weird try-to-buy policy. By this I mean that it’s strange that you get a 30-day test, but the start / end date moves by 10 days or so (read more on the website for Saxon). It also adds text to your converted files. I do not like this, because I want my converted files - even in the test - to be correct, so that I can see that you can send files forward to our systems. I hope this changes in later versions.

XQSharp - I have not tried this, and therefore I can not say much about it. When I upgrade my service using XSLT2.0, I will give this library / helper a spin.

+1
source

Source: https://habr.com/ru/post/891278/


All Articles