Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then install ant using brew
brew install ant
Go into xrechnung-visualization repo and run ant (may take a few minutes)
cd xrechnung-visualization
ant
The ant scripts will download all tools required to execute the transformations
Once download, you'll find a lot of files in the newly created /build
folder.
We're using SAXON, a open-source XSLT processor (saxon9he.jar
) which was downloaded by the ant script. It uses the xsl style sheets in the repository to style the XML files.
You can run java -jar lib/saxon9he.jar
to get more informations how it works
First we have to convert the XML first into the intermediate .xr
format.
java -jar lib/saxon9he.jar -s:path/to/Rechnung.xml -xsl:src/xsl/ubl-invoice-xr.xsl -o:out/Rechnung.xr
Generate HTML
java -jar lib/saxon9he.jar -s:out/Rechnung.xr -xsl:src/xsl/xrechnung-html.xsl -o:out/Rechnung.html
Generate PDF
java -jar lib/saxon9he.jar -s:out/Rechnung.xr -xsl:src/xsl/xr-pdf.xsl -o:out/Rechnung.pdf
Did not work anymore. Creation of PDF did not work. PDF file is corrupted. Anyway HTML file creation worked.