Is there any built-in way to run an XSLT transformation on TeamCity? Preferably, as a build step. As I have not found anything in the docs so far, I'm not too confident about that feature, however, maybe somebody already integrated an XSLT transformation in the past.
Asked
Active
Viewed 861 times
3 Answers
7
No, teamcity doesn't have an XSLT trasform runner. However you could use below powershell script to transform.
$xslt = new-object system.xml.xsl.xslcompiledtransform
$xslt.load('D:\SampleTransform.xsl')
$xslt.Transform('D:\Input.xml', 'D:\Output.xml')

Mohammad Nadeem
- 9,134
- 14
- 56
- 82
-
This answer is only usable on Windows environments. TeamCity is used on Linux and other Unix systems as well. – Michael Shaw Apr 20 '15 at 10:38
2
TeamCity does not have dedicated XSLT transformation runner.
But using the Ant runner with "Build file content" option you can configure required transformation from the UI. Just provide a content like this:
<project default="MyXSLT">
<target name="MyXSLT">
<xslt in="MyInput.xml"
out="MyOutput.xml"
style="MyTransform.xslt">
</xslt>
</target>
</project>
You can even make this step re-usable by creating meta-runner. See this documentation for details

Nikita Skvortsov
- 4,768
- 24
- 37
0
Try the xslt runner
It is a simple runner, like command line, but it comes bundled with msxsl.exe. So no need to install it on the agent.

Venkat Naidu
- 105
- 6