10
votes

I am currently using Xalan 2.7.0 for XSLT transformations over XML, but thinking over to switch to Saxon 9 version for XSLT transformations. So could someone list me the major cons and prons of using Saxon over Xalan . Although i know that Saxon supports XSLT 2.0 and other major changes but instead i would like to know more about personal experiences with Saxon 9 and its prons and cons and other benefits.

3

3 Answers

20
votes

I used Xalan 10 years ago. I have been using Saxon almost exclusively for the last 10 years.

Not only is Saxon an XSLT 2.0 and XSLT 3.0 processor, but it is very actively developed and maintained.

Saxon 9.xx is one of the fastest XSLT processors. Its developer, Dr. Michael Kay is the Editor of the W3C XSLT WG (Working Group) and thus he is probable the one that best understands the XSLT Specification and this shows in Saxon. Any language feature is strictly and precisely implemented -- usually well ahead of other vendors.

Dr. Kay often reports the level of compliance as indicated by running the W3C XSLT and XQuery WGs test suite, which consists of tens of thousands of tests.

Saxon is supported by several IDEs, one of the most prominent being oXygen. Saxon has a very active user mailing list and the typical response time is usually measured in hours.

While I have about 11 XSLT processors installed, the one that I am using 99% of my time is Saxon.

13
votes

We integrate both Xalan and Saxon (6.5 and 9) into our product, oXygen XML Editor, so basically, we support XSLT developers that use both Saxon and Xalan.

From our experience, Saxon 9 is actively developed while Xalan development is stalled for many years. This is also because Saxon 9 is an XSLT 2 processor while Xalan is an XSLT 1 processor and there is not much you can do on XSLT 1.

Most XSLT developers these days use XSLT 2.0 so the fact that Saxon 9 is an XSLT 2.0 engine alone is a good reason to chose Saxon 9. There is no point in struggling with XSLT 1 while XSLT 2 is available for a few years already.

Xalan is licensed under Apache 2.0 and Saxon is licensed under Mozilla Public License (MPL). From the usage point of view, there is not really a difference—it will be a difference only if you change the processor code yourself, in the case of MPL you need to make available your changes to the code.

One minor issue with Saxon 9 HE is that it does not support extensions directly, but you can register integrated extensions through the API or by passing an Initializer class in the command line that will register those extensions. However, XSLT 2.0 provides many new functions and instructions as standard so it is less likely that you will need extensions.

Saxon 9 also includes support for XSLT 3.0 (currently this is a working draft) but with Saxon you have early access to some of the new additions in XSLT 3.

For our internal XSLT tasks, we use almost all the time Saxon 9.

3
votes

just to add to what George says: not only will you get more functionality w/Saxon than w/Xalan, but you will get greatly improved performance (less memory, runs faster) in many cases as well.