XSLT throws error on run, but not, when debugging

I have this xml called "company.xml":

 
<company>
   <employee>
      <name>John Andrews</name>
      <age>
23</age>
      <salary>
4000</salary>
      <division>
production</division>
   </employee>
</company>


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

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

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

</xsl:stylesheet>


...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/127.0.0.1:51697
[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?

Thanks!

4 comments
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
0
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...

0
Comment actions Permalink

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

Sorry!!!

And thanks a lot again!
All the best!

0

Please sign in to leave a comment.