| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project basedir="." name="PROCES_TO_DITA" default="PROCES_TO_DITA_build">
- <!-- Przykładowe wyzwolenie z bash :
- cat input.xml | /Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/ant -buildfile ild__IN7_DZIENNIK_KORESP.xml
- na output mamy pdf'a
- -->
-
- <property name="INPUT" value="main.dita"/> <!-- Test_z_getfeature_do_parse.xml todo cos co otrzymamy z API do parsowania -->
- <!--<property name="main.dita" value="main.dita"/>-->
- <property name="parse_dita_templ.xsl" value="parse_dita_templ.xsl"/> <!-- do wykorzystania do przeparsowania pliku main.dita-->
- <property name="PROCES_INCLUDE.xsl" value="PROCES_INCLUDE.xsl" /> <!-- parser main.dita - potem pewnie przeparsowanego pliku -->
- <!--<tempfile property="tmp.xml" destdir="temp" deleteonexit="yes"/>-->
- <!--<tempfile property="Test_z_getfeature_do_parse__noxml.xml" destdir="temp" deleteonexit="yes"/>-->
- <!--<tempfile property="main__noxml.dita" destdir="temp" deleteonexit="yes"/>-->
- <!--<tempfile property="Test_z_getfeature_do_parse__noxml.xml" destdir="temp" deleteonexit="yes"/>-->
- <!--<tempfile property="main__noxml.dita" destdir="temp" deleteonexit="yes"/>-->
- <tempfile property="out.dita" deleteonexit="no" /> <!-- do wygenerowania dita do zrobienia z niego PDF -->
- <!--<tempfile destdir="out.dita" deleteonexit="yes"/>-->
- <!--<delete file="tmp.xml"/>
- <delete file="Test_z_getfeature_do_parse__noxml.xml"/>
- <delete file="main__noxml.dita"/>-->
-
-
- <!--<if>
- <available file="${INPUT}" type="file" />
- </if>-->
-
-
-
- <target name="check" >
- <echo message="testuje check"/>
- <condition property="test_if_INPUTxml" taskname="PROCES_TO_DITA_build" value="AVIABLE">
- <available file="${INPUT}" filepath="." />
- </condition>
- </target>
-
- <target name="make_inputXML_from_stdin" unless="test_if_INPUTxml">
- <echo message="make_inputXML_from_stdin is not aviable appending"/>
- <input addproperty="INPUT_from_stdin"/>
- <echo message="${INPUT_from_stdin}" file="${INPUT}"/>
- <!--<echo file="${test_if_INPUTxml}" message=""/>-->
- </target>
- <target name="check-info" if="test_if_INPUTxml">
- <echo message="Using default XML object on input from file ${INPUT} . "/>
- </target>
-
- <target name="PROCES_TO_DITA_build" depends="check,check-info,make_inputXML_from_stdin">
- <echo message="PROCES_TO_DITA_build to ${test_if_INPUTxml}"/>
- <!-- przyklad z uzywaniem saxona ktorego wczesniej trzeba pobrac z port install saxon -->
- <!--<xslt style="copy-no-xml.xsl" in="${INPUT}" out="${Test_z_getfeature_do_parse__noxml.xml}"> <!-\- {Test_z_getfeature_do_parse__noxml.xml"-\->
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- </xslt>-->
- <!--<xslt style="copy-no-xml.xsl" in="main.dita" out="${main__noxml.dita}"/>-->
- <!--<concat destfile="${tmp.xml}" append="true" encoding="UTF-8" >
- <string><?xml version="1.0" encoding="UTF-8"?>
- <root></string>
- <file file="${Test_z_getfeature_do_parse__noxml.xml}" />
- <file file="${main__noxml.dita}"/>
- <string></root></string>
- </concat>-->
-
- <!-- parsuje main.dita aby wiedziec, jaki proces jest zalaczany do danego zaglebienia aby wygenerowac docelowy plik dita z zaglebieniami -->
- <xslt basedir="./" style="${parse_dita_templ.xsl}" in="${INPUT}" destdir="./" out="out.dita" >
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="DITA_PARSE_templ"/>
- <!--<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-->
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <!--<param name="dita_task_template_file_param" expression="main.dita"/>-->
- </xslt>
-
- <!-- tymczasowe rem dla zrobienia akcji wyzej -->
- <!--<xslt basedir="./" style="${PROCES_INCLUDE.xsl}" in="${INPUT}" destdir="./" out="out.dita" >
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="PROCES_INCLUDE"/>
- <!-\-<attribute name="http://saxon.sf.net/feature/initialTemplate" value="asd"/>-\->
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <!-\-<param name="dita_task_template_file_param" expression="main.dita"/>-\->
- </xslt>-->
-
-
-
- <!--<property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>-->
- <!--<exec executable="${dita.dir}" dir=".">
- <arg value="-i"/>
- <arg value="${out_task.dita}" />
- <arg value="-f" />
- <arg value="pdf"/>
- <arg value="-o"/>
- <arg value="out"/>
- </exec>-->
-
- <!--<exec executable="bash" dir="." outputproperty="out_task_file">
- <arg value="-c"/>
- <arg value="echo ${out_task.dita} |sed 's/^.*\///'"/>
- </exec>-->
-
- <!--<propertyregex property="out_file" input="${out_task.dita}" regexp="$.*/(.*)" select="\1."/>-->
- <!--<loadfile property="result" srcFile="out/${out_task_file}.pdf"/>-->
- <!--<echo message="input was : ${input}"/>-->
- <!--<echo message="${result}"/>-->
- <!--<propertyregex
- name="test"
- property="current.target.dir"
- input="com.element.subelement"
- regexp="\."
- replace="/"
- global="true" />-->
- </target>
- </project>
|