Xsl.Transformer
1.0.1
See the version list below for details.
dotnet tool install --global Xsl.Transformer --version 1.0.1
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local Xsl.Transformer --version 1.0.1
#tool dotnet:?package=Xsl.Transformer&version=1.0.1
nuke :add-package Xsl.Transformer --version 1.0.1
XSL transformer
Since IE is being retired, it is getting a bit harder and more annoying to view IIS' failed request logs (which I have the deep pleasure of having to view very often), I decided to help myself by creating a simple tool that will transform my failed request logs (or any other transformation data, usually in XML format) into a proper readable file format via an XSL template (in my case, IIS' failed request logs in XML to browser readable HTML so I can easily view them without Internet Explorer).
Setup:
If you're on Linux or MacOS, see the Usage
section below. Windows users, aside from that, can additionally define a template path (I'll use IIS' template for transforming failed request logs into HTML as an example):
- Save the freb.xsl (rename it to what you want if needed) somewhere on your PC
- Preferably set up an environment variable (
XSLT_TEMPLATE_PATH
) to the value of that location (e.gC:\Windows\System32\freb.xsl
). - Install the tool as per:
- Open command line in the Xsl.Transformer directory
- Run
dotnet pack
- Install the tool using
dotnet tool install --global --add-source ./nupkg Xsl.Transformer
When willing to remove, use dotnet tool uninstall --global Xsl.Transformer
to uninstall the tool from your system.
Usage:
Transforms a given data file (usually in .XML format, e.g IIS failed request log file) into a human or browser readable file (e.g HTML, XLS, etc.).
Usage: xslt <input-file> [OPTIONS]
-i, --input
-t, --template full direct path to an XSL template file
-o, --output full direct path to a file (preferably that doesn't exist; else it will be overwritten)
You can control the template by either using one of the available flags or by setting an environment variable in your system.
Just set the environment variable XSLT_TEMPLATE_PATH on machine level to be the full path to the template file.
Example case:
xslt data.xml --output "C:\transformed.html"
xslt data.xml --input "C:\template.xslt" --output "C:\transformed.html"
xslt data.xml -i template.xsl -o transformed.xls
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.