XSLT debugger using libsaxon, which only supports XSLT1.0

I expected the XSLT debugger to support XSLT 2 and XPath 2, but it's actually using com.icl.saxon, something entirely different from Saxon 9.

As such, I can't debug XSLT 2 and XPath 2.

XSLT Runner does use Saxon 9, somehow.

0
5 comments

Hi,

the XSLT debugger that is bundled with IDEA 11 & IDEA 12 does support XSLT 2.0: When a stylesheet that specifies version="2.0" is being debugged, the plugin automatically chooses the Saxon 9-HE implementation that is also bundled with IDEA.

However, for simple running XSLT 2.0, you need to have the XSLT processor that is to be used in the classpath that is selected in the "Advanced" tab of the run configuration's properties.

HTH,
Sascha

0

No, this is not the case.

The stylesheet specifies version 2.0. On launching the debugger, without specifying any vm arguments, IntelliJ includes this system property on its own: -Dxslt.transformer.type=xalan

If I instead set it to -Dxslt.transformer.type=SAXON, it uses com.icl.saxon, which only supports XSLT 1. I verified that no vm arguments are included in the default XSLT configuration.

Mac OS X, 12.0.2 IU-123.123

0

Xalan is used automatically if a compatible version is found in the module's classpath. Please select a plain JDK in the Advanced tab under "Classpath and JDK".

In case of an XSLT 2.0 stylesheet this should not happen and will be fixed.

You can also specify "saxon9" as transfomer type which will select the correct XSLT processor.

0

@sascha 

Could you please make it clearer how to enable xslt v2 in xslt debugger? I have spent a lot of time but no success :(

 

Idea 2018.2.4 

I added jre/lib/ext into java 1.8 sdk saxon9he.jar

JDK 8 classpath - loaded this jar in idea configuration

plugin "Classpath and JDK " Usej JDK 1.8

 

VM arguments: 

-Dxslt.transformer.type=saxon

 

DEBUG

 

This is always 1

<xsl:param name="version" select="system-property('xsl:version')"/>

 

And later errors

javax.xml.transform.TransformerException: Error in expression if ($repeatLeft) then ($leftWidth) else (0): Unknown system function: if
at com.icl.saxon.style.StyleElement.styleError(StyleElement.java:818)
at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:626)
at com.icl.saxon.Controller.transformDocument(Controller.java:1121)
at com.icl.saxon.Controller.transform(Controller.java:994)
at org.intellij.plugins.xsltDebugger.rt.engine.local.LocalDebugger$1.run(LocalDebugger.java:58)

 

Thank you!

 

0

I changed 

-Dxslt.transformer.type=saxon

to 

-Dxslt.transformer.type=saxon9

 

and xslt 2.0 is working.

How may I pass typed parameter in this plugin? e.g. false, false(), xs:boolean('false'), xs:boolean(false) - not working

<xsl:param name="xyz" as="xs:boolean"

net.sf.saxon.trans.XPathException: Required type is xs:boolean; supplied value has type xs:string


This is so powerful plugin - shame that there is no basic documentation.

Thank you

0

Please sign in to leave a comment.