How to run/process xslt 2.0 templates in Idea?
Answered
I am using Idea 2017.2.3 ultimate edition to execute a XSLT 2.0 template. The stylesheet tries to load a csv file. It fails with a runtime error
[ERROR]: Could not compile stylesheet
[FATAL]: Error checking type of the expression 'funcall(unparsed-text, [parameter-ref(csv-uri/reference), parameter-ref(csv-encoding/reference)])'.
The code to load the csv file is
<xsl:param name="csv-uri" select="'file:///E:/data.csv'"/>
I checked the XSL vendor & version and found it to be Apache Software Foundation (Xalan XSLTC)1.0. The code to check the vendor and version is
<xsl:value-of select="system-property('xsl:vendor')"/>
<xsl:value-of select="system-property('xsl:version')"/>
How can I configure Intellij to run/process xslt 2.0 templates? I understand that during debug the "SAXON 6.5.5 from Michael Kay1" processor is selected but not during run.
Thanks.
Please sign in to leave a comment.
Please see https://youtrack.jetbrains.com/issue/IDEA-85833.
Thanks for the reply. I add the saxon jars to the jre lib. I see that the vendor and the version are both "SAXON 6.5.5 from Michael Kay1" now. The original error still comes when I do a run and NOT when I debug.
Note that during debug i see below logs where the SAXON version is different.
Would the version difference causing the error? I copied the saxon jars from xslt-debugger plugin directory of intellij idea.
What's the name of the jar? Is it saxon9he.jar?
Got the issue. By mistake I copied both - saxon.jar and saxon9he.jar. After removing saxon.jar I can run the xslt 2.0 template.
Thanks.