瀏覽代碼

niby dziala

a.binder 9 年之前
父節點
當前提交
cfb4f68b00

+ 37 - 28
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -35,6 +35,10 @@
         -Dxpath=ID -Dxpath_value=1000 
         -Duuid=1 -DwebRootUrl=somePathDir-->
     <property name="basedir"  value="${basedir}" /> <!-- do ustalenia glownego katalogu -->
+    <property name="default_db:recurse_ant_basedir" location="."/>
+    <property name="default_db:recurse_ant_basedir.temp" location="${default_db:recurse_ant_basedir}/temp"/>
+    <property name="default_db:recurse_ant" location="${default_db:recurse_ant}"/>
+
     <property name="out" value="out"/> <!-- output ready files like pdf -->
     <property name="p5_tr_map_dir" location="${basedir}/../../../default_db.instance.xml/p5_tr_map" />
     <property name="simpleSchema_dir" location="${basedir}/../../../default_db.instance.xml/simpleSchema" />
@@ -59,20 +63,20 @@
     <property name="ignore_maxOccurs_0" value="1"/> <!-- When element has maxOccurs=0 do not try to retrieve him to limit tree -->
     
     <property name="loop_path_recurs" value=""/>  <!-- w przypadku podania, system powinien w tym katalogu zapisywac wynik xml dzialania, azeby odbudowac rekursywne drzewo - zapisujemy po system_cache__appinfo:id np bedzie ${temp}/${uuid}_CRM_PROCES___d14e4479-1_PROCES_BEN/  -->
-    <property name="temp_name" value="temp" /> <!-- temp files-->
-    <property name="temp" value="${basedir}/${temp_name}${loop_path_recurs}" /> <!-- temp files-->
-    
-    <property name="xpath_query.xsl" value="${basedir}/${temp_name}/${uuid}.xpath_query.xsl"/>
-    <property name="empty.xml" value="${basedir}/${temp_name}/${uuid}.empty.xml"/>
+    <!--<property name="temp_name" value="temp" />--> <!-- temp files-->
+    <property name="temp" value="${default_db:recurse_ant_basedir.temp}${loop_path_recurs}" /> <!-- temp files-->
+    <property name="xpath_query.xsl" value="${default_db:recurse_ant_basedir.temp}/${uuid}.xpath_query.xsl"/>
+    <property name="empty.xml" value="${temp}/${uuid}.empty.xml"/>
     <!-- variables to first transform of doc for then get related features -->
     <!--<property name="default_db_xml_cache.public" value="../../../default_db_xml_cache.public"/>--> <!-- katalog z xsl z projektu src-xmlschema.git -->
     
     <!--<tempfile property="uuid" deleteonexit="yes"/>-->
     <property name="out_task.dita"  value="${temp}/${uuid}.out_task_dita" />
     <property name="out_task.dita.final"   value="${temp}/${uuid}_out_task_dita_final.dita" />
+    <property name="out_task.dita.final.noext"   value="${uuid}_out_task_dita_final" />
     <property name="out_task.dita.final.html"   value="${uuid}_out_task_dita_final.html" /> <!-- dita -f html5 wywala kropki -->
-    <property name="out_task.dita.final_with_RelatedFeatureLoop_no_path"   value="${temp_name}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop" />
-    <property name="out_task.dita.final_with_RelatedFeatureLoop"   value="${temp}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop" />
+    <property name="out_task.dita.final_with_RelatedFeatureLoop_no_path"   value="${uuid}.out_task.dita.final_with_RelatedFeatureLoop" />
+    <property name="out_task.dita.final_with_RelatedFeatureLoop"   value="${default_db:recurse_ant_basedir}/out/${uuid}.out_task.dita.final_with_RelatedFeatureLoop" />
     
      <!-- do zrobienia  -->
     <!--<tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  suffix=".xml" />-->
@@ -280,7 +284,7 @@
                         <antcall target="build_recurse_ant_merge_dita_from_temp.xsl_tr_map"/>
                     </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">
+                    <target name="xml_recursed_from_tr_map" depends="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"/>-->
                         
                         <!-- TODO proba wlaczenia rekursywnosci zapisanie wezla do sciezki w folderze-->
@@ -309,7 +313,7 @@
                             <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
                         </echoxml>-->
                         
-                        <xslt basedir="./" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.xml" >
+                        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.xml" >
                             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
                             </factory>
@@ -346,13 +350,14 @@
         <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"/>
+        <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" depends="install_folders">
+            <property name="cookie_file" value="${default_db:recurse_ant_basedir.temp}/${uuid_tested}.cookie"/>
             <exec executable="curl"> <!--  errorproperty="wfs_error" resultproperty="wfs_result" -->
                 <arg line=" -c ${cookie_file} -H 'Authorization: Basic ${passwordBase64Basic_tested}' &#34;${api_url}&#34;"/> <!-- /default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetCapabilities&#34; -->
             </exec>
             <property name="php_session_id_tested" value=" -b ${cookie_file}"/>
-            <echo> #289 we set php_session_id_tested=(${php_session_id_tested}) </echo>
+            <echo> #289 we set php_session_id_tested=(${php_session_id_tested})        
+                 $cookie_file = ${cookie_file} </echo>
         </target>
     
     <!-- ### eof php_session_id ### -->
@@ -395,7 +400,7 @@
     
    
     <target name="main_build_recurse_ant.dita_with_id"  if="${test_if_dita}">
-            <xslt basedir="./" style="${main_build_recurse_ant.dita_with_id.xsl}" in="${main_build_recurse_ant.dita}"  destdir="./" out="${main_build_recurse_ant.dita_with_id}" >
+            <xslt basedir="${default_db:recurse_ant_basedir}" style="${main_build_recurse_ant.dita_with_id.xsl}" in="${main_build_recurse_ant.dita}"  destdir="./" out="${main_build_recurse_ant.dita_with_id}" >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -446,7 +451,7 @@
         <echoxml file="${empty.xml}">
             <empty>empty</empty>
         </echoxml>
-        <xslt basedir="./" style="${xpath_query_check_create_xsl.xsl}" in="${empty.xml}"  destdir="./" out="${xpath_query.xsl}"  >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${xpath_query_check_create_xsl.xsl}" in="${empty.xml}"  destdir="./" out="${xpath_query.xsl}"  >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
                 <attribute name="http://saxon.sf.net/feature/initialTemplate" value="xpath_query_check_create_xsl"/> 
@@ -460,7 +465,7 @@
         <echoxml file="${empty.xml}">
             <empty>empty</empty>
         </echoxml>
-        <xslt basedir="./" style="${xpath_query_check_create_xsl.xsl}" in="${empty.xml}"  destdir="./" out="${xpath_query.xsl}"  >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${xpath_query_check_create_xsl.xsl}" in="${empty.xml}"  destdir="./" out="${xpath_query.xsl}"  >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
                 <attribute name="http://saxon.sf.net/feature/initialTemplate" value="xpath_query_check_create_xsl"/> 
@@ -478,7 +483,7 @@
         <echo>#113 ant build_recurse_ant.xml=${build_recurse_ant.xml}; </echo>
         <record name="ant.log" loglevel="verbose" append="true" />
         <!--<delete file="${build_recurse_ant.xml}"/>-->
-        <xslt basedir="./" style="${build_recurse_ant.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${build_recurse_ant.xml}"  >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${build_recurse_ant.xml}"  >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -503,6 +508,9 @@
             <param name="loop_xpath_save" expression="${loop_xpath}"/>
             <param name="current_leaf.dita" expression="${main_build_recurse_ant.dita_with_id}"/>
             <param name="basedir" expression="${basedir}"/>
+            <param name="recurse_ant_basedir" expression="${default_db:recurse_ant_basedir}"/>
+            <param name="recurse_ant_basedir.temp" expression="${default_db:recurse_ant_basedir.temp}"/>
+            <param name="recurse_ant" expression="${default_db:recurse_ant}"/>
             <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}"/>
@@ -512,7 +520,8 @@
             <param name="xpath_query" expression="${xpath_query}"/>
             <param name="xpath_query.xsl" expression="${xpath_query.xsl}"/>
             <param name="empty.xml" expression="${empty.xml}"/>
-
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
         </xslt>
         <!--<import file="${build_recurse_ant.xml}"/>-->
         <record action="stop" name="ant.log"/>
@@ -522,7 +531,7 @@
     </target>
     
     <target name="build_recurse_ant_merge_dita_from_temp.xsl" depends="build_recurse_ant.xml" description="z plikow temp/$uuid.* buduje $out_task.dita.final ">
-        <xslt basedir="./" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final}" >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final}" >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -539,7 +548,7 @@
 
 
     <target name="build_recurse_ant_merge_dita_from_temp.xsl_tr_map" depends="build_recurse_ant.xml" description="z plikow temp/$uuid.* buduje $out_task.dita.final ">
-        <xslt basedir="./" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final}" >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final}" >
             <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="RelatedFeatureRoot"/>
@@ -550,7 +559,7 @@
             <param name="uuid" expression="${uuid_tested}"/>
             <!--<param name="basedir" expression="${basedir}"/>-->
             <param name="temp" expression="${temp}"/>
-            <param name="temp" expression="${temp}"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
         </xslt>
         <echo> zapisalem plik gotowy do utworzenia dita do ${out_task.dita.final}. </echo>
     </target>
@@ -566,7 +575,7 @@
                             <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
                         </echoxml>-->
         
-        <xslt basedir="./" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.xml" >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_merge_dita_from_temp.xsl}" in="${main_build_recurse_ant.dita_with_id}"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.xml" >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -580,7 +589,7 @@
             <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
         </xslt>
         
-        <xslt basedir="./" style="${recurse_ant_to_html.xsl}" in="${out_task.dita.final_with_RelatedFeatureLoop}.xml"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.html" >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${recurse_ant_to_html.xsl}" in="${out_task.dita.final_with_RelatedFeatureLoop}.xml"  destdir="./" out="${out_task.dita.final_with_RelatedFeatureLoop}.html" >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
             </factory>
@@ -631,7 +640,7 @@
             <arg value="-f" />
             <arg value="pdf"/>
             <arg value="-o"/>
-            <arg value="out"/>
+            <arg value="${out}"/>
         </exec>
         <exec  executable="bash" dir="." outputproperty="out_task_file">
             <arg value="-c"/>
@@ -647,7 +656,7 @@
         <!--<echo> $wfs_output = ${wfs_output} 
         </echo>-->
         <echo>
-            &lt;br&gt;Wygenerowano druk pdf - sciagnij go &lt;a href=&quot;${webRootUrl}/out/${out_task_file}.pdf&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/out/${out_task_file}.pdf&lt;/a&gt;&lt;/br&gt; 
+            &lt;br&gt;Wygenerowano druk pdf - sciagnij go &lt;a href=&quot;${webRootUrl}/${out}/${out_task.dita.final.noext}.pdf&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out}/${out_task_file}.pdf&lt;/a&gt;&lt;/br&gt; 
         </echo>
         <echo>
             &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
@@ -672,7 +681,7 @@
             <arg value="-f" />
             <arg value="html5"/>
             <arg value="-o"/>
-            <arg value="out"/>
+            <arg value="${out}"/>
         </exec>
         <!--<exec  executable="bash" dir="." outputproperty="out_task_file">
             <arg value="-c"/>
@@ -689,7 +698,7 @@
         </echo>-->
         <!--<loadfile property="out_task_file.loadfile" srcfile="out/${out_task_file}"></loadfile>-->
         <echo>
-            &lt;br&gt;Wygenerowano druk html - sciagnij go &lt;a href=&quot;${webRootUrl}/out/${out_task.dita.final.html}&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/out/${out_task.dita.final.html}&lt;/a&gt;&lt;/br&gt;
+            &lt;br&gt;Wygenerowano druk html - sciagnij go &lt;a href=&quot;${webRootUrl}/${out}/${out_task.dita.final.html}&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out}/${out_task.dita.final.html}&lt;/a&gt;&lt;/br&gt;
             &lt;br&gt; $webRootUrl to ${webRootUrl}
             &lt;br&gt; $out_task.dita.final to ${out_task.dita.final}
             &lt;br&gt; $out_task_file to ${out_task_file}
@@ -716,7 +725,7 @@
             <arg value="-f" />
             <arg value="tocjs"/>
             <arg value="-o"/>
-            <arg value="out"/>
+            <arg value="${out}"/>
         </exec>
         <!--<exec  executable="bash" dir="." outputproperty="out_task_file">
             <arg value="-c"/>
@@ -733,7 +742,7 @@
         </echo>-->
         <!--<loadfile property="out_task_file.loadfile" srcfile="out/${out_task_file}"></loadfile>-->
         <echo>
-            &lt;br&gt;Wygenerowano druk html - sciagnij go &lt;a href=&quot;${webRootUrl}/out/${out_task.dita.final.html}&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/out/${out_task.dita.final.html}&lt;/a&gt;&lt;/br&gt;
+            &lt;br&gt;Wygenerowano druk html - sciagnij go &lt;a href=&quot;${webRootUrl}/${out}/${out_task.dita.final.html}&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out}/${out_task.dita.final.html}&lt;/a&gt;&lt;/br&gt;
         </echo>
         <!-- <echo>
             &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 

+ 60 - 25
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -39,7 +39,11 @@
     <!--<xsl:param name="current_leaf.dita" required="yes"/>--> <!-- nazwa aktualnego przetowarzenia .dita - najpierw main_build_recurse_ant.dita potem przechodzi w  1.1.root_x2f_IN7_DZIENNIK_KORESP.1.dita.xml -->
     <!--<xsl:param name="wfs_output" select="concat('temp/wfs_output.',$uuid)"/>-->
                     <!-- jak parametr jest to znaczy, ze przetwarzamy  -->
-    <xsl:param name="wfs_output" required="no"/> <!-- potem wfs_output.xml jak sciagnie nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie -->
+    <xsl:param name="recurse_ant_basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
+    
+    
+    <xsl:param name="recurse_ant_basedir.temp"  required="yes"/>
+    <xsl:param name="recurse_ant"  required="yes"/><xsl:param name="wfs_output" required="no"/> <!-- potem wfs_output.xml jak sciagnie nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie -->
     <xsl:param name="api_url"  required="yes"/>
     <!--<xsl:param name="namespace_prefix" select="'p5_default_db'"/>--> 
     <xsl:param name="typeName" required="yes" />  <!-- to be set initially ex: p5_default_db:IN7_DZIENNIK_KORESP  -->
@@ -86,7 +90,8 @@
                  to wyzwolenie powinno juz zrobic ant_buildy "dla kolejnego X'
                  to wyzwolenie korzysta z apply-templates wyzwolenia glownego, w celu przygotowania ant_build 
         -->
-    <xsl:template match="*"> 
+    <xsl:param name="simpleSchema_dir" required="yes"/>
+    <xsl:param name="default_db_xml_cache.public" required="yes"/><xsl:template match="*"> 
         <xsl:param name="typeName"  select="$typeName" />
         <xsl:param name="xpath" select="$xpath" />
         <xsl:param name="xpath_value" select="$xpath_value" />
@@ -165,7 +170,7 @@
                     </xsl:choose>
                 </xsl:variable>
                 <xsl:message>#71 wstawiam projekt $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message>
-                <project basedir="../." name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant_if{$loop_xpath_real}">
+                <project basedir="{$recurse_ant_basedir}" name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant_if{$loop_xpath_real}">
                     
                     <!--  
                     get_related_feature_run_child_ant{$loop_xpath_real} - domyslny przed 2017-03-28-->
@@ -220,7 +225,15 @@
                         <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
                     </xsl:element>
                     
-                    <xsl:comment>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
+                        <xsl:attribute name="value" select="'.'"/>
+                    </xsl:element>
+                    
+                    <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
+                    <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
+                    
+                    <property name="temp" value="{$temp}"/><xsl:comment>
                         Important variables:
                         typeName=<xsl:value-of select="$typeName"/>;
                         xpath=<xsl:value-of select="$xpath"/>;
@@ -493,7 +506,7 @@
                 
                
                 
-                <project basedir="{$basedir}" name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs}" default="get_related_feature_run_child_ant_if_query_{$loop_xpath_real}_{$loop_path_recurs}"> <!-- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs -->
+                <project basedir="{$recurse_ant_basedir.temp}{$loop_path_recurs}" name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs}" default="get_related_feature_run_child_ant_if_query_{$loop_xpath_real}_{$loop_path_recurs}"> <!-- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs -->
                     <!-- default przed 2017-03-28 concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs) 
                         get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs} -->
                     <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
@@ -551,7 +564,26 @@
                         <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
                     </xsl:element>
                     
-                    <xsl:comment>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
+                        <xsl:attribute name="value" select="$recurse_ant_basedir"/>
+                    </xsl:element>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'default_db:recurse_ant'"/>
+                        <xsl:attribute name="value" select="$recurse_ant"/>
+                    </xsl:element>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'default_db:recurse_ant_basedir.temp'"/>
+                        <xsl:attribute name="value" select="$recurse_ant_basedir.temp"/>
+                    </xsl:element>
+                    
+                    <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
+                    <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
+                    
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'temp'"/>
+                        <xsl:attribute name="value" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
+                    </xsl:element><xsl:comment>
                         Important variables:
                         typeName=<xsl:value-of select="$typeName"/>;
                         xpath=<xsl:value-of select="$xpath"/>;
@@ -597,7 +629,7 @@
                         <xsl:element name="tempfile">
                             <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
                             <xsl:attribute name="deleteonexit" select="'no'"/>
-                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
                             <xsl:attribute name="suffix" select="'.xml'"/>
                             <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_',$featureID_name_dita)"/>
                         </xsl:element>
@@ -608,15 +640,15 @@
                         <xsl:element name="tempfile">
                             <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
                             <xsl:attribute name="deleteonexit" select="'no'"/>
-                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
                             <xsl:attribute name="suffix" select="'.xml'"/>
                             <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_out_',$featureID_name_dita)"/>
                         </xsl:element>
                         <xsl:element name="xslt">
-                            <xsl:attribute name="basedir" select="'./'"/>
+                            <xsl:attribute name="basedir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
                             <xsl:attribute name="style" select="$xpath_query.xsl"/>
                             <xsl:attribute name="in" select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
-                            <xsl:attribute name="destdir" select="'./'"/>
+                            <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
                             <xsl:attribute name="out" select="concat('${get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
                             <factory name="net.sf.saxon.TransformerFactoryImpl">
                                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -658,7 +690,7 @@
                         <!--<tempfile property="test_child_curl_ouptut.xml"/>--> <!-- todo deleteonexit=yes -->
                         <xsl:element name="tempfile">
                             <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp')" />
-                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
                             <xsl:attribute name="prefix" select="'test_if_exec_child_ant-'"/>
                             <xsl:attribute name="suffix" select="'.xml'"/>
                         </xsl:element>
@@ -713,7 +745,7 @@
                         <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_check')"/>
                         <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_test}')"/> 
                         
-                        <ant antfile="{$basedir}/build.xml" target="xml_recursed_from_tr_map"/>
+                        <ant antfile="{$recurse_ant_basedir}/build.xml" target="xml_recursed_from_tr_map"/>
                     </xsl:element>
                     <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
                     <!-- task do polaczenia zaglebien -->
@@ -764,10 +796,10 @@
             <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'-')"/>
         </xsl:element>
         <xsl:element name="xslt">
-            <xsl:attribute name="basedir" select="'./'"/>
+            <xsl:attribute name="basedir" select="$temp"/>
             <xsl:attribute name="style" select="$xpath_query.xsl"/>
             <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
-            <xsl:attribute name="destdir" select="'./'"/>
+            <xsl:attribute name="destdir" select="$temp"/>
             <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
             <factory name="net.sf.saxon.TransformerFactoryImpl">
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -804,10 +836,10 @@
             <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_xpath_real,@xml_id)"/>}</builds_to_ant>
         </xsl:element>
         <xsl:element name="xslt">
-            <xsl:attribute name="basedir" select="'./'"/>
+            <xsl:attribute name="basedir" select="$temp"/>
             <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
             <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_xpath_real,@xml_id,'}')"/>
-            <xsl:attribute name="destdir" select="'./'"/>
+            <xsl:attribute name="destdir" select="$temp"/>
             <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
             <factory name="net.sf.saxon.TransformerFactoryImpl">
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -849,7 +881,7 @@
         <xsl:comment>
             #590 LOOP BEGIN ;  @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:comment>
         <echo> #523 RelatedFeatureLoop  @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant bede odpalac w podkatalogu:@xml_id=(<xsl:value-of select="@xml_id"/>) 
-            <xsl:value-of select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/> </echo>
+            <xsl:value-of select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath_real,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/> </echo>
         <xsl:message>#591 todo executing by exec instead of ant without inheritAll because it's looping!!! </xsl:message>
         
         
@@ -874,10 +906,10 @@
             <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'-')"/>
         </xsl:element>
         <xsl:element name="xslt">
-            <xsl:attribute name="basedir" select="'./'"/>
+            <xsl:attribute name="basedir" select="$temp"/>
             <xsl:attribute name="style" select="$xpath_query.xsl"/>
             <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
-            <xsl:attribute name="destdir" select="'./'"/>
+            <xsl:attribute name="destdir" select="$temp"/>
             <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
             <factory name="net.sf.saxon.TransformerFactoryImpl">
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -914,10 +946,10 @@
             <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_xpath_real,@xml_id)"/>}</builds_to_ant>
         </xsl:element>
         <xsl:element name="xslt">
-            <xsl:attribute name="basedir" select="'./'"/>
+            <xsl:attribute name="basedir" select="$temp"/>
             <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
             <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_xpath_real,@xml_id,'}')"/>
-            <xsl:attribute name="destdir" select="'./'"/>
+            <xsl:attribute name="destdir" select="$temp"/>
             <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
             <factory name="net.sf.saxon.TransformerFactoryImpl">
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -1115,7 +1147,7 @@
                                             $temp is <xsl:value-of select="$temp"/>;</echo>
                                     <xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik  w kolejnym wyzwoleniu ant</xsl:comment>
                                     <delete file="{$temp}/{$wfs_output.dita}.vals.dita"/>
-                                    <xslt basedir="./" style="{$build_recurse_ant.xsl}" in="{$temp}/{$wfs_output.dita}"  destdir="./" out="{$temp}/{$wfs_output.dita}.vals.dita" >
+                                    <xslt basedir="." style="{$build_recurse_ant.xsl}" in="{$temp}/{$wfs_output.dita}"  destdir="./" out="{$temp}/{$wfs_output.dita}.vals.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="after_first_ant_assing_vars"/>
@@ -1129,10 +1161,12 @@
                                             <param name="typeName" expression="{$typeName}"/><!-- kontrolnie - nie potrzebne -->
                                             <param name="uuid" expression="{$uuid}"/>
                                             <param name="basedir" expression="{$basedir}"/>
-                                            <param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
+                                            <param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>
+                                            <param name="recurse_ant_basedir.temp"  expression="{$recurse_ant_basedir.temp}"/>
+                                            <param name="recurse_ant"  expression="{$recurse_ant}"/><param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
                                             <param name="passwordBase64Basic" expression="{$passwordBase64Basic}"/>
                                             <param name="feature_pos" expression="{$feature_pos}"/> <!-- aby wsadzic nr wezla do $wfs_output.dita.vals.dita -->
-                                            <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="{$cookie_curl_option}"/>
@@ -1142,7 +1176,8 @@
                                             <param name="xpath_query" expression="{$xpath_query}"/>
                                             <param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>
                                             <param name="empty.xml" expression="{$empty.xml}"/>
-                                    </xslt>
+                                    <param name="simpleSchema_dir" expression="{$simpleSchema_dir}"/>
+                                            <param name="default_db_xml_cache.public" expression="{$default_db_xml_cache.public}"/></xslt>
                             </xsl:element>
                         <!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych  -->
                         <!-- blad - result jest po tym template -->

+ 11 - 11
SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl

@@ -180,16 +180,16 @@
                         Will try to put file=<xsl:value-of select="concat($uuid,'.',$loop_xpath,$featureID_name,'.',$RelatedFeaturePos,'.dita.xml.vals.dita')"/>;
                     </debug26>-->
                     <!--<xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.dita.xml.vals.dita'))"/>-->
-                    <xsl:comment>#174 look in <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml')"/>;</xsl:comment>
+                    <xsl:comment>#174 look in <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'_out_task_dita_final.dita.xml')"/>;</xsl:comment>
                     <xsl:variable name="dita_fragment">
                         <xsl:choose>
-                            <xsl:when test=" doc-available(concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml'))">
-                                <xsl:message>#156 INFO Related leaf xml file <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml')"/></xsl:message>
-                                <xsl:copy-of select="doc(concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml'))"/>
+                            <xsl:when test=" doc-available(concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'_out_task_dita_final.dita.xml'))">
+                                <xsl:message>#156 INFO Related leaf xml file <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'_out_task_dita_final.dita.xml')"/></xsl:message>
+                                <xsl:copy-of select="doc(concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'_out_task_dita_final.dita.xml'))"/>
                             </xsl:when>
                             <xsl:otherwise>
                                 <!--<xsl:comment>#156 INFO no Related leaf xml file <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml')"/>;</xsl:comment>-->
-                                <xsl:message>#156 INFO no Related leaf xml file <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'.out_task.dita.final.xml')"/></xsl:message>
+                                <xsl:message>#156 INFO no Related leaf xml file <xsl:value-of select="concat($temp,'/',$xml_id,'.',$uuid,'.',$feature_pos_child,'/',$uuid,'_out_task_dita_final.dita.xml')"/></xsl:message>
                             </xsl:otherwise>
                         </xsl:choose>
                     </xsl:variable>
@@ -276,13 +276,13 @@
                             <!--<xsl:comment>#220 $path=<xsl:value-of select="$path"/>;  </xsl:comment>-->
                             <xsl:variable name="dita_fragment">
                                 <xsl:choose>
-                                    <xsl:when test=" doc-available(concat($path,'/',$uuid,'.out_task.dita.final.xml'))">
-                                        <xsl:message>#221 INFO Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'.out_task.dita.final.xml')"/></xsl:message>
-                                        <xsl:copy-of select="doc(concat($path,'/',$uuid,'.out_task.dita.final.xml'))"/>
+                                    <xsl:when test=" doc-available(concat($path,'/',$uuid,'_out_task_dita_final.dita.xml'))">
+                                        <xsl:message>#221 INFO Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'_out_task_dita_final.dita.xml')"/></xsl:message>
+                                        <xsl:copy-of select="doc(concat($path,'/',$uuid,'_out_task_dita_final.dita.xml'))"/>
                                     </xsl:when>
                                     <xsl:otherwise>
-                                        <xsl:comment>#221 INFO no Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'.out_task.dita.final.xml')"/>;</xsl:comment>
-                                        <xsl:message>#221 INFO no Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'.out_task.dita.final.xml')"/></xsl:message>
+                                        <xsl:comment>#221 INFO no Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'_out_task_dita_final.dita.xml')"/>;</xsl:comment>
+                                        <xsl:message>#221 INFO no Related leaf xml file <xsl:value-of select="concat($path,'/',$uuid,'_out_task_dita_final.dita.xml')"/></xsl:message>
                                     </xsl:otherwise>
                                 </xsl:choose>
                             </xsl:variable>
@@ -373,7 +373,7 @@
         <xsl:apply-templates select=".">
             <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
             <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
-            <xsl:with-param name="dita.map" select="1"/>
+            <xsl:with-param name="dita.map" select="$dita.map"/>
             <!--<xsl:with-param name="dita_with_id" select="$dita_with_id"/>-->
         </xsl:apply-templates>
     </xsl:template>

+ 1 - 1
SE/schema/default_db_xml_cache.public/builds_to_ant.xsl

@@ -188,7 +188,7 @@
                             </echo>
                             <exec executable="/opt/local/bin/ant" dir="{$temp}" failifexecutionfails="true">
                                 <xsl:element name="arg">
-                                    <xsl:attribute name="line" select="concat('-f ',.,'/build_root.xml')"/>
+                                    <xsl:attribute name="line" select="concat('-f ',$temp,'/',.,'/build_root.xml')"/>
                                 </xsl:element>
                             </exec>
                             <!--<ant antfile="{.}/build_root.xml" dir="{$temp}" inheritall="false" usenativebasedir="true" />-->