I am trying to achieve XML - XSLT transformation. For that I am using JDK 6 and Spring 4.1.8. From the code I see XsltPayloadTransformer compiles XSL file and then transforms XML data file. But however my XSL uses XPath V2 and It seems that JDK6 doesn't support it. So is there any way I can still use XSL with XPath v2.0. Is there any support by Spring or do I need to degrade my XPATH version to 1.0 ??
Asked
Active
Viewed 123 times
0
-
1I don't believe it's a matter of JDK. For XSLT / XPath support, it is usually an external library (e.g. Xalan or Saxon). – potame May 23 '16 at 06:26
-
3XSL using XPath 2.0 is usually simply XSLT 2.0 and the Sun/Oracle JDK does not support XSLT 2.0 as it uses an internalized version of Apache Xalan which is an XSLT 1.0 processor. In the Java world XSLT 2.0 support is available using Saxon 9, you have the choice between the open source version HE and the commercial versions PE and EE. The lastest version is 9.7 and according to http://saxonica.com/html/documentation/about/installationjava/prerequisites.html works with JDK 1.6. – Martin Honnen May 23 '16 at 08:48
-
Thanks a lot MartinHonnen and potame. So bottom line is that I cant use Xalan because java already uses same and it does not support Xpath 2. So I have no choice but to go with Saxon. – Zebronix_777 May 23 '16 at 09:13
-
@Zebronix_777, And this is a **good** choice :) – Dimitre Novatchev May 24 '16 at 00:24