can java 1.7 support XSLT 3.0

1k views Asked by At

I want to transform json to json and came to know that XSLT 3.0 supports json to json transformation. But wanted to check if java 1.7 supports xslt 3.0 specs. I am aware there could be other frameworks that may provide support. For example, sax (http://www.saxonica.com/html/documentation/using-xsl/xslt30.html) But it is better to keep reduce the dependencies if java can support out of the box.

2

There are 2 answers

1
Michael Kay On

Late to the scene, but just to fill in the gap:

(a) Java "out of the box" will run only XSLT 1.0.

(b) There are a number of XSLT 2.0 processors that run in a Java environment but the only one that is (a) native Java, and (b) standalone, is Saxon. (There are other processors that come with Websphere or Marklogic, but you wouldn't consider them unless you want to make a heavy investment in those application server platforms; and Altova's RaptorXML has a Java interface, but it's pretty basic because everything calls across the network to an HTTP server behind the scenes.)

(c) It's early days for XSLT 3.0 yet. Saxonica and Altova have XSLT 3.0 implementations available; as with (b) Saxon is native Java while Altova is just a Java API front-end.

1
user207421 On

It doesn't even support XSLT 2.0, let alone 3.0. It is stuck with a fork of Apache Xalan, which in turn has been stuck at XSLT 1.0 for fifteen years.

You need to look into alternative providers such as Saxon.