<commit_before><project name="jing" default="all" basedir=".">

<property name="sdkjava.dir" value="c:\Program Files\Microsoft SDK for Java 4.0"/>

<target name="all" depends="jar, exegen, test, validate"/>

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

<target name="compile" depends="init">

  <mkdir dir="build/classes"/>
  <javac srcdir="src" destdir="build/classes"/>

</target>

<target name="jar" depends="compile">

  <jar jarfile="build/jing.jar" manifest="src/META-INF/MANIFEST.MF">
    <fileset dir="build/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
    <fileset dir="src" includes="META-INF/services/*"/>
  </jar>

  <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
    <classpath>
      <pathelement location="build/jing.jar"/>
    </classpath>
  </taskdef>

</target>

<target name="exegen" depends="compile,check-exe,xp-files,sax-files"
        unless="exe-ok">
  <exec dir="." executable="${sdkjava.dir}\bin\jexegen" failonerror="yes">
    <arg value="/main:com.thaiopensource.relaxng.util.ExegenDriver"/>
    <arg value="/nologo"/>
    <arg value="/out:build\jing.exe"/>
    <arg value="/r"/>
    <arg value="/base:src"/>
    <arg value="*.properties"/>
    <arg value="META-INF\services\*"/>
    <arg value="/base:build\classes"/>
    <arg value="*.class"/>
    <arg value="/base:build\xp-files"/>
    <arg value="*.*"/>
    <arg value="/base:build\sax-files"/>
    <arg value="org\xml\sax\*.*"/>
  </exec>
</target>

<target name="check-exe">
  <uptodate property="exe-ok" targetfile="build/jing.exe">
    <srcfiles dir="build/classes" includes="**/*.class"/>
    <srcfiles dir="src" includes="**/*.properties"/>
  </uptodate>
</target>

<target name="xp-files" depends="check-xp-files" unless="xp-files-ok">
  <mkdir dir="build/xp-files"/>
  <unzip src="lib/xp.jar" dest="build/xp-files"/>
  <delete dir="build/xp-files/META-INF"/>
</target>

<target name="sax-files" depends="check-sax-files" unless="sax-files-ok">
  <mkdir dir="build/sax-files"/>
  <unzip src="lib/sax.jar" dest="build/sax-files"/>
</target>

<target name="check-xp-files">
  <available property="xp-files-ok"
             file="build/xp-files/com/jclark/xml/sax/Driver.class"/>
</target>

<target name="check-sax-files">
  <available property="sax-files-ok"
             file="build/sax-files/org/xml/sax/Parser.class"/>
</target>

<target name="validate" depends="jar">
  <jing rngfile="xhtml/xhtml-basic.rng">
    <fileset dir="doc" includes="**/*.html"/>
    <fileset dir="datatype-sample" includes="index.html"/>
    <fileset dir="test" includes="index.html"/>
  </jing>
  <jing rngfile="eg/relaxng.rng">
    <fileset dir="eg" includes="*.rng"/>
    <fileset dir="xhtml" includes="**/*.rng"/>
  </jing>
  <jing rngfile="eg/xslt.rng">
     <fileset dir="convert" includes="*.xsl"/>
  </jing>
</target>

<target name="split" depends="init, check-split" unless="split-not-required">
  <jing rngfile="eg/testSuite.rng">
    <fileset dir="test" includes="spectest.xml"/>
  </jing>
  <delete dir="build/test"/>
  <mkdir dir="build/test"/>
  <style basedir="test" destdir="build/test" includes="spectest.xml" extension=".stamp" style="test/split.xsl">
    <param name="dir" expression="build/test"/>
  </style>
</target>

<target name="check-split">
  <uptodate property="split-not-required" targetfile="build/test/spectest.stamp">
    <srcfiles dir="test" includes="spectest.xml"/>
  </uptodate>
</target>

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

<target name="javadoc" depends="init">
  <mkdir dir="build/api"/>
  <mkdir dir="build/api/datatype"/>
  <javadoc sourcepath="src" destdir="build/api/datatype"
    doctitle="RELAX NG Datatype API" windowtitle="RELAX NG Datatype API"
    packagenames="org.relaxng.datatype,org.relaxng.datatype.helpers"/>
  <mkdir dir="build/api/relaxng"/>
  <javadoc sourcepath="src" destdir="build/api/relaxng"
    doctitle="Jing API" windowtitle="Jing API"
    packagenames="com.thaiopensource.relaxng,com.thaiopensource.relaxng.util">
    <link offline="true" href="../datatype" packagelistLoc="build/api/datatype"/>
    <link offline="true" href="http://www.saxproject.org/apidoc" packagelistLoc="extapidoc/sax"/>
    <link offline="true" href="http://java.sun.com/products/jdk/1.3/docs/api" packagelistLoc="extapidoc/jdk/1.3"/>
    <link offline="true" href="http://java.sun.com/xml/jaxp/dist/1.1/docs/api" packagelistLoc="extapidoc/jaxp/1.1"/>
  </javadoc>
</target>

<target name="doccheck" depends="init">
  <mkdir dir="build/doccheck"/>
  <javadoc sourcepath="src"
           destdir="build/doccheck"
           packagenames="com.thaiopensource.relaxng,com.thaiopensource.relaxng.util"
           doclet="com.sun.tools.doclets.doccheck.DocCheck"
           docletpath="lib/doccheck.jar"/>
</target>

<target name="datatype-sample" depends="jar">
  <ant dir="datatype-sample">
    <property name="build.dir" value="../build/datatype-sample"/>
    <property name="jing.jar" value="../build/jing.jar"/>
  </ant>
</target>

<target name="dist" depends="jar, exegen, validate, test, javadoc, datatype-sample">
  <zip zipfile="build/jing-src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
  </zip>
  <zip zipfile="build/xhtml-rng.zip">
    <fileset dir="." includes="xhtml/**/*.rng,xhtml/index.html"/>
  </zip>
  <copy todir="build">
    <fileset dir="." includes="copying.txt"/>
    <fileset dir="doc" includes="*.html"/>
    <fileset dir="convert" includes="from-relax.xsl,simplify.xsl"/>
    <fileset dir="eg" includes="relaxng.rng,xslt.rng,relaxCore.rng,relaxCoreDatatypes.rng"/>
  </copy>
  <replace file="build/jing.html" token="@VERSION@" value="${version}"/>
  <unzip src="build/xhtml-rng.zip" dest="build"/>
  <copy file="build/xhtml-rng.zip" todir="build/xhtml"/>
  <zip zipfile="build/datatype-sample.zip">
    <fileset dir="datatype-sample"/>
    <fileset dir="build/api/datatype" includes="**" prefix="api"/>
    <fileset dir="build/datatype-sample" includes="datatype-sample.jar"/>
  </zip>
  <zip zipfile="build/testSuite.zip">
    <fileset dir="test"/>
    <fileset dir="eg" includes="testSuite.rng"/>
  </zip>
  <tar tarfile="build/relaxng.tar" basedir="build"<commit_msg>Add target to build derivative.html.<commit_after><project name="jing" default="all" basedir=".">

<property name="sdkjava.dir" value="c:\Program Files\Microsoft SDK for Java 4.0"/>

<target name="all" depends="jar, exegen, test, validate"/>

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

<target name="compile" depends="init">

  <mkdir dir="build/classes"/>
  <javac srcdir="src" destdir="build/classes"/>

</target>

<target name="jar" depends="compile">

  <jar jarfile="build/jing.jar" manifest="src/META-INF/MANIFEST.MF">
    <fileset dir="build/classes"/>
    <fileset dir="src" includes="**/*.properties"/>
    <fileset dir="src" includes="META-INF/services/*"/>
  </jar>

  <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
    <classpath>
      <pathelement location="build/jing.jar"/>
    </classpath>
  </taskdef>

</target>

<target name="exegen" depends="compile,check-exe,xp-files,sax-files"
        unless="exe-ok">
  <exec dir="." executable="${sdkjava.dir}\bin\jexegen" failonerror="yes">
    <arg value="/main:com.thaiopensource.relaxng.util.ExegenDriver"/>
    <arg value="/nologo"/>
    <arg value="/out:build\jing.exe"/>
    <arg value="/r"/>
    <arg value="/base:src"/>
    <arg value="*.properties"/>
    <arg value="META-INF\services\*"/>
    <arg value="/base:build\classes"/>
    <arg value="*.class"/>
    <arg value="/base:build\xp-files"/>
    <arg value="*.*"/>
    <arg value="/base:build\sax-files"/>
    <arg value="org\xml\sax\*.*"/>
  </exec>
</target>

<target name="check-exe">
  <uptodate property="exe-ok" targetfile="build/jing.exe">
    <srcfiles dir="build/classes" includes="**/*.class"/>
    <srcfiles dir="src" includes="**/*.properties"/>
  </uptodate>
</target>

<target name="xp-files" depends="check-xp-files" unless="xp-files-ok">
  <mkdir dir="build/xp-files"/>
  <unzip src="lib/xp.jar" dest="build/xp-files"/>
  <delete dir="build/xp-files/META-INF"/>
</target>

<target name="sax-files" depends="check-sax-files" unless="sax-files-ok">
  <mkdir dir="build/sax-files"/>
  <unzip src="lib/sax.jar" dest="build/sax-files"/>
</target>

<target name="check-xp-files">
  <available property="xp-files-ok"
             file="build/xp-files/com/jclark/xml/sax/Driver.class"/>
</target>

<target name="check-sax-files">
  <available property="sax-files-ok"
             file="build/sax-files/org/xml/sax/Parser.class"/>
</target>

<target name="validate" depends="jar">
  <jing rngfile="xhtml/xhtml-basic.rng">
    <fileset dir="doc" includes="**/*.html"/>
    <fileset dir="datatype-sample" includes="index.html"/>
    <fileset dir="test" includes="index.html"/>
  </jing>
  <jing rngfile="eg/relaxng.rng">
    <fileset dir="eg" includes="*.rng"/>
    <fileset dir="xhtml" includes="**/*.rng"/>
  </jing>
  <jing rngfile="eg/xslt.rng">
     <fileset dir="convert" includes="*.xsl"/>
  </jing>
</target>

<target name="split" depends="init, check-split" unless="split-not-required">
  <jing rngfile="eg/testSuite.rng">
    <fileset dir="test" includes="spectest.xml"/>
  </jing>
  <delete dir="build/test"/>
  <mkdir dir="build/test"/>
  <style basedir="test" destdir="build/test" includes="spectest.xml" extension=".stamp" style="test/split.xsl">
    <param name="dir" expression="build/test"/>
  </style>
</target>

<target name="check-split">
  <uptodate property="split-not-required" targetfile="build/test/spectest.stamp">
    <srcfiles dir="test" includes="spectest.xml"/>
  </uptodate>
</target>

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

<target name="javadoc" depends="init">
  <mkdir dir="build/api"/>
  <mkdir dir="build/api/datatype"/>
  <javadoc sourcepath="src" destdir="build/api/datatype"
    doctitle="RELAX NG Datatype API" windowtitle="RELAX NG Datatype API"
    packagenames="org.relaxng.datatype,org.relaxng.datatype.helpers"/>
  <mkdir dir="build/api/relaxng"/>
  <javadoc sourcepath="src" destdir="build/api/relaxng"
    doctitle="Jing API" windowtitle="Jing API"
    packagenames="com.thaiopensource.relaxng,com.thaiopensource.relaxng.util">
    <link offline="true" href="../datatype" packagelistLoc="build/api/datatype"/>
    <link offline="true" href="http://www.saxproject.org/apidoc" packagelistLoc="extapidoc/sax"/>
    <link offline="true" href="http://java.sun.com/products/jdk/1.3/docs/api" packagelistLoc="extapidoc/jdk/1.3"/>
    <link offline="true" href="http://java.sun.com/xml/jaxp/dist/1.1/docs/api" packagelistLoc="extapidoc/jaxp/1.1"/>
  </javadoc>
</target>

<target name="doccheck" depends="init">
  <mkdir dir="build/doccheck"/>
  <javadoc sourcepath="src"
           destdir="build/doccheck"
           packagenames="com.thaiopensource.relaxng,com.thaiopensource.relaxng.util"
           doclet="com.sun.tools.doclets.doccheck.DocCheck"
           docletpath="lib/doccheck.jar"/>
</target>

<target name="datatype-sample" depends="jar">
  <ant dir="datatype-sample">
    <property name="build.dir" value="../build/datatype-sample"/>
    <property name="jing.jar" value="../build/jing.jar"/>
  </ant>
</target>

<target name="doc">
  <style basedir="doc" destdir="build" includes="derivative.xml"
         style="doc/derivative.xsl"/>
</target>

<target name="dist" depends="jar, exegen, validate, test, javadoc, datatype-sample, doc">
  <zip zipfile="build/jing-src.zip">
    <fileset dir="src" includes="**/*.java,**/*.properties"/>
  </zip>
  <zip zipfile="build/xhtml-rng.zip">
    <fileset dir="." includes="xhtml/**/*.rng,xhtml/index.html"/>
  </zip>
  <copy todir="build">
    <fileset dir="." includes="copying.txt"/>
    <fileset dir="doc" includes="*.html"/>
    <fileset dir="convert" includes="from-relax.xsl,simplify.xsl"/>
    <fileset dir="eg" includes="relaxng.rng,xslt.rng,relaxCore.rng,relaxCoreDatatypes.rng"/>
  </copy>
  <replace file="build/jing.html" token="@VERSION@" value="${version}"/>
  <unzip src="build/xhtml-rng.zip" dest="build"/>
  <copy file="build/xhtml-rng.zip" todir="build/xhtml"/>
  <zip zipfile="build/datatype-sample.zip">
    <fileset dir="datatype-sample"/>
    <fileset dir="build/api/datatype" includes="**" prefix="api"/>
    <fileset dir="build/datatype-sample" includes="datatype-sample.jar"/>
  </zip>
  <zip zipfile="build/testSuite.zip">
    <fileset dir="test"/>
    <fileset dir="eg" includes="testSuite.rng"/>
  </zip>
  <tar tarfile="build/relaxng.tar" basedir="build"
{'fraction_non_alphanumeric': 0.21082257580306216, 'fraction_numerical': 0.0015010507355148605, 'mean_word_length': 4.294000794596742, 'pattern_counts': {'":': 0, '<': 302, '<?xml version=': 0, '>': 300, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 15}, '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': '6973126', 'n_tokens_mistral': 4912, 'n_tokens_neox': 4740, 'n_words': 746}