XSLT throws error on run, but not, when debugging

I have this xml called "company.xml":

      <name>John Andrews</name>

...and this XSLT called "next-match.xsl":

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   <xsl:output omit-xml-declaration="yes" indent="yes"/>

   <xsl:template match="node()|@*" name="identity" mode="#all">
         <xsl:apply-templates select="node()|@*"/>


...which just output all nodes of the xml.

After configuring the XSLT, I click the green "Run"-button and get this error (and no results in "XSLT Output"):

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Dxslt.file=/[PATH]/next-match.xsl -Dxslt.input=/[PATH]/comany.xml -Dxslt.listen-port=51697 -Dxslt.smart-error-handling=true -Dfile.encoding=UTF-8 -classpath /Applications/PhpStorm.app/Contents/plugins/xpath/lib/rt/xslt-rt.jar org.intellij.plugins.xslt.run.rt.XSLTRunner
Connecting to XSLT runner on localhost/
[ERROR]: file:/[PATH]/next-match.xsl: line 6: An attribute whose value must be a QName or whitespace-separated list of QNames had the value '#all'

Process finished with exit code 0

When I click on the debugger button, everything works as expected.

Is this a correct behaviour? because if so, I do not understand, why, and hope somebody could enlighten me here...
And if not, should I file a bug report?


Comment actions Permalink

the Run action doesn't work correctly for XSLT 2.0

You have to either  put an XSLT 2.0 engine implementation into the classpath the stylesheet  is run with (using the Advanced of XSLT run configuration) or use Debug  action instead of Run to run your transformation. See http://youtrack.jetbrains.com/issue/IDEA-110474
Comment actions Permalink

Thank you for your response!  - Now, is this a bug in the XSLT plugin or not? Because if so, I would open a ticket...

Comment actions Permalink

Stupid me!!!! I should have clicked your link in your first answer... aaargh...


And thanks a lot again!
All the best!


Please sign in to leave a comment.