Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use XSLT 2.0 in Eclipse?

Tags:

eclipse

xslt

In the Release Notes of WTP 3.1.0 they talk about WTP supporting XSLT 2.0.
I have Eclipse Luna 4.4.1 with WTP installed, but

<xsl:value-of select="system-property('xsl:version')" />

still always returns 1.0.

So how can I use XSLT 2.0 in Eclipse? When I go to the preference, I have the Xalan 2.7.1 option selected.

like image 278
ivoronline Avatar asked Jun 19 '15 19:06

ivoronline


1 Answers

I've had the same issue myself and was only able to solve it - just as @ivoronline commented - by manually adding Saxon HE9 as the standard XSLT processor. See: https://stackoverflow.com/a/7737731/1955204

After you have downloaded SAXON you can set the Eclipse standard processor at:

  1. Run
  2. Runtime Configurations
  3. Select your XSL Configuration on the left
  4. Open the "Processor" tab
  5. "Change Preferences"
  6. "Add" new processor
  7. Enter a name and select type as Saxon 2.0
  8. Use "Add Workspace JARs" or "Add External JARs" and route to the downloaded jar file
  9. Check the newly added, hit ok and run
like image 200
mr wares Avatar answered Oct 24 '22 01:10

mr wares