Monthly Archives: June 2013

Quick Way to Test XSLT Transformation

I am working on a project that has a lot of transformations of raw source XML files to a standard format. For this we ended up using XSLT, so I needed a quick way to test these transformations without having to spin up an IDE or embed a reference the source file or xsl file.

To do this on Windows I just downloaded a tool from Microsoft, called msxsl.exe.

To test it, just run a simple command line and pass it the source and stylesheet:

msxsl.exe source.xml stylesheet.xsl

This will output a the text of the transformation to the command window.  If instead you want to output it to a file, simply redirect the output to a filename, like so:

msxsl.exe source.xml stylesheet.xsl > output.xml

Easy stuff…