-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-instrument.xml
85 lines (80 loc) · 3.13 KB
/
run-instrument.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!--ant-->
<!--
This file is part of the Spelling and Grammar Checker project.
See the accompanying LICENSE file for applicable licenses.
-->
<project default="run-instrument" name="fox.jason.unit-test.xslt">
<!--
Ant target to allow direct invocation of the valiadator transforms, this means we can use an alternative classpath.
-->
<target name="run-instrument">
<xmlcatalog id="dita.catalog">
<catalogpath path="${dita.plugin.org.dita.base.dir}/catalog-dita.xml"/>
</xmlcatalog>
<!-- Instrument ANT files first -->
<xslt
classpath="${fox.jason.unit-test.dir}/lib/saxon-9.1.0.8.jar"
destdir="${dita.temp.dir}/coverage"
extension=".xml"
style="${test.instrument.xsl.dir}/ant-instrument-list.xsl"
basedir="${args.input}"
includes="build_*.xml"
excludes="build_*_template.xml"
>
<xmlcatalog refid="dita.catalog"/>
<factory name="net.sf.saxon.TransformerFactoryImpl">
<!--
Setting several options of Saxon XSLT engine to enable some additional functionality,
see for more details:
http://www.saxonica.com/html/documentation/configuration/config-features.html
-->
<attribute
name="http://saxon.sf.net/feature/allow-external-functions"
value="true"
/>
<!-- Enable keeping track of line numbers whilst transforming -->
<attribute name="http://saxon.sf.net/feature/linenumbering" value="true"/>
<attribute
name="http://saxon.sf.net/feature/sourceParserClass"
value="org.apache.xml.resolver.tools.ResolvingXMLReader"
/>
<!-- Enable DTD validation whilst transforming -->
<attribute name="http://saxon.sf.net/feature/validation" value="false"/>
</factory>
<param expression="${dita.dir}/plugins/${test.coverage.source}" name="SOURCE"/>
</xslt>
<!-- Instrument XSL files thereafter -->
<xslt
classpath="${fox.jason.unit-test.dir}/lib/saxon-9.1.0.8.jar"
destdir="${dita.temp.dir}/coverage"
extension=".xsl"
style="${test.instrument.xsl.dir}/xsl-instrument-list.xsl"
basedir="${args.input}"
includes="**/*.xsl"
excludes="**/*_template.xsl"
>
<xmlcatalog refid="dita.catalog"/>
<factory name="net.sf.saxon.TransformerFactoryImpl">
<!--
Setting several options of Saxon XSLT engine to enable some additional functionality,
see for more details:
http://www.saxonica.com/html/documentation/configuration/config-features.html
-->
<attribute
name="http://saxon.sf.net/feature/allow-external-functions"
value="true"
/>
<!-- Enable keeping track of line numbers whilst transforming -->
<attribute name="http://saxon.sf.net/feature/linenumbering" value="true"/>
<attribute
name="http://saxon.sf.net/feature/sourceParserClass"
value="org.apache.xml.resolver.tools.ResolvingXMLReader"
/>
<!-- Enable DTD validation whilst transforming -->
<attribute name="http://saxon.sf.net/feature/validation" value="false"/>
</factory>
<param expression="${dita.dir}/plugins/${test.coverage.source}" name="SOURCE"/>
</xslt>
</target>
</project>