Saxon provides a profile through a two part process:
- Run Saxon with the -TP switch, writing the error output to a file
java -jar saxon9.jar -TJ xslspec.xml fo-context-dump.xsl dump-info=dump-info.xml 2> profile.xml
- Run the timing-profile.xsl stylesheet from the saxon-resources.zip file (available from http://www.saxonica.com/) to create a HTML report:
java -jar saxon9.jar profile.xml timing-profile.xsl > profile.html
Figure 1 shows a screenshot of the report generated from running the same stylesheet as in the xsltproc example. Notice the first two “hotspots” are the same as for xsltproc, but after that the result start to diverge.
Saxon profile report. Figure 1 – Saxon profile report (click on figure to view full-size)