<commit_before><project name="trang" default="jar" basedir=".">

<property name="build.dir" value="build"/>
<property name="jing.classes" value="../build/classes"/>
<property name="dist.dir" value="build"/>

<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
  <classpath>
    <pathelement location="${dist.dir}/jing.jar"/>
  </classpath>
</taskdef>

<target name="init">
  <mkdir dir="${build.dir}"/>
  <property file="src/com/thaiopensource/relaxng/output/resources/Version.properties"/>
</target>

<target name="compile" depends="init">
  <mkdir dir="${build.dir}/classes"/>
  <javac srcdir="src" destdir="${build.dir}/classes"
         classpath="${jing.classes}"/>
</target>

<target name="jar" depends="compile">
  <echo file="${build.dir}/trang-manifest.txt">Manifest-Version: 1.0
Main-Class: com/thaiopensource/relaxng/output/Driver
Class-Path: jing.jar
</echo>

  <jar jarfile="${dist.dir}/trang.jar" manifest="${build.dir}/trang-manifest.txt">
    <fileset dir="${build.dir}/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
  </jar>
</target>

<target name="split" depends="init,check-split" unless="split-not-required">
  <jing rngfile="test/compacttest.rnc" compactsyntax="yes">
    <fileset dir="test" includes="compacttest.xml"/>
  </jing>
  <delete dir="${build.dir}/test"/>
  <mkdir dir="${build.dir}/test"/>
  <style basedir="test" destdir="${build.dir}/test" includes="compacttest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="trang/${build.dir}/test"/>
  </style>
</target>

<target name="check-split">
  <uptodate property="split-not-required" targetfile="${build.dir}/test/compacttest.stamp">
    <srcfiles dir="test" includes="compacttest.xml,compactsplit.xsl"/>
  </uptodate>
</target>

<target name="xsd-split" depends="init,check-xsd-split" unless="xsd-split-not-required">
  <jing rngfile="test/toxsdtest.rnc" compactsyntax="yes">
    <fileset dir="test" includes="toxsdtest.xml"/>
  </jing>
  <delete dir="${build.dir}/xsd-test"/>
  <mkdir dir="${build.dir}/xsd-test"/>
  <style basedir="test" destdir="${build.dir}/xsd-test" includes="toxsdtest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="trang/${build.dir}/xsd-test"/>
  </style>
</target>

<target name="check-xsd-split">
  <uptodate property="xsd-split-not-required" targetfile="${build.dir}/xsd-test/toxsdtest.stamp">
    <srcfiles dir="test" includes="toxsdtest.xml,compactsplit.xsl"/>
  </uptodate>
</target>

<target name="test" depends="jar,split">
  <java classname="com.thaiopensource.relaxng.output.test.CompactTestDriver" fork="yes" failonerror="yes">
    <arg value="${build.dir}/test/out.log"/>
    <arg value="${build.dir}/test"/>
    <arg value="xml"/>
    <classpath>
      <pathelement location="${dist.dir}/trang.jar"/>
      <pathelement location="${dist.dir}/jing.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="xsd-test" depends="jar,xsd-split">
  <java classname="com.thaiopensource.relaxng.output.test.CompactTestDriver" fork="yes" failonerror="yes">
    <arg value="${build.dir}/xsd-test/out.log"/>
    <arg value="${build.dir}/xsd-test"/>
    <arg value="xsd"/>
    <classpath>
      <pathelement location="${dist.dir}/trang.jar"/>
      <pathelement location="${dist.dir}/jing.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="validate" depends="jar">
  <jing rngfile="../xhtml/xhtml.rng">
    <fileset dir="doc" includes="*.html"/>
  </jing>
</target>

<target name="dist" depends="jar,validate,test">
  <zip zipfile="${dist.dir}/trang-src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
    <zipfileset dir="${build.dir}" includes="trang-manifest.txt"
       fullpath="META-INF/MANIFEST.MF"/>
  </zip>
  <mkdir dir="${build.dir}/doc"/>
  <copy todir="${build.dir}/doc">
    <fileset dir="doc" includes="readme.html"/>
  </copy>
  <replace file="${build.dir}/doc/readme.html" token="@VERSION@" value="${version}"/>
  <zip zipfile="${dist.dir}/trang-bin.zip">
    <fileset dir="${build.dir}/doc" includes="readme.html"/>
    <fileset dir="." includes="copying.txt"/>
    <fileset dir="${dist.dir}" includes="trang.jar,jing.jar"/>
  </zip>
  <copy todir="${dist.dir}">
    <fileset dir="doc" includes="trang.html,convert-to-xsd-talk.html"/>
  </copy><commit_msg>Make dist depend on xsd-test.<commit_after><project name="trang" default="jar" basedir=".">

<property name="build.dir" value="build"/>
<property name="jing.classes" value="../build/classes"/>
<property name="dist.dir" value="build"/>

<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
  <classpath>
    <pathelement location="${dist.dir}/jing.jar"/>
  </classpath>
</taskdef>

<target name="init">
  <mkdir dir="${build.dir}"/>
  <property file="src/com/thaiopensource/relaxng/output/resources/Version.properties"/>
</target>

<target name="compile" depends="init">
  <mkdir dir="${build.dir}/classes"/>
  <javac srcdir="src" destdir="${build.dir}/classes"
         classpath="${jing.classes}"/>
</target>

<target name="jar" depends="compile">
  <echo file="${build.dir}/trang-manifest.txt">Manifest-Version: 1.0
Main-Class: com/thaiopensource/relaxng/output/Driver
Class-Path: jing.jar
</echo>

  <jar jarfile="${dist.dir}/trang.jar" manifest="${build.dir}/trang-manifest.txt">
    <fileset dir="${build.dir}/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
  </jar>
</target>

<target name="split" depends="init,check-split" unless="split-not-required">
  <jing rngfile="test/compacttest.rnc" compactsyntax="yes">
    <fileset dir="test" includes="compacttest.xml"/>
  </jing>
  <delete dir="${build.dir}/test"/>
  <mkdir dir="${build.dir}/test"/>
  <style basedir="test" destdir="${build.dir}/test" includes="compacttest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="trang/${build.dir}/test"/>
  </style>
</target>

<target name="check-split">
  <uptodate property="split-not-required" targetfile="${build.dir}/test/compacttest.stamp">
    <srcfiles dir="test" includes="compacttest.xml,compactsplit.xsl"/>
  </uptodate>
</target>

<target name="xsd-split" depends="init,check-xsd-split" unless="xsd-split-not-required">
  <jing rngfile="test/toxsdtest.rnc" compactsyntax="yes">
    <fileset dir="test" includes="toxsdtest.xml"/>
  </jing>
  <delete dir="${build.dir}/xsd-test"/>
  <mkdir dir="${build.dir}/xsd-test"/>
  <style basedir="test" destdir="${build.dir}/xsd-test" includes="toxsdtest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="trang/${build.dir}/xsd-test"/>
  </style>
</target>

<target name="check-xsd-split">
  <uptodate property="xsd-split-not-required" targetfile="${build.dir}/xsd-test/toxsdtest.stamp">
    <srcfiles dir="test" includes="toxsdtest.xml,compactsplit.xsl"/>
  </uptodate>
</target>

<target name="test" depends="jar,split">
  <java classname="com.thaiopensource.relaxng.output.test.CompactTestDriver" fork="yes" failonerror="yes">
    <arg value="${build.dir}/test/out.log"/>
    <arg value="${build.dir}/test"/>
    <arg value="xml"/>
    <classpath>
      <pathelement location="${dist.dir}/trang.jar"/>
      <pathelement location="${dist.dir}/jing.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="xsd-test" depends="jar,xsd-split">
  <java classname="com.thaiopensource.relaxng.output.test.CompactTestDriver" fork="yes" failonerror="yes">
    <arg value="${build.dir}/xsd-test/out.log"/>
    <arg value="${build.dir}/xsd-test"/>
    <arg value="xsd"/>
    <classpath>
      <pathelement location="${dist.dir}/trang.jar"/>
      <pathelement location="${dist.dir}/jing.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="validate" depends="jar">
  <jing rngfile="../xhtml/xhtml.rng">
    <fileset dir="doc" includes="*.html"/>
  </jing>
</target>

<target name="dist" depends="jar,validate,test,xsd-test">
  <zip zipfile="${dist.dir}/trang-src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
    <zipfileset dir="${build.dir}" includes="trang-manifest.txt"
       fullpath="META-INF/MANIFEST.MF"/>
  </zip>
  <mkdir dir="${build.dir}/doc"/>
  <copy todir="${build.dir}/doc">
    <fileset dir="doc" includes="readme.html"/>
  </copy>
  <replace file="${build.dir}/doc/readme.html" token="@VERSION@" value="${version}"/>
  <zip zipfile="${dist.dir}/trang-bin.zip">
    <fileset dir="${build.dir}/doc" includes="readme.html"/>
    <fileset dir="." includes="copying.txt"/>
    <fileset dir="${dist.dir}" includes="trang.jar,jing.jar"/>
  </zip>
  <copy todir="${dist.dir}">
    <fileset dir="doc" includes="trang.html,convert-to-xsd-talk.html"/>
  </copy>
{'fraction_non_alphanumeric': 0.22507603920243324, 'fraction_numerical': 0.0004506026810859525, 'mean_word_length': 4.78748370273794, 'pattern_counts': {'":': 0, '<': 207, '<?xml version=': 0, '>': 207, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1017548', 'n_tokens_mistral': 3168, 'n_tokens_neox': 3056, 'n_words': 463}