https://doi.org/10.5281/zenodo.3378949
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="WeGA-ODD" default="all">
<!-- import default properties from file -->
<property file="local.build.properties"/>
<property file="build.properties"/>
<condition property="lang" value="${lang}" else="de">
<isset property="lang"/>
</condition>
<target name="tei" depends="biblio,diaries,documents,letters,news,orgs,persons,places,sourcesTEI,thematicCommentaries,var,wega_all,writings"/>
<target name="mei" depends="works"/>
<target name="all" depends="tei,mei"/>
<target name="init">
<mkdir dir="${compiledODD.dir}"/>
</target>
<target name="clean">
<delete>
<fileset dir="schema/en">
<include name="*.isosch"/>
</fileset>
</delete>
</target>
<target name="biblio" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaBiblio.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaBiblio.isosch"/>
<param name="selectedSchema" value="wegaBiblio"/>
</antcall>
</target>
<target name="diaries" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaDiaries.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaDiaries.isosch"/>
<param name="selectedSchema" value="wegaDiaries"/>
</antcall>
</target>
<target name="documents" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaDocuments.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaDocuments.isosch"/>
<param name="selectedSchema" value="wegaDocuments"/>
</antcall>
</target>
<target name="letters" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaLetters.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaLetters.isosch"/>
<param name="selectedSchema" value="wegaLetters"/>
</antcall>
</target>
<target name="news" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaNews.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaNews.isosch"/>
<param name="selectedSchema" value="wegaNews"/>
</antcall>
</target>
<target name="orgs" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaOrgs.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaOrgs.isosch"/>
<param name="selectedSchema" value="wegaOrgs"/>
</antcall>
</target>
<target name="persons" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaPersons.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaPersons.isosch"/>
<param name="selectedSchema" value="wegaPersons"/>
</antcall>
</target>
<target name="places" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaPlaces.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaPlaces.isosch"/>
<param name="selectedSchema" value="wegaPlaces"/>
</antcall>
</target>
<target name="sourcesTEI" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaSourcesTEI.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaSourcesTEI.isosch"/>
<param name="selectedSchema" value="wegaSourcesTEI"/>
</antcall>
</target>
<target name="thematicCommentaries" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaThematicCommentaries.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaThematicCommentaries.isosch"/>
<param name="selectedSchema" value="wegaThematicCommentaries"/>
</antcall>
</target>
<target name="var" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaVar.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaVar.isosch"/>
<param name="selectedSchema" value="wegaVar"/>
</antcall>
</target>
<target name="wega_all" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wega_all.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wega_all.isosch"/>
<param name="selectedSchema" value="wega_all"/>
</antcall>
</target>
<target name="works" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaWorks.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaWorks.isosch"/>
<param name="selectedSchema" value="wegaWorks"/>
<param name="source" value="${mei.source}"/>
</antcall>
</target>
<target name="writings" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/Guidelines/guidelines-de.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaWritings.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaWritings.isosch"/>
<param name="selectedSchema" value="wegaWritings"/>
</antcall>
</target>
<target name="process">
<basename property="inputFile.basename" file="${inputFile}" suffix=".xml"/>
<!-- TEI is considered default source -->
<condition property="source" value="${source}" else="${tei.source}">
<isset property="source"/>
</condition>
<sequential>
<echo>Expanding ODD file</echo>
<xslt force="yes" style="${stylesheets.dir}/odds/odd2odd.xsl"
in="${inputFile}" out="${compiledODD.dir}/${inputFile.basename}-${selectedSchema}.compiled.xml">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="lang" expression="${lang}" if="lang"/>
<param name="defaultSource" expression="${source}"/>
<param name="selectedSchema" expression="${selectedSchema}"/>
</xslt>
<echo>Creating RelaxNG schema</echo>
<xslt force="yes" style="${stylesheets.dir}/profiles/default/rng/to.xsl"
in="${compiledODD.dir}/${inputFile.basename}-${selectedSchema}.compiled.xml" out="${outputFileRNG}">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="inputDir" expression="${basedir}/"/>
<!-- supply name of language-->
<param name="lang" expression="${lang}" if="lang"/>
<param name="doclang" expression="${lang}" if="lang"/>
<param name="documentationLanguage" expression="${lang}" if="lang"/>
<!-- emit some diagnostics"-->
<param name="debug" expression="${debug}" if="debug"/>
<!-- be verbose-->
<param name="verbose" expression="${verbose}" if="verbose"/>
</xslt>
<echo>Extracting Schematron rules</echo>
<xslt processor="trax" force="yes"
style="${stylesheets.dir}/profiles/default/schematron/to.xsl"
in="${compiledODD.dir}/${inputFile.basename}-${selectedSchema}.compiled.xml" out="${outputFileSchematron}">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<!--
the param lang needs to be a fixed value 'en' (since recently?),
since there are no constraints in other languages
-->
<param name="lang" expression="en"/>
</xslt>
</sequential>
</target>
</project>