How to execute XSLT 2.0 with ant?

前端 未结 6 1116
醉话见心
醉话见心 2020-12-01 11:38

I\'m trying to run an XSLT transformation from an ant file.

I\'m using a XSLT 2.0 stylesheet with a saxon 9 parser (supporting XSLT 2.0).

The problem is that

6条回答
  •  悲哀的现实
    2020-12-01 12:08

    At least in ant 1.8.0, the xslt task with a specified classpath is very slow. The problem seems to be classpath loading. I ran ant under JDB and it spent all of the extra time in org.apache.tools.ant.AntClassLoader.loadClass reading zip files.

    I tried this before running ant it it went a lot faster:

    ant -lib /path/to/saxon/saxon9.jar

    The macrodef from Tom Howard works better, and although it has an odd syntax for XSLT params, at least it's possible.

提交回复
热议问题