0

This is very strange issue I see. When I execute the command:

msxsl.exe abc.xsl -o abc.xml

This runs on my machine(Windows 10 Enterprise, version 20H2) but when I run the same on other machine with same OS, it says:

Variable or parameter 'XYZ' cannot be defined twice within the same template 

why is it so? code base is exactly same in both machines.

Anand
  • 2,239
  • 4
  • 32
  • 48
  • I think the error message happens when you have e.g. `..`, due to the restrictions specified in https://www.w3.org/TR/xslt-10/#local-variables. I can't tell why you don't get the error on one machine if the XSLT is the same as on the other machine. – Martin Honnen Jan 21 '22 at 09:31
  • I'm not sure if XSLT is same, how to check XSLT version? – Anand Jan 21 '22 at 09:39
  • You don't know whether the `abc.xsl` is the same on both machines? As for the version, the `mxsl.exe` tool uses MSXML which is an XSLT 1.0 processor. – Martin Honnen Jan 21 '22 at 09:46
  • Oh, abc.xsl is definitely same on both machines – Anand Jan 21 '22 at 10:00
  • And does the `abc.xsl` have a template with a duplicated template parameter declaration? – Martin Honnen Jan 21 '22 at 10:01
  • Yes, it is duplicated in another template. – Anand Jan 21 '22 at 11:47
  • As I said, it will be hard to find an explanation on StackOverflow as to why you get different results if you really run the same version of a tool against the same XSLT code on the same OS version. To investigate on your own, does that `msxsl.exe` tool with `-?` or `-h` show any options as to display which version of MSXML it uses by default? Or does it have a `-v` option to be more "verbose"? – Martin Honnen Jan 21 '22 at 12:10
  • From XSLT, to check the MSXML version you can output `` (with e.g. `xmlns:msxml="urn:schemas-microsoft-com:xslt"` declared). – Martin Honnen Jan 21 '22 at 12:12

0 Answers0