<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="L0132" default="finalize">

<!--Pipeline for the lemma Probabilitas. started 3.03.26 CR
    DOCX2TEI
    -->    
    <property name="diff.dir" value="diff"/>
    <property name="log.dir" value="log"/>
    <property name="xml.dir" value="xml"/>
    <property name="docx.dir" value="docx"/>
    <property name="xsl.dir" value="xsl"/>
    <property name="xslt.log" value="${log.dir}/${ant.project.name}_xslt.log"/>
    <property name="xslt.processor" value="../../../lib/xsltproc/Saxon-HE-9.8.0-12.jar"/>
    <property name="xslt.class" value="net.sf.saxon.TransformerFactoryImpl"/>
        
    <property name="orig.file" value="../../orig/Probabilitas_L0132/Schuessler_Probabilitas_27-02-26.docx"/>
    <!--Copy original file to the docx folder as _000.docx / _v1-0.docx-->
    <target name="initialize">
        <echo>Initializing L0132.</echo>
        <mkdir dir="${xml.dir}"/>
        <mkdir dir="${log.dir}"/>
        <copy file="${orig.file}" tofile="${docx.dir}/L0132_000.docx"/> 
        <!--L0132_000.docx: copy of original Word document from author.-->        
    </target>
    <!--Manual work in Word: L0132_001.docx toc, titles 1-3, terms, citations without links.-->
    <target name="patch-000"> <!--depends="initialize"-->
        <copy file="${docx.dir}/L0132_000.docx" tofile="${docx.dir}/L0132_001.docx" patchfile="${diff.dir}/L0132_000.diff"/>
        <echo>Checkpoint: L0132_000.docx saved as L0132_001.docx. 
            Do not delete or regenerate L0132_001.docx, it was used for manual chages in Word.</echo>
    </target>
<!--Manual transformation DOCX2TEI
    
    In this pipeline:
    
    From SVN/trunk/teiedit/lemma-edit/build/L0132/docx/L0132_001.docx!/word/styles.xml run the transformation scenario DOCX TEI P5 
    Saved as L0132_001-TEI-P5.xml, and this as L0132_001.xml for manual changes   
-->
    <target name="patch-000a"> <!--depends="patch-000"-->
        <copy file="${docx.dir}/L0132_001.docx" tofile="${docx.dir}/L0132_001-TEI-P5.xml" patchfile="${diff.dir}/L0132_001.diff"/>
        <echo>DOCX2TEI Transformation.</echo>
    </target>
<!--Structural annotation and manual changes Fornicatio TEI-->        
    <target name="patch-001"> <!-- depends="patch-000" -->
        <echo>Structural annotation.</echo>
        <patch originalfile="${xml.dir}/L0132_001-TEI-P5.xml" destfile="${xml.dir}/L0132_001.xml" patchfile="${diff.dir}/L0132_002.diff"/>
    </target>
    <target name="xslt-001"> <!--depends="patch-001"-->
        <echo>Transformation TEI-P5 to SvSal-TEI.</echo>
        <record name="${xslt.log}" action="start" loglevel="verbose"/>
        <xslt force="true" in="${xml.dir}/L0132_001.xml" out="${xml.dir}/L0132_002.xml" style="${xsl.dir}/L0132_001.xsl" classpath="${xslt.processor}">
            <factory name="${xslt.class}"/>
        </xslt>
        <record name="${xslt.log}" action="stop"/>
    </target>
    <target name="xslt-002" depends="xslt-001">
        <echo>Annotate names, autors as author/persName and SvSal authors with gnd links.</echo>
        <record name="${xslt.log}" action="start" loglevel="verbose"/>
        <xslt force="true" in="${xml.dir}/L0132_002.xml" out="${xml.dir}/L0132_003.xml" style="${xsl.dir}/L0132_002.xsl" classpath="${xslt.processor}">
            <factory name="${xslt.class}"/>
        </xslt>
        <record name="${xslt.log}" action="stop"/>
        <!--<delete file="${xml.dir}/L0132_002.xml"/>-->
    </target>
    <target name="xslt-003" depends="xslt-002">
        <echo>Annotate date and biblScope in body//bibl.</echo>
        <record name="${xslt.log}" action="start" loglevel="verbose"/>
        <xslt force="true" in="${xml.dir}/L0132_003.xml" out="${xml.dir}/L0132_004.xml" style="${xsl.dir}/L0132_003.xsl" classpath="${xslt.processor}">
            <factory name="${xslt.class}"/>
        </xslt>
        <record name="${xslt.log}" action="stop"/>
        <!--<delete file="${xml.dir}/L0132_003.xml"/>-->
    </target>
    <target name="xslt-004" depends="xslt-003"> 
        <echo>Update div xml:id(s) and toc ref @targets.</echo>
        <record name="${xslt.log}" action="start" loglevel="verbose"/>
        <xslt force="true" in="${xml.dir}/L0132_004.xml" out="${xml.dir}/L0132_005.xml" style="${xsl.dir}/L0132_004.xsl" classpath="${xslt.processor}">
            <factory name="${xslt.class}"/>
        </xslt>
        <record name="${xslt.log}" action="stop"/>
        <!--<delete file="${xml.dir}/L0132_004.xml"/>-->
    </target>
    <target name="finalize" depends="xslt-004">
        <echo>Reached end of pipeline.</echo>
    </target>

</project>
<!--
CR 10.03.26

    * Saved L0132_005.xml as [SVN]/trunk/svsal-tei/lemmata/L0132.xml for online publication.
    * PDF-Version without DOI: [SVN]/trunk/teiedit/lemma-edit/build/L0132/pdf/L0132_005.pdf
-->