-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_taskdef_ph-schematron.xml
35 lines (32 loc) · 1.15 KB
/
build_taskdef_ph-schematron.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Stefan Jung. All rights reserved.
See the accompanying LICENSE file for applicable license.
-->
<project>
<taskdef name="schematron"
classname="com.helger.schematron.ant.Schematron"
classpathref="dost.class.path"
/>
<taskdef name="schematron-preprocess"
classname="com.helger.schematron.ant.SchematronPreprocess"
classpathref="dost.class.path"
/>
<!-- JavaScript task to iterate over comma separated list of files -->
<scriptdef name="schematron-validate" language="javascript">
<attribute name="target"/>
<attribute name="files"/>
<![CDATA[
var sch = attributes.get("files").split(",");
sch.forEach(function(s) {
self.log("Schematron File: " + s);
var task = project.createTask("antcall");
task.setTarget(attributes.get("target"));
var param = task.createParam();
param.setName("schematron.files");
param.setValue(s);
task.perform();
});
]]>
</scriptdef>
</project>