Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (35 sloc) 1.57 KB
<?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">