8

It is year 2018. What is the state of the Xerces2 XML parser and Xalan XSLT processor libraries for Java? Their last releases appear to be 2.11.0 in 2013 and 2.7.2 in 2014 respectively.

  • Are they still maintained?

  • Are they so perfect that they do not need even occasional patch release?

  • Are there replacement libraries from different vendors that one could use instead? Are these replacements free in the same way as these two?

  • Can one generally do without these with just what JDK offers?

wilx
  • 17,697
  • 6
  • 59
  • 114
  • I prefer Saxon as XSLT processor. – lexicore Apr 10 '18 at 09:50
  • 3
    Saxon 9.8 HE is an XSLT 3.0 processor available as open-source on SourceForge https://sourceforge.net/projects/saxon/files/latest/download?source=files and on Maven so it can be considered a replacement for Xalan as Xalan implements XSLT and XPath 1.0 from 1999 while Saxon 9.8 supports the latest XSLT 3.0 and XPath 3.1 from 2017. – Martin Honnen Apr 10 '18 at 10:58

2 Answers2

5

Active development of Xerces and Xalan stopped much earlier than these last releases. In between there were plenty of patch releases to fix bugs. It's quite natural that after a few years of issuing bug fixes only, with no new development, software becomes very stable and no further maintenance releases are required.

For many years I used to advise using the Apache version of Xerces because it was more reliable than the version in the JDK: the JDK version had some nasty bugs and Sun/Oracle seemed in no hurry to fix them. I think that has now changed; the JDK versions are now perfectly usable.

If you need XSLT features beyond the 1.0 level, then switch from Xalan to Saxon.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • 5
    With all due respect, please disclose your affiliation. – lexicore Apr 10 '18 at 11:46
  • JDK version has [limited](https://stackoverflow.com/questions/28347767/prevent-wrapping-of-lines-when-pretty-printing-xml-string) essential and very useful library functionality – Mike Mar 12 '21 at 12:27
1

Basically these are jaxp implementations that were donated to Apache by different companies. Crimson is another one that was donated by SUN. These days a jaxp implementation is bundled with the JDK so there is very little reason to use an alternative implementation. As I recall from way back, you'd typically pull in xerces or xalan as a dependency when doing j2ee applications before that was the case.

check the unoffical jaxp faq

Jilles van Gurp
  • 7,927
  • 4
  • 38
  • 46