|
|
@@ -34,15 +34,17 @@
|
|
|
<property name="temp" value="temp"/> <!-- temp files-->
|
|
|
<property name="out" value="out"/> <!-- output ready files like pdf -->
|
|
|
<property name="p5_tr_map_dir" location="../../../default_db.instance.xml/p5_tr_map" />
|
|
|
+ <property name="detect_resource_type_dir" location="../../../default_db.instance.xml/detect_resource_type" />
|
|
|
|
|
|
<property name="uuid" value="${uuid}"/> <!--TODO-->
|
|
|
<property name="passwordBase64Basic" value="${passwordBase64Basic}"/>
|
|
|
+ <property name="php_session_id" value="${php_session_id}"/> <!-- optional cookie if sent work with it if not - get it -->
|
|
|
<property name="url" value="${url}"/>
|
|
|
<property name="webRootUrl" value="${$webRootUrl}"/>
|
|
|
|
|
|
<property name="api_url" value="https://biuro.biall-net.pl/SE/version-git/wfs-data.php"/>
|
|
|
<property name="namespace_prefix" value="p5_default_db"/> <!-- ex: p5_default_db to complete after p5_default_db:IN7_DZIENNIK_KORESP -->
|
|
|
- <property name="namespace_prefix_p5_tr_map" value="default_db"/> <!-- do przetowrzenia w nazwie pliku docelowej element-default_db__x3A__CRM_PROCES__x3A__CRM_PROCES -->
|
|
|
+ <property name="namespace_prefix_p5_tr_map" value="default_db"/> <!-- do przetowrzenia w nazwie pliku docelowej element-default_db__x3A__CRM_PROCES__x3A__CRM_PROCES oraz dla detect_resource_type_dir -->
|
|
|
<property name="typeName" value="${typeName}"/> <!-- to be set initially ex: p5_default_db:IN7_DZIENNIK_KORESP - be careful not to give it in apostrophs like 'p5_default_db:IN7_DZIENNIK_KORESP' - it wont work! -->
|
|
|
<property name="xpath" value="${xpath}"/> <!-- to be set initially like as key to search ID -->
|
|
|
<property name="xpath_value" value="${xpath_value}"/> <!-- to be set initially like 1000 (to search ID=1000, if ID we get by featureID -->
|
|
|
@@ -210,7 +212,6 @@
|
|
|
<echo message="OUTPUT__END"/>
|
|
|
</target>
|
|
|
|
|
|
-
|
|
|
<target name="dita_ok" if="${test_if_dita}">
|
|
|
<!-- polaczenie pdfa -->
|
|
|
<antcall target="build_recurse_ant_merge_dita_from_temp.xsl"/>
|
|
|
@@ -218,8 +219,6 @@
|
|
|
|
|
|
|
|
|
<!-- #### tr_map #### -->
|
|
|
-
|
|
|
-
|
|
|
|
|
|
<target name="set_tr_map" depends="check_set_default_db_xml_cache.public_local,check_default_db_xml_cache.public_default" >
|
|
|
<!--<property name="main_build_recurse_ant.dita" value="main_build_recurse_ant.dita"/>-->
|
|
|
@@ -247,27 +246,51 @@
|
|
|
<echo><br>Brakuje druku dla powiązanego obiektu ${main_build_recurse_ant.dita} </br></echo>
|
|
|
<echo message="OUTPUT__END"/>
|
|
|
</target>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
<target name="tr_map_ok" if="${test_if_tr_map}">
|
|
|
<!-- polaczenie pdfa -->
|
|
|
<echo>#251 wyzwalam build_recurse_ant_merge_dita_from_temp.xsl</echo>
|
|
|
<antcall target="build_recurse_ant_merge_dita_from_temp.xsl"/>
|
|
|
</target>
|
|
|
|
|
|
- <target name="xml_recursed_from_tr_map" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,check_tr_map" description="Buduje wyjsciowego XMLa na podstawie mapy transportowej dla zastosowan w API DEVEL">
|
|
|
- <echo message="OUTPUT__START"/>
|
|
|
- <echo>
|
|
|
- <br>Wygenerowano wyjsciowy plik XML - sciagnij go <a href="${webRootUrl}/${out_task.dita.final}" target="_blank"> "${webRootUrl}/${out_task.dita.final}</a></br>
|
|
|
- </echo>
|
|
|
- <echo message="OUTPUT__END"/>
|
|
|
- </target>
|
|
|
-
|
|
|
-
|
|
|
+ <target name="xml_recursed_from_tr_map" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,check_tr_map" description="Buduje wyjsciowego XMLa na podstawie mapy transportowej dla zastosowan w API DEVEL">
|
|
|
+ <echo message="OUTPUT__START"/>
|
|
|
+ <move file="${out_task.dita.final}" tofile="${out_task.dita.final}.xml"/>
|
|
|
+
|
|
|
+ <echo>
|
|
|
+ <br>Wygenerowano wyjsciowy plik XML - sciagnij go <a href="${webRootUrl}/${out_task.dita.final}.xml" target="_blank"> "${webRootUrl}/${out_task.dita.final}.xml</a></br>
|
|
|
+ </echo>
|
|
|
+ <echo message="OUTPUT__END"/>
|
|
|
+ </target>
|
|
|
|
|
|
-
|
|
|
<!-- #### eof tr_map #### -->
|
|
|
|
|
|
+
|
|
|
+ <!-- ### php_session_id ### -->
|
|
|
+
|
|
|
+ <target name="php_session_id_cond">
|
|
|
+ <condition property="php_session_id_fail" taskname="php_session_id_check">
|
|
|
+ <or>
|
|
|
+ <equals arg1="${php_session_id}" arg2=""/>
|
|
|
+ <equals arg1="${php_session_id}" arg2="$${php_session_id}"/>
|
|
|
+ </or>
|
|
|
+ </condition>
|
|
|
+ </target>
|
|
|
+ <target name="php_session_id_check" depends="php_session_id_cond,php_session_id_ok,php_session_id_fail"/>
|
|
|
+ <target name="php_session_id_ok" unless="${php_session_id_fail}" description="use php_session_id from parameter ">
|
|
|
+ <property name="php_session_id_tested" value="--cookie 'PHPSESSID=${php_session_id}'"/>
|
|
|
+ </target>
|
|
|
+ <target name="php_session_id_fail" if="${php_session_id_fail}" description="retrieve php_session_id from API to use it after for fasten api requests ">
|
|
|
+ <property name="cookie_file" value="${temp}/${uuid_tested}.cookie"/>
|
|
|
+ <exec executable="curl"> <!-- errorproperty="wfs_error" resultproperty="wfs_result" -->
|
|
|
+ <arg line=" -c ${cookie_file} -H 'Authorization: Basic ${passwordBase64Basic_tested}' "${api_url}""/> <!-- /default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities" -->
|
|
|
+ </exec>
|
|
|
+ <property name="php_session_id_tested" value=" -b ${cookie_file}"/>
|
|
|
+ <echo> #289 we set php_session_id_tested=(${php_session_id_tested}) </echo>
|
|
|
+ </target>
|
|
|
+
|
|
|
+ <!-- ### eof php_session_id ### -->
|
|
|
+
|
|
|
<target name="set_default_db_xml_cache.public_local">
|
|
|
<condition property="set_default_db_xml_cache.public_local">
|
|
|
<available file="default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl"/>
|
|
|
@@ -308,6 +331,7 @@
|
|
|
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
</factory>
|
|
|
<param name="namespace_prefix" expression="${namespace_prefix}"/>
|
|
|
+ <param name="detect_resource_type_dir" expression="${detect_resource_type_dir}"/>
|
|
|
<classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
</xslt>
|
|
|
</target>
|
|
|
@@ -318,6 +342,7 @@
|
|
|
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
|
|
|
</factory>
|
|
|
<param name="namespace_prefix" expression="${namespace_prefix}"/>
|
|
|
+ <param name="detect_resource_type_dir" expression="${detect_resource_type_dir}"/>
|
|
|
<classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
</xslt>
|
|
|
</target>
|
|
|
@@ -333,7 +358,7 @@
|
|
|
</target>
|
|
|
|
|
|
<!-- wygenerowanie ant builda do sciagniecia niezbednego elementu na podstawie template main.dita i tam zagniezdzonego RelatedFeature-->
|
|
|
- <target name="build_recurse_ant.xml" depends="main_build_recurse_ant.dita_with_id,main_build_recurse_ant.tr_map_with_id">
|
|
|
+ <target name="build_recurse_ant.xml" depends="php_session_id_check,main_build_recurse_ant.dita_with_id,main_build_recurse_ant.tr_map_with_id">
|
|
|
<!-- build do wytworzenia pierwszego przetworzenia zagniezdzen -->
|
|
|
<record name="${temp}/ant.log" loglevel="verbose" append="true"/>
|
|
|
<property name="loop_xpath" value="root"/>
|
|
|
@@ -368,6 +393,7 @@
|
|
|
<param name="build_recurse_ant.xsl" expression="${build_recurse_ant.xsl}"/>
|
|
|
<param name="temp" expression="${temp}"/>
|
|
|
<param name="builds_to_ant.xsl" expression="${builds_to_ant.xsl}"/>
|
|
|
+ <param name="cookie_curl_option" expression="${php_session_id_tested}"/>
|
|
|
</xslt>
|
|
|
<!--<import file="${build_recurse_ant.xml}"/>-->
|
|
|
<ant antfile="${build_recurse_ant.xml}" dir="."/>
|
|
|
@@ -395,7 +421,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <target name="buildpdf_recursed" depends="uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,check_dita" if="${test_if_dita}">
|
|
|
+ <target name="buildpdf_recursed" depends="uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,check_dita" if="${test_if_dita}">
|
|
|
<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"/>
|