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

<property name="website.dir" value="build"/>
<property name="dist.dir" value="build/dist"/>
<property name="jar.dir" value="build"/>
<property name="dtdinst.src" value="../dtdinst/src"/>
<property name="jing.src" value="../src"/>
<property name="build.dir" value="build"/>
<property name="jing.gen.src" value="${build.dir}/../src"/>
<property name="lib.dir" value="../lib"/>
<property name="jing.excludes"
          value="com/thaiopensource/relaxng/impl/**,
                 com/thaiopensource/relaxng/util/**,
                 com/thaiopensource/relaxng/jarv/**,
                 com/thaiopensource/relaxng/*.java,
                 com/thaiopensource/validate/**"/>

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

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

<target name="compile" depends="init">
  <mkdir dir="${build.dir}/classes"/>
  <javac srcdir="src:${dtdinst.src}:${jing.src}:${jing.gen.src}"
         destdir="${build.dir}/classes"
         classpath="${lib.dir}/xercesImpl.jar:${lib.dir}/regex.jar"
         excludes="${jing.excludes},com/thaiopensource/datatype/xsd/regex/jdk1_4/gen/*.java"
	 source="1.2"/>
</target>

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

  <jar jarfile="${jar.dir}/trang.jar" manifest="${build.dir}/trang-manifest.txt">
    <fileset dir="${build.dir}/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
    <fileset dir="${dtdinst.src}" includes="**/*.properties"/>
    <fileset dir="${jing.src}"
             includes="**/*.properties,
                       META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory,
                       META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"
             excludes="${jing.excludes}"/>
  </jar>
  <chmod perm="+x" file="${jar.dir}/trang.jar"/>
</target>

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

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

<target name="xsd-split" depends="init,check-xsd-split" unless="trang-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"/>
  <xslt basedir="test" destdir="${build.dir}/xsd-test" includes="toxsdtest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="${build.dir}/xsd-test"/>
  </xslt>
</target>

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

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

<target name="xsd-test" depends="jar,xsd-split">
  <java classname="com.thaiopensource.relaxng.translate.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="${jar.dir}/trang.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="test" depends="xsd-test,compact-test"/>

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

<target name="website" depends="validate">
  <copy todir="${website.dir}">
    <fileset dir="doc" includes="trang.html,trang-manual.html,convert-to-xsd-talk.html"/>
  </copy>
  <replace dir="${website.dir}" includes="trang.html,trang-manual.html" token="@VERSION@" value="${version}"/>
</target>

<target name="dist" depends="website,jar,test,xsd-test">
  <zip zipfile="${build.dir}/src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
    <fileset dir="${dtdinst.src}" includes="**/*.java,**/*.properties"/>
    <fileset dir="${jing.src}"
             includes="**/*.java,**/*.jj,**/*.properties,
                       META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory,
                       META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"
             excludes="${jing.excludes}"/>
    <fileset dir="${jing.gen.src}" includes="**/*.java"/>
    <zipfileset dir="${build.dir}" includes="trang-manifest.txt"
                fullpath="META-INF/MANIFEST.MF"/>
  </zip>
  <zip zipfile="${dist.dir}/trang-${version}.zip">
    <zipfileset dir="." includes="copying.txt" prefix="trang-${version}"/>
    <zipfileset dir="${website.dir}" includes="trang-manual.html" prefix="trang-${version}"/>
    <zipfileset dir="${jar.dir}" includes="trang.jar"  prefix="trang-${version}"/>
    <zipfileset dir="${build.dir}" includes="src.zip"  prefix="trang-${version}"/>
  </zip>
  <checksum file="${dist.dir}/trang-${version}.zip" fileext=".md5"/>
</target>

</project>
<commit_msg>Get rid of reference to regex.jar<commit_after><project name="trang" default="jar">

<property name="website.dir" value="build"/>
<property name="dist.dir" value="build/dist"/>
<property name="jar.dir" value="build"/>
<property name="dtdinst.src" value="../dtdinst/src"/>
<property name="jing.src" value="../src"/>
<property name="build.dir" value="build"/>
<property name="jing.gen.src" value="${build.dir}/../src"/>
<property name="lib.dir" value="../lib"/>
<property name="jing.excludes"
          value="com/thaiopensource/relaxng/impl/**,
                 com/thaiopensource/relaxng/util/**,
                 com/thaiopensource/relaxng/jarv/**,
                 com/thaiopensource/relaxng/*.java,
                 com/thaiopensource/validate/**"/>

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

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

<target name="compile" depends="init">
  <mkdir dir="${build.dir}/classes"/>
  <javac srcdir="src:${dtdinst.src}:${jing.src}:${jing.gen.src}"
         destdir="${build.dir}/classes"
         classpath="${lib.dir}/xercesImpl.jar"
         excludes="${jing.excludes},com/thaiopensource/datatype/xsd/regex/jdk1_4/gen/*.java"
	 source="1.2"/>
</target>

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

  <jar jarfile="${jar.dir}/trang.jar" manifest="${build.dir}/trang-manifest.txt">
    <fileset dir="${build.dir}/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
    <fileset dir="${dtdinst.src}" includes="**/*.properties"/>
    <fileset dir="${jing.src}"
             includes="**/*.properties,
                       META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory,
                       META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"
             excludes="${jing.excludes}"/>
  </jar>
  <chmod perm="+x" file="${jar.dir}/trang.jar"/>
</target>

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

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

<target name="xsd-split" depends="init,check-xsd-split" unless="trang-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"/>
  <xslt basedir="test" destdir="${build.dir}/xsd-test" includes="toxsdtest.xml" extension=".stamp" style="test/compactsplit.xsl">
    <param name="dir" expression="${build.dir}/xsd-test"/>
  </xslt>
</target>

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

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

<target name="xsd-test" depends="jar,xsd-split">
  <java classname="com.thaiopensource.relaxng.translate.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="${jar.dir}/trang.jar"/>
      <pathelement path="${java.class.path}"/>
    </classpath>
  </java>
</target>

<target name="test" depends="xsd-test,compact-test"/>

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

<target name="website" depends="validate">
  <copy todir="${website.dir}">
    <fileset dir="doc" includes="trang.html,trang-manual.html,convert-to-xsd-talk.html"/>
  </copy>
  <replace dir="${website.dir}" includes="trang.html,trang-manual.html" token="@VERSION@" value="${version}"/>
</target>

<target name="dist" depends="website,jar,test,xsd-test">
  <zip zipfile="${build.dir}/src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
    <fileset dir="${dtdinst.src}" includes="**/*.java,**/*.properties"/>
    <fileset dir="${jing.src}"
             includes="**/*.java,**/*.jj,**/*.properties,
                       META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory,
                       META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"
             excludes="${jing.excludes}"/>
    <fileset dir="${jing.gen.src}" includes="**/*.java"/>
    <zipfileset dir="${build.dir}" includes="trang-manifest.txt"
                fullpath="META-INF/MANIFEST.MF"/>
  </zip>
  <zip zipfile="${dist.dir}/trang-${version}.zip">
    <zipfileset dir="." includes="copying.txt" prefix="trang-${version}"/>
    <zipfileset dir="${website.dir}" includes="trang-manual.html" prefix="trang-${version}"/>
    <zipfileset dir="${jar.dir}" includes="trang.jar"  prefix="trang-${version}"/>
    <zipfileset dir="${build.dir}" includes="src.zip"  prefix="trang-${version}"/>
  </zip>
  <checksum file="${dist.dir}/trang-${version}.zip" fileext=".md5"/>
</target>

</project>

{'fraction_non_alphanumeric': 0.21868787276341947, 'fraction_numerical': 0.0011133200795228628, 'mean_word_length': 4.133061224489796, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 235, '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': '3691957', 'n_tokens_mistral': 4447, 'n_tokens_neox': 4200, 'n_words': 573}