Xsl.Transformer 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Xsl.Transformer --version 1.0.1                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Xsl.Transformer --version 1.0.1                
This package contains a .NET tool you can call from the shell/command line.
#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.g C:\Windows\System32\freb.xsl).
  • Install the tool as per:
  1. Open command line in the Xsl.Transformer directory
  2. Run dotnet pack
  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
3.0.0 120 9/30/2024
2.0.0 106 9/28/2024
1.0.1 345 6/25/2022