This repository was archived by the owner on Aug 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathanthead.xml
40 lines (35 loc) · 1.57 KB
/
anthead.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
<?xml version="1.0" encoding="utf-8"?>
<project basedir="." default="dist" name="testtei">
<property name="saxon" value="lib/saxon9he.jar"/>
<property name="trang" value="lib/trang.jar"/>
<property name="jing" value="lib/jing.jar"/>
<property name="dir" value="."/>
<property name="xsl" value="../Stylesheets"/>
<path id="classpath">
<pathelement path="${java.class.path}"/>
</path>
<taskdef name="runjing" classpath="${jing}" classname="com.thaiopensource.relaxng.util.JingTask"/>
<taskdef name="schematron"
classname="com.schematron.ant.SchematronTask"
classpath="lib/ant-schematron-2010-04-14.jar"/>
<taskdef name="runjing" classpath="${jing}" classname="com.thaiopensource.relaxng.util.JingTask"/>
<macrodef name="dojob">
<attribute name="name"/>
<attribute name="file"/>
<sequential>
<echo level="info">Validate @{name} against TEI All</echo>
<runjing rngfile="tei_all.rng" file="@{name}"
failonerror="false"/>
<echo>Normalize file to fit TEI Simple</echo>
<xslt processor="trax" force="yes" style="${xsl}/simple/teitosimple.xsl" in="@{name}" out="@{file}">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
</xslt>
<echo level="info">Validate @{file} against teisimple.rng</echo>
<runjing rngfile="teisimple.rng" file="@{file}"
failonerror="false"/>
<echo>Validate against Schematron</echo>
<schematron file="@{file}" queryLanguageBinding="xslt2" schema="teisimple.isosch" failonerror="true"/>
<delete quiet="true" file="@{file}"/>
</sequential>
</macrodef>
<target name="dist">