0

I need to evaluate the transformer being used in our application which is Xalan. Can you share the advantages and disavantages of Xalan java transformer with any other latest transformers

TransformerFactory factory = TransformerFactory.newInstance();
Source xslt = new StreamSource(new File("transform.xslt"));
Transformer transformer = factory.newTransformer(xslt);

Source text = new StreamSource(new File("input.xml"));
transformer.transform(text, new StreamResult(new File("output.xml")));
Sonu
  • 95
  • 1
  • 9
  • 1
    **Compared to what?** Question is meaningless without a referent. – user207421 Aug 12 '15 at 09:44
  • Now what? Does my answer contain enough information or what do you want to know about your answer, yet? – FluepkeSchaeng Aug 13 '15 at 09:28
  • @Phillip Pickartz, Currently the transformations in our application are running with Xalan, Is SAXON faster and good when compared to other available processors? if yes then what changes will be required inorder to use SAXON, will that take time to replace the Xalon with Saxon? what are all the challenges and risks involved ? – Sonu Aug 13 '15 at 09:56

1 Answers1

0

Advantages

Xalan-Java fully implements XSL Transformations (XSLT) Version 1.0 and the XML Path Language (XPath) Version 1.0.

(from the Xalan page)

Disadvantages

It does not implement the XSLT Version 2.0.

Performance

As far as I know the Xalan Processor uses the Document Table Model (DTM), which is faster then the Document Object Model (DOM). The Xalan XSLT Compiler can translate Styesheets to Translets, which are Java Bytecode and are executed in a runtime envirenoment.

This is IMHO pretty good. If it's not fast enough for your purposes, there is another implementaion of Xalan in C++.

[Source] (in german)

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.

In this answer on SO is a comparison between Xalan 2.7 and Saxon 9. Maybe it is helpful to you.

Community
  • 1
  • 1
FluepkeSchaeng
  • 1,441
  • 2
  • 11
  • 15
  • I've added a few sentences about the performance of XALAN. While I don't know your setting and possible other XSLT processors you might use, a comparison between other XSLT processors is somewhere difficult. – FluepkeSchaeng Aug 12 '15 at 12:50