Transforming XML files with XSLT 2.0 and Saxon-HE on OS X, using an XML catalog


Saxon-HE - put saxon9he.jar in /Library/Java/Extensions.

Apache XML Commons Resolver (download) - put resolver.jar in /Library/Java/Extensions.

java \
-Dxml.catalog.files=/etc/xml/catalog \
net.sf.saxon.Transform \
-x \
-y \
-r \
-o $OUTPUT_FILE.xml \

Saxon-HE is a noncommercial version of the Saxon XSLT processor. The main (perhaps only) reason for using it instead of libxslt/xsltproc is that it implements XSLT 2.0.