Преглед на файлове

do przetestowania z xmlschema

a.binder преди 9 години
родител
ревизия
3c34b4fa7c

+ 20 - 22
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build.xml

@@ -37,7 +37,7 @@
     <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" />
@@ -64,8 +64,7 @@
     <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="${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="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 -->
@@ -74,7 +73,7 @@
     <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.html"   value="${uuid}_out_task_dita_final.html" /> <!-- dita -f html5 wywala kropki -->
     <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" />
     
@@ -296,9 +295,9 @@
                             <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
                         </echoxml>-->
                         
-                        <echo>
+                        <!--<echo>
                             &lt;br&gt;Wygenerowano wyjsciowy plik XML - sciagnij go &lt;a href=&quot;${webRootUrl}/${out_task.dita.final}.xml&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out_task.dita.final}.xml&lt;/a&gt;&lt;/br&gt; 
-                        </echo>
+                        </echo>-->
                         <!--<echo message="OUTPUT__END"/>-->
                     </target>
     
@@ -312,10 +311,11 @@
                         <!--<echoxml file="${out_task.dita.final}.xml">
                             <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
                         </echoxml>-->
-                        
-                        <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" >
+                    <delete file="${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"/>
+                                <attribute name="http://saxon.sf.net/feature/initialMode" value="RelatedFeatureRoot"/>
                             </factory>
                             <classpath location="/opt/local/share/java/saxon9he.jar"/>
                             <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
@@ -323,7 +323,7 @@
                             <param name="uuid" expression="${uuid_tested}"/>
                             <!--<param name="basedir" expression="${basedir}"/>-->
                             <param name="temp" expression="${temp}"/>
-                            <param name="with_RelatedFeatureLoop" expression="true"/>
+                            <param name="with_RelatedFeatureLoop" expression="1"/>
                             <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
                         </xslt>
                         <echo message="OUTPUT__START"/>
@@ -356,8 +356,8 @@
                 <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})                  
-                  $cookie_file = ${cookie_file} </echo>
+            <echo> #289 we set php_session_id_tested=(${php_session_id_tested}) 
+                $cookie_file = ${cookie_file} </echo>
         </target>
     
     <!-- ### eof php_session_id ### -->
@@ -482,7 +482,7 @@
         <property name="build_recurse_ant.xml" value="${temp}/${uuid_tested}.build_${loop_xpath}.xml" />
         <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}"/>-->
+        <!--<delete file="${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"/>
@@ -520,7 +520,7 @@
             <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="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}"/>-->
@@ -656,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.dita.final.noext}.pdf&lt;/a&gt;&lt;/br&gt; 
         </echo>
         <echo>
             &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
@@ -668,7 +668,7 @@
             &lt;br&gt;Umieść swój podpis graficzny (W przygotowaniu)&lt;/br&gt; 
         </echo>
         <echo message="OUTPUT__END"/>
-    </target>    
+    </target>   
      
     
     <target name="buildpdf_recursed_html5" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,check_dita" if="${test_if_dita}" description="URL_TASK Pobierz Wersję HTML">
@@ -683,11 +683,10 @@
             <arg value="-o"/>
             <arg value="${out}"/>
         </exec>
-        
-<!--<exec  executable="bash" dir="." outputproperty="out_task_file">
+        <!--<exec  executable="bash" dir="." outputproperty="out_task_file">
             <arg value="-c"/>
             <arg value="echo ${out_task.dita.final.html} |sed 's/^.*\///'"/>
-        </exec>-->                        
+        </exec>-->
         <echo message="OUTPUT__START"/>        
         <!--<echo> url = ${url} 
         </echo>-->
@@ -699,12 +698,12 @@
         </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}
         </echo>
-        <!-- <echo>
+       <!-- <echo>
             &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
         </echo>
         <echo>
@@ -743,8 +742,7 @@
         </echo>-->
         <!--<loadfile property="out_task_file.loadfile" srcfile="out/${out_task_file}"></loadfile>-->
         <echo>
-            &lt;br&gt;Umieść swój podpis graficzny (W przygotowaniu)&lt;/br&quot;${webRootUrl}/out/${out_task.dita.final.html}&quot; target=&quot;_blank&quot;&gt; 
-&quot;        &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; 

+ 759 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build_recurse_ant.xml

@@ -0,0 +1,759 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="PRINT_TEMPLATE" default="xml_recursed_from_tr_map_with_RelatedFeatureLoop_html">
+    <description>
+        Etykieta
+    </description>
+    <!-- template do kopiowania test-druk @2017-03-02 bindera 
+    Copyright BIALL-NET sp. z o.o. wszelkie prawa zastrzezone
+    
+    -->
+    
+    
+    <!-- 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
+    -->
+
+
+    <!-- https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&path=default_db.in7_dziennik_koresp/test-druk&namespace=p5_default_db:IN7_DZIENNIK_KORESP&featureID=59682 -->
+    <!-- default procesy5 sample template is  file:/SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/build.xml-->
+    <!-- sample URL which call this exact variables in this ANT build -->
+    <!-- przykladowy URL ktory przekazuje parametry do tego ANT -->
+    <!--https://biuro.biall-net.pl/SE/version-git/index.php?_route=UrlAction_Ant&_task=ant&
+        path=${default_db.in7_dziennik_koresp/test-get-wfs-xml} -  this is the place to keep ant build (directory name with build.xml)  
+        &namespace=p5_default_db:Rozdzielcza_test_bzyk_PE&featureID=123 - this is setting the 
+        <property name="url" value="${url}"/> - to point what is record/table to download
+        <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
+        <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
+        <property name="DwebRootUrl" value="${$webRootUrl}"/> - this is the place where script is localized to easyli to target user GUI by href to generated output      
+    />
+    -->
+    
+    <!---DpasswordBase64Basic="xxxx=="
+        -DtypeName="p5_default_db:IN7_DZIENNIK_KORESP" 
+        -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" />
+    <property name="detect_resource_type_dir" location="${basedir}/../../../default_db.instance.xml/detect_resource_type" />
+    <property name="build_complexType_dir" location="${basedir}/../../../default_db.instance.xml/build_complexType" />
+    
+    <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 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  -->
+    <property name="xpath_query" value="${xpath_query}" /> <!-- limit input by example: xpath_query="[position()&lt;3] limit RelatedFeatures; [not(local-name()='PROCES_INIT')] - to limit tree level -->
+    
+    
+    <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="${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="${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" />-->
+    
+
+    
+
+    <!--<echo> $basedir=${basedir}; 
+        $temp=${temp};
+        $loop_path_recurs=${loop_path_recurs};
+    </echo>-->
+
+    <!-- uuid -->
+    <target name="uuid_cond">
+        <condition property="uuid_set" taskname="uuid_check">
+            <or>
+                <equals arg1="${uuid}" arg2=""/>
+                <equals arg1="${uuid}" arg2="$${uuid}"/>
+            </or>
+        </condition>
+    </target>
+    <target name="uuid_check" depends="uuid_cond,uuid_ok,uuid_fail"/>
+    <target name="uuid_ok"   unless="${uuid_set}" >
+        <property name="uuid_tested" value="${uuid}"/>
+    </target>
+    <target name="uuid_fail"  if="${uuid_set}" >
+        <echo>uuid_fail setting to timestamp</echo>
+        <exec  executable="date" outputproperty="uuid_tested" >
+            <arg line="-u +&quot;%Y-%m-%dT%H%M%SZ&quot;"/>
+        </exec>
+    </target>
+    <!-- typeName -->
+    <target name="typeName_cond">
+        <condition property="typeName_set" taskname="typeName_check">
+            <or>
+                <equals arg1="${typeName}" arg2=""/>
+                <equals arg1="${typeName}" arg2="$${typeName}"/>
+            </or>
+        </condition>
+    </target>
+    <target name="typeName_check" depends="typeName_cond,typeName_ok,typeName_fail"/>
+    <target name="typeName_ok"   unless="${typeName_set}" >
+        <property name="typeName_tested" value="${typeName}"  />
+    </target>
+    <target name="typeName_fail"  if="${typeName_set}" >
+        <echo>typeName setting manually</echo>
+        <input addproperty="typeName_input" message="podaj typeName  - nazwa obiektu  np:  nazwe obiektu np CRM_PROCES "/>
+        <property name="typeName_tested" value="p5_default_db:${typeName_input}"  />
+    </target>
+    
+    <!-- xpath -->
+    <target name="xpath_cond">
+        <condition property="xpath_set" taskname="xpath_check">
+            <or>
+                <equals arg1="${xpath}" arg2=""/>
+                <equals arg1="${xpath}" arg2="$${xpath}"/>
+            </or>
+        </condition>
+    </target>
+    <target name="xpath_check" depends="xpath_cond,xpath_ok,xpath_fail"/>
+    <target name="xpath_ok"   unless="${xpath_set}" >
+        <property name="xpath_tested" value="${xpath}"  />
+    </target>
+    <target name="xpath_fail"  if="${xpath_set}" >
+        <echo>xpath setting </echo>
+        <input addproperty="xpath_tested" message="Podaj xpath -  po czym szukac glonwego zaglebienia - np ID "/>
+    </target>
+    
+    <!-- xpath_value -->
+    <target name="xpath_value_cond">
+        <condition property="xpath_value_set" taskname="xpath_value_check">
+            <or>
+                <equals arg1="${xpath_value}" arg2=""/>
+                <equals arg1="${xpath_value}" arg2="$${xpath_value}"/>
+            </or>
+        </condition>
+    </target>
+    <target name="xpath_value_check" depends="xpath_value_cond,xpath_value_ok,xpath_value_fail"/>
+    <target name="xpath_value_ok"   unless="${xpath_value_set}" >
+        <property name="xpath_value_tested" value="${xpath_value}"  />
+    </target>
+    <target name="xpath_value_fail"  if="${xpath_value_set}" >
+        <echo>xpath_value setting </echo>
+        <input addproperty="xpath_value_tested" message="Podaj xpath_value -  podaj wartosc do wyszukiwania - np 1234"/>
+    </target>
+    
+    
+    <!-- passwordBase64Basic -->
+    <target name="passwordBase64Basic_cond">
+        <condition property="passwordBase64Basic_set" taskname="passwordBase64Basic_check">
+            <or>
+                <equals arg1="${passwordBase64Basic}" arg2=""/>
+                <equals arg1="${passwordBase64Basic}" arg2="$${passwordBase64Basic}"/>
+            </or>
+        </condition>
+    </target>
+    <target name="passwordBase64Basic_check" depends="passwordBase64Basic_cond,passwordBase64Basic_ok,passwordBase64Basic_fail"/>
+    <target name="passwordBase64Basic_ok"   unless="${passwordBase64Basic_set}" >
+        <property name="passwordBase64Basic_tested" value="${passwordBase64Basic}"  />
+    </target>
+    <target name="passwordBase64Basic_fail"  if="${passwordBase64Basic_set}" >
+        <echo>passwordBase64Basic setting </echo>
+        <input addproperty="Username" message="podaj nazwe uzytkownika do autoryzacji w API ${api_url} ;  np. a.binder"/>
+        <input addproperty="Password" message="podaj hasło dla uzytkownika ${Username} "/>
+        <exec outputproperty="passwordBase64Basic_tested" executable="base64" inputstring="${Username}:${Password}">
+            <!--<arg line="/bin/echo &quot;${Username}:${Password}&quot; | base64 - "/>-->
+            <!--<arg line="|"/>
+            <arg line="base64 -"/>-->
+        </exec>
+        <echo> Ustalono $passwordBase64Basic na ${passwordBase64Basic_tested} </echo>
+    </target>
+    
+    
+    
+    <target name="konsola" description="wyzwolenie interaktywne z konsoli" depends="uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check">
+        <!--<property name="uuid" value="$"/>-->
+        <!--<exec command="date" outputproperty="uuidd" >
+            <arg line="-u +&quot;%Y-%m-%dT%H%M%SZ&quot;"/>
+        </exec>-->
+        <!--<echo> Ustalilem uuid na ${uuidd}</echo>-->
+        <!--<echo>Podaj nazwe druku</echo>-->
+        <input  addproperty="typeName" message="Podaj typeName -  nazwe obiektu np p5_default_db:CRM_PROCES"/>
+        <input  addproperty="xpath" message="Podaj xpath -  po czym szukac glonwego zaglebienia - np ID"/>
+        <input  addproperty="xpath_value" message="Podaj xpath_value -  podaj wartosc do wyszukiwania - np 1234"/>
+        <input  addproperty="passwordBase64Basic" message="Podaj passwordBase64Basic -  Username i Password w typie base64 "/>
+        <echo> $typeName=${typeName_tested}; $xpath=${xpath_tested}; $xpath_value=${xpath_value} $passwordBase64Basic=${passwordBase64Basic_tested}</echo>
+        <antcall target="buildpdf_recursed"/>
+    </target>
+    
+    
+    <target name="install_folders">
+        <mkdir dir="${temp}"/>
+        <mkdir dir="${out}"/>
+        <chmod  dir="${temp}" perm="ugo+rwx"/>
+        <chmod  dir="${out}" perm="ugo+rwx"/>
+    </target>
+
+
+    <target name="set_dita" 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"/>-->
+        <exec  executable="bash" dir="." outputproperty="main_build_recurse_ant.dita_sed">
+            <arg value="-c"/>
+            <arg value="echo ${typeName_tested} |sed 's/.*://'"/>
+        </exec>
+        <property name="main_build_recurse_ant.dita" value="${main_build_recurse_ant.dita_sed}.dita"/>
+        <echo> Ustawiam $main_build_recurse_ant.dita na ${main_build_recurse_ant.dita} ;  </echo>
+        
+        <property name="main_build_recurse_ant.dita_with_id" value="${temp}/${main_build_recurse_ant.dita}.with_id.xml"  />
+        <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"  />
+        <condition property="test_if_dita" taskname="check_dita" >
+            <available file="${main_build_recurse_ant.dita}"/>  
+        </condition>
+    </target>
+    
+    <target name="check_dita" depends="set_dita,dita_fail,dita_ok">
+        <echo> testujemy czy jest dita</echo>
+    </target>
+    
+    <target name="dita_fail" unless="${test_if_dita}">
+        <echo message="OUTPUT__START"/>   
+        <echo>&lt;br&gt;Brakuje druku dla powiązanego obiektu ${main_build_recurse_ant.dita} &lt;/br&gt;</echo>         
+        <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"/>
+    </target>
+    
+    
+    <!-- ####  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"/>-->
+                        <exec  executable="bash" dir="." outputproperty="main_build_recurse_ant.tr_map_sed">
+                            <arg value="-c"/>
+                            <arg value="echo ${typeName_tested} |sed 's/.*://'"/><!-- tu wchodzi -DtypeName=p5_default_db:CRM_PROCES  -->
+                        </exec>
+                                                         <!-- element-default_db__x3A__CRM_PROCES__x3A__CRM_PROCES -->
+                        <property name="main_build_recurse_ant.dita" value="${simpleSchema_dir}/${namespace_prefix_p5_tr_map}/${main_build_recurse_ant.tr_map_sed}.xml"  />
+                        <echo> Ustawiam $main_build_recurse_ant.dita na ${main_build_recurse_ant.dita} ;  </echo>
+                                    
+                        <property name="main_build_recurse_ant.dita_with_id" value="${simpleSchema_dir}/${namespace_prefix_p5_tr_map}/${main_build_recurse_ant.tr_map_sed}.xml"  />
+                        <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"  />
+                        
+                        
+                        <condition property="test_if_tr_map" taskname="check_tr_map" >
+                            <available file="${main_build_recurse_ant.dita}"/>  
+                        </condition>
+                    </target>
+                    
+                    <target name="check_tr_map" depends="set_tr_map,tr_map_fail,tr_map_ok">
+                        <echo> testujemy czy jest tr_map</echo>
+                    </target>
+                    
+                    <target name="tr_map_fail" unless="${test_if_tr_map}">
+                        <echo message="OUTPUT__START"/>   
+                        <echo>&lt;br&gt;Brakuje druku dla powiązanego obiektu ${main_build_recurse_ant.dita} &lt;/br&gt;</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_tr_map"/>
+                    </target>
+                    
+                    <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-->
+                        <!--<copy file="${out_task.dita.final}" tofile="${temp}/${loop_path_recurs}/${uuid_tested}.loop_path.xml" />-->
+                        
+                        <!--<loadfile property="out_task.dita.final_no_RelatedFeatureRoot" srcfile="${out_task.dita.final}"/>-->
+                        <move file="${out_task.dita.final}" tofile="${out_task.dita.final}.xml"/>
+                        <!--<echoxml file="${out_task.dita.final}.xml">
+                            <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
+                        </echoxml>-->
+                        
+                        <!--<echo>
+                            &lt;br&gt;Wygenerowano wyjsciowy plik XML - sciagnij go &lt;a href=&quot;${webRootUrl}/${out_task.dita.final}.xml&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out_task.dita.final}.xml&lt;/a&gt;&lt;/br&gt; 
+                        </echo>-->
+                        <!--<echo message="OUTPUT__END"/>-->
+                    </target>
+    
+        <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop" depends="xml_recursed_from_tr_map" description="URL_TASK Pobierz XML obiektu">
+                        
+                        <!-- TODO proba wlaczenia rekursywnosci zapisanie wezla do sciezki w folderze-->
+                        <!--<copy file="${out_task.dita.final}" tofile="${temp}/${loop_path_recurs}/${uuid_tested}.loop_path.xml" />-->
+                        
+                        <!--<loadfile property="out_task.dita.final_no_RelatedFeatureRoot" srcfile="${out_task.dita.final}"/>-->
+                        <!--<move file="${out_task.dita.final}" tofile="${out_task.dita.final}.xml"/>-->
+                        <!--<echoxml file="${out_task.dita.final}.xml">
+                            <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
+                        </echoxml>-->
+                    <delete file="${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"/>
+                                <attribute name="http://saxon.sf.net/feature/initialMode" value="RelatedFeatureRoot"/>
+                            </factory>
+                            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+                            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+                            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+                            <param name="uuid" expression="${uuid_tested}"/>
+                            <!--<param name="basedir" expression="${basedir}"/>-->
+                            <param name="temp" expression="${temp}"/>
+                            <param name="with_RelatedFeatureLoop" expression="1"/>
+                            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+                        </xslt>
+                        <echo message="OUTPUT__START"/>
+                        <echo>
+                            &lt;br&gt;Wygenerowano wyjsciowy plik XML - sciagnij go &lt;a href=&quot;${webRootUrl}/${out_task.dita.final_with_RelatedFeatureLoop_no_path}.xml&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out_task.dita.final_with_RelatedFeatureLoop_no_path}.xml&lt;/a&gt;&lt;/br&gt; 
+                        </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" 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}) 
+                $cookie_file = ${cookie_file} </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"/> 
+        </condition>
+        <echo>Ustawiam sciezke default_db_xml_cache.public  w glownym katalogu ./default_db_xml_cache.public</echo>
+    </target>
+    
+    <target name="set_default_db_xml_cache.public_default">
+        <echo>Ustawiam sciezke default_db_xml_cache.public  zagniezdzona domyslnie ../../../default_db_xml_cache.public </echo>
+        <!--<condition property="set_default_db_xml_cache.public_default">
+            <available></available>
+        </condition>
+       -->
+    </target>
+    
+    <target name="check_set_default_db_xml_cache.public_local" depends="set_default_db_xml_cache.public_local" if="${set_default_db_xml_cache.public_local}">
+        <!--<echo> testujemy czy jest dita</echo>-->
+        <property name="default_db_xml_cache.public" value="default_db_xml_cache.public"/>
+        <property name="build_recurse_ant.xsl" value="${default_db_xml_cache.public}/build_recurse_ant.xsl"/>
+        <property name="build_recurse_ant_merge_dita_from_temp.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_merge_dita_from_temp.xsl"/>
+        <property name="builds_to_ant.xsl" value="${default_db_xml_cache.public}/builds_to_ant.xsl"/>
+        <property name="xpath_query_check_create_xsl.xsl" value="${default_db_xml_cache.public}/xpath_query_check_create_xsl.xsl"/>
+        <property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.xsl"/>
+    </target>
+    
+    <target name="check_default_db_xml_cache.public_default" depends="set_default_db_xml_cache.public_local" unless="${set_default_db_xml_cache.public_local}">
+        <echo> Ustawiamy ${basedir}/../../../default_db_xml_cache.public</echo>
+        <property name="default_db_xml_cache.public" value="${basedir}/../../../default_db_xml_cache.public"/>
+        <property name="build_recurse_ant.xsl" value="${default_db_xml_cache.public}/build_recurse_ant.xsl"/>
+        <property name="build_recurse_ant_merge_dita_from_temp.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_merge_dita_from_temp.xsl"/>
+        <property name="builds_to_ant.xsl" value="${default_db_xml_cache.public}/builds_to_ant.xsl"/>
+        <property name="xpath_query_check_create_xsl.xsl" value="${default_db_xml_cache.public}/xpath_query_check_create_xsl.xsl"/>
+        <property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.xsl"/>
+    </target>
+    
+    
+   
+    <target name="main_build_recurse_ant.dita_with_id"  if="${test_if_dita}">
+            <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>
+            <param name="namespace_prefix" expression="${namespace_prefix}"/>
+            <param name="detect_resource_type_dir" expression="${detect_resource_type_dir}"/>
+            <param name="build_complexType_dir" expression="${build_complexType_dir}"/>
+            <param name="typeName" expression="${typeName_tested}"/> <!-- do przekazania glownego elementu do wykrycia glownie buildComplexType dla filtrow, w kolejnych zaglebieniach jada po @ref -->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="main_build_recurse_ant.tr_map_with_id"  if="${test_if_tr_map}">
+        <!-- nie trzeba - korzystamy z SimpleSchema natywnymi przeksztalceniami -->
+        <!--<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}" >
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                <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}"/>
+            <param name="build_complexType_dir" expression="${build_complexType_dir}"/>
+            <param name="typeName" expression="${typeName_tested}"/> <!-\- do przekazania glownego elementu do wykrycia glownie buildComplexType dla filtrow, w kolejnych zaglebieniach jada po @ref -\->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>-->
+    </target>
+   
+   
+    <target name="clean_temp_dir" description="URL_TASK Wyczyść cache modułu ">
+        <delete includeemptydirs="yes">
+            <fileset dir="${temp}"/>
+        </delete>        
+        <echo message="OUTPUT__START"/>   
+        <echo>&lt;br&gt;Skasowano pliki tymczasowe&lt;/br&gt;</echo>         
+        <echo message="OUTPUT__END"/>
+        <antcall target="install_folders"/>
+    </target>
+    
+    
+    <target name="xpath_query.xsl_check" description="to generate xpath_query.xsl if it is set">
+        <condition taskname="xpath_query.xsl" property="xpath_query_set">
+            <or>
+                <equals arg1="${xpath_query}" arg2=""/>
+                <equals arg1="${xpath_query}" arg2="$${xpath_query}"/>
+            </or>
+        </condition>
+    </target>
+    
+    <target name="xpath_query.xsl" depends="xpath_query.xsl_check" unless="${xpath_query_set}" description="to generate xpath_query.xsl if it is set">
+        <echoxml file="${empty.xml}">
+            <empty>empty</empty>
+        </echoxml>
+        <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"/> 
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="xpath_query" expression="${xpath_query}"/>
+        </xslt>
+    </target>
+    
+    <target name="xpath_query.xsl_fail" depends="xpath_query.xsl_check" if="${xpath_query_set}" description="to generate xpath_query.xsl if it is set">
+        <echoxml file="${empty.xml}">
+            <empty>empty</empty>
+        </echoxml>
+        <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"/> 
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="xpath_query" expression="[1=1]"/>
+        </xslt>
+    </target>
+    
+    <!-- wygenerowanie ant builda do sciagniecia niezbednego elementu na podstawie template main.dita i tam zagniezdzonego RelatedFeature-->
+    <target name="build_recurse_ant.xml" depends="php_session_id_check,xpath_query.xsl,xpath_query.xsl_fail,main_build_recurse_ant.dita_with_id,main_build_recurse_ant.tr_map_with_id">
+        <!-- build do wytworzenia pierwszego przetworzenia zagniezdzen -->
+        <property name="loop_xpath"  value="root" />
+        <property name="build_recurse_ant.xml" value="${temp}/${uuid_tested}.build_${loop_xpath}.xml" />
+        <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="${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>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            
+            <param name="build_recurse_ant.xsl" expression="${build_recurse_ant.xsl}"/>
+            <param name="passwordBase64Basic" expression="${passwordBase64Basic_tested}"/>
+            <param name="url" expression="${url}" />
+            <param name="webRootUrl" expression="${webRootUrl}" /> 
+            <param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita_with_id}"/>
+            <param name="uuid" expression="${uuid_tested}"/>
+            
+            <!--<param name="out_task.dita" expression="${out_task.dita}"/>-->
+            <!--<param name="wfs_output" expression=""/>-->
+            
+            <param name="api_url" expression="${api_url}"/>
+            <!--<param name="namespace_prefix" expression="${namespace_prefix}"/>--> 
+            <param name="typeName" expression="${typeName_tested}"/> 
+            <param name="xpath" expression="${xpath_tested}"/> <!-- to be set initially like as key to search ID  -->
+            <param name="xpath_value" expression="${xpath_value_tested}"/> <!-- to be set initially like 1000 (to search ID=1000, if ID we get by featureID  -->
+            <param name="loop_xpath" expression="root"/><!-- xpath sciezki przetwarzania xmla -->
+            <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}"/>
+            <param name="cookie_curl_option" expression="${php_session_id_tested}"/>
+            <param name="loop_path_recurs" expression="${loop_path_recurs}"/>
+            <param name="ignore_maxOccurs_0" expression="${ignore_maxOccurs_0}"/>
+            <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"/>
+        <ant  antfile="${build_recurse_ant.xml}" dir="." />
+
+        <!-- pozbierac wszystkie do kupy xmle  -->
+    </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="${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>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+            <param name="uuid" expression="${uuid_tested}"/>
+            <!--<param name="basedir" expression="${basedir}"/>-->
+            <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>
+
+
+    <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="${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"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+            <param name="uuid" expression="${uuid_tested}"/>
+            <!--<param name="basedir" expression="${basedir}"/>-->
+            <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>
+    
+    <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_html" depends="xml_recursed_from_tr_map" description="URL_TASK Pobierz HTML obiektu">
+        
+        <!-- TODO proba wlaczenia rekursywnosci zapisanie wezla do sciezki w folderze-->
+        <!--<copy file="${out_task.dita.final}" tofile="${temp}/${loop_path_recurs}/${uuid_tested}.loop_path.xml" />-->
+        
+        <!--<loadfile property="out_task.dita.final_no_RelatedFeatureRoot" srcfile="${out_task.dita.final}"/>-->
+        <!--<move file="${out_task.dita.final}" tofile="${out_task.dita.final}.xml"/>-->
+        <!--<echoxml file="${out_task.dita.final}.xml">
+                            <RelatedFeatureRoot>${out_task.dita.final_no_RelatedFeatureRoot}</RelatedFeatureRoot>
+                        </echoxml>-->
+        
+        <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>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+            <param name="uuid" expression="${uuid_tested}"/>
+            <!--<param name="basedir" expression="${basedir}"/>-->
+            <param name="temp" expression="${temp}"/>
+            <param name="with_RelatedFeatureLoop" expression="true"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+        </xslt>
+        
+        <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>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+            <!--<param name="uuid" expression="${uuid_tested}"/>-->
+            <!--<param name="basedir" expression="${basedir}"/>-->
+            <!--<param name="temp" expression="${temp}"/>-->
+            <!--<param name="with_RelatedFeatureLoop" expression="true"/>-->
+        </xslt>
+        
+        
+        <echo message="OUTPUT__START"/>
+        <echo>
+            &lt;br&gt;Wygenerowano wyjsciowy plik XML - sciagnij go &lt;a href=&quot;${webRootUrl}/${out_task.dita.final_with_RelatedFeatureLoop_no_path}.html&quot; target=&quot;_blank&quot;&gt; &quot;${webRootUrl}/${out_task.dita.final_with_RelatedFeatureLoop_no_path}.html&lt;/a&gt;&lt;/br&gt; 
+        </echo>
+        <echo message="OUTPUT__END"/>
+    </target>
+    
+    
+
+    <!--<target name="build_recurse_ant_merge_dita_from_temp.xsl_with_RelatedFeatureLoop" depends="build_recurse_ant_merge_dita_from_temp.xsl" 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_with_RelatedFeatureLoop}" >
+            <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"/>
+            <!-\-<param name="webRootUrl" expression="${webRootUrl}" />-\-> 
+            <!-\-<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-\->
+            <param name="uuid" expression="${uuid_tested}"/>
+            <!-\-<param name="basedir" expression="${basedir}"/>-\->
+            <param name="temp" expression="${temp}"/>
+            <param name="with_RelatedFeatureLoop" expression="true"/>
+        </xslt>
+        <echo> zapisalem plik z zagniezdzeniami out_task.dita.final_with_RelatedFeatureLoop gotowy do utworzenia dita do ${out_task.dita.final_with_RelatedFeatureLoop}. </echo>
+    </target>-->
+
+
+
+    <target name="buildpdf_recursed" depends="install_folders,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"/>
+            <arg value="${out_task.dita.final}" />
+           <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <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.final} |sed 's/^.*\///'"/>
+        </exec>
+        <echo message="OUTPUT__START"/>        
+        <!--<echo> url = ${url} 
+        </echo>-->
+        <!--<echo> passwordBase64Basic = ${passwordBase64Basic_tested} 
+        </echo>-->
+        <!--<echo> $webRootUrl = ${webRootUrl} 
+        </echo>-->
+        <!--<echo> $wfs_output = ${wfs_output} 
+        </echo>-->
+        <echo>
+            &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.dita.final.noext}.pdf&lt;/a&gt;&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Wyślij do adresatów emailem (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Umieść swój podpis graficzny (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo message="OUTPUT__END"/>
+    </target>   
+     
+    
+    <target name="buildpdf_recursed_html5" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,check_dita" if="${test_if_dita}" description="URL_TASK Pobierz Wersję HTML">
+        <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.final}" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="html5"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        <!--<exec  executable="bash" dir="." outputproperty="out_task_file">
+            <arg value="-c"/>
+            <arg value="echo ${out_task.dita.final.html} |sed 's/^.*\///'"/>
+        </exec>-->
+        <echo message="OUTPUT__START"/>        
+        <!--<echo> url = ${url} 
+        </echo>-->
+        <!--<echo> passwordBase64Basic = ${passwordBase64Basic_tested} 
+        </echo>-->
+        <!--<echo> $webRootUrl = ${webRootUrl} 
+        </echo>-->
+        <!--<echo> $wfs_output = ${wfs_output} 
+        </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; $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}
+        </echo>
+       <!-- <echo>
+            &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Wyślij do adresatów emailem (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Umieść swój podpis graficzny (W przygotowaniu)&lt;/br&gt; 
+        </echo>-->
+        <echo message="OUTPUT__END"/>
+    </target>
+    
+    <target name="buildpdf_recursed_tocjs" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,check_dita" if="${test_if_dita}" description="URL_TASK Pobierz Dynamiczną Wersję HTML">
+        <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.final}" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="tocjs"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        <!--<exec  executable="bash" dir="." outputproperty="out_task_file">
+            <arg value="-c"/>
+            <arg value="echo ${out_task.dita.final.html} |sed 's/^.*\///'"/>
+        </exec>-->
+        <echo message="OUTPUT__START"/>        
+        <!--<echo> url = ${url} 
+        </echo>-->
+        <!--<echo> passwordBase64Basic = ${passwordBase64Basic_tested} 
+        </echo>-->
+        <!--<echo> $webRootUrl = ${webRootUrl} 
+        </echo>-->
+        <!--<echo> $wfs_output = ${wfs_output} 
+        </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;
+        </echo>
+        <!-- <echo>
+            &lt;br&gt;Dodaj do korespondencji (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Wyślij do adresatów emailem (W przygotowaniu)&lt;/br&gt; 
+        </echo>
+        <echo>
+            &lt;br&gt;Umieść swój podpis graficzny (W przygotowaniu)&lt;/br&gt; 
+        </echo>-->
+        <echo message="OUTPUT__END"/>
+    </target>
+    
+</project>

+ 42 - 23
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -34,16 +34,18 @@
     <xsl:param name="url" />
     <xsl:param name="webRootUrl" /> 
     <xsl:param name="basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
+    <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="out_task.dita"/>--> <!-- nazwa temp docelowego zrodla do wykonania pliku pdf -->
     <!--<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="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="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  -->
@@ -64,7 +66,19 @@
     <xsl:param name="xpath_query"/>
     <xsl:param name="xpath_query.xsl" required="yes"/>
     <xsl:param name="empty.xml" required="yes"/>
+    <xsl:param name="simpleSchema_dir" required="yes"/>
+    <xsl:param name="default_db_xml_cache.public" required="yes"/>
     
+    <!--<xsl:variable name="temp_current">
+        <xsl:choose>
+            <xsl:when test="$temp='temp'">
+                <xsl:value-of select="concat($recurse_ant_basedir,'/',$temp)"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="concat('temp/',$loop_path_recurs)"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>-->
     
     <!-- second step fist loop - with data -->
     <!--<xsl:param name="wfs_output.xml"/>--> <!-- to be set in second step by ant build generated by this style to fill by its data childs -->
@@ -90,8 +104,7 @@
                  to wyzwolenie powinno juz zrobic ant_buildy "dla kolejnego X'
                  to wyzwolenie korzysta z apply-templates wyzwolenia glownego, w celu przygotowania ant_build 
         -->
-    <xsl:param name="simpleSchema_dir" required="yes"/>
-    <xsl:param name="default_db_xml_cache.public" required="yes"/><xsl:template match="*"> 
+    <xsl:template match="*"> 
         <xsl:param name="typeName"  select="$typeName" />
         <xsl:param name="xpath" select="$xpath" />
         <xsl:param name="xpath_value" select="$xpath_value" />
@@ -224,7 +237,6 @@
                         <xsl:attribute name="name" select="'ignore_maxOccurs_0'"/>
                         <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
                     </xsl:element>
-                    
                     <xsl:element name="property">
                         <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
                         <xsl:attribute name="value" select="'.'"/>
@@ -233,8 +245,10 @@
                     <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:
+                    <property name="temp" value="{$temp}"/>
+                    
+                    <xsl:comment>
+                        #224 Important variables:
                         typeName=<xsl:value-of select="$typeName"/>;
                         xpath=<xsl:value-of select="$xpath"/>;
                         xpath_value=<xsl:value-of select="$xpath_value"/>;
@@ -583,8 +597,10 @@
                     <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:
+                    </xsl:element>
+                    
+                    <xsl:comment>
+                        #555 Important variables:
                         typeName=<xsl:value-of select="$typeName"/>;
                         xpath=<xsl:value-of select="$xpath"/>;
                         xpath_value=<xsl:value-of select="$xpath_value"/>;
@@ -745,7 +761,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="{$recurse_ant_basedir}/build.xml" target="xml_recursed_from_tr_map"/>
+                        <ant antfile="{$recurse_ant_basedir}/build_recurse_ant.xml" target="xml_recursed_from_tr_map"/>
                     </xsl:element>
                     <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
                     <!-- task do polaczenia zaglebien -->
@@ -810,7 +826,7 @@
         </xsl:element>
         
         <!-- wygenerujemy liste ant -->
-        <echo> #235 @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
+        <echo> #686 @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
         <fileset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="{$temp}" includes="{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.*.xml" />
         <property name="builds_to_ant{$loop_xpath_real}{@xml_id}" refid="builds_to_ant{$loop_xpath_real}{@xml_id}"/>
         <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
@@ -851,6 +867,8 @@
             <param name="xpath_query_test.xml">
                 <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
             </param>
+            <!--<param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>-->
+            
             <!--<xsl:element name="param">
                 <xsl:attribute name="name" select="'default_antfile'"/>
                 <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
@@ -1143,11 +1161,11 @@
                                             <antcall target="build_recurse_ant.{position()+1}.xml"/>
                                         </xsl:otherwise>
                                     </xsl:choose>
-                                    <echo> related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;
+                                    <echo>#1119 related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;
                                             $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"/>
@@ -1163,10 +1181,10 @@
                                             <param name="basedir" expression="{$basedir}"/>
                                             <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="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="temp" expression="{$temp}"/>
                                             <param name="builds_to_ant.xsl" expression="{$builds_to_ant.xsl}"/>
                                             <param name="cookie_curl_option" expression="{$cookie_curl_option}"/>
@@ -1176,8 +1194,9 @@
                                             <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>
+                                            <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 -->
@@ -1230,7 +1249,7 @@
         <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
         <xsl:param name="xpath_dita" required="yes"/>
         <xsl:param name="xpath_value_dita" required="yes"/>
-        <xsl:param name="RelatedFilter"/>&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose><xsl:when test="$RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message>&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;<xsl:for-each select="$RelatedFilter">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="@xpath"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="@xpath_value"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:And&gt;</xsl:when><xsl:otherwise>&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter"><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;ogc:Or&gt;</xsl:if><xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="ogc:PropertyName/text()"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="ogc:Literal/text()"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;/ogc:Or&gt;</xsl:if></xsl:if>&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;</xsl:template>
+        <xsl:param name="RelatedFilter"/>&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose><xsl:when test="$RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message>&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;<xsl:for-each select="$RelatedFilter">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="@xpath"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="@xpath_value"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:And&gt;</xsl:when><xsl:otherwise>&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter">&lt;ogc:Or&gt;<!--<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;ogc:Or&gt;</xsl:if>--><xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="ogc:PropertyName/text()"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="ogc:Literal/text()"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:Or&gt;<!--<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;/ogc:Or&gt;</xsl:if>--></xsl:if>&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;</xsl:template>
     
     <!-- second step from local ant leaf -->
     <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
@@ -1238,7 +1257,7 @@
         <RelatedFeatureRoot>
             <xsl:message>#228  @xml_id=<xsl:value-of select="@xml_id"/>; templ match RelatedFeature mode after_first_ant_assing_vars dla @typeName=<xsl:value-of select="@typeName"/>; try to open $wfs_output=doc(<xsl:value-of select="$wfs_output"/>); </xsl:message>
         <!-- first assign xpath to features from  -->
-        <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
+            <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
         <xsl:variable name="current_RelatedFeature" select="*"/>
        <xsl:variable name="xml_id" select="@xml_id"/>
         <!--<input_obj_with_xpath_debug>
@@ -1513,7 +1532,7 @@
         </xsl:variable>
         <xsl:choose>
             <xsl:when test="$test_xpath_query='1'">
-            <xsl:result-document href="{$temp}/{@xml_id}.{$uuid}.{$feature_pos}/build_root.xml" >
+                <xsl:result-document href="{$temp}/{@xml_id}.{$uuid}.{$feature_pos}/build_root.xml" >
                 <xsl:apply-templates select=".">
                     <xsl:with-param name="typeName" select="@typeName"/>
                     <xsl:with-param name="xpath" select="@xpath"/>

+ 2 - 3
SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl

@@ -180,7 +180,7 @@
                         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.dita.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.dita.xml'))">
@@ -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="$dita.map"/>
+            <xsl:with-param name="dita.map" select="$dita.map"/> <!-- bylo 1 -->
             <!--<xsl:with-param name="dita_with_id" select="$dita_with_id"/>-->
         </xsl:apply-templates>
     </xsl:template>
@@ -554,6 +554,5 @@
     </xsl:template>
     
     <xsl:template match="@xml_id|@xpath_token_filter|@xpath_token"/>
-    
         
 </xsl:stylesheet>

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

@@ -16,7 +16,8 @@
     <xsl:param name="xpath_query" required="yes"/>
     <xsl:param name="featureID_name_dita" required="yes"/>
     <xsl:param name="xpath_query_test.xml"/>
-    
+    <!--<xsl:param name="recurse_ant_basedir" required="yes"/>-->
+    <!--<xsl:param name="temp_current" required="yes"/>-->
     
     <xsl:variable name="xpath_query_test">
         <xsl:choose>

+ 9 - 0
SE/schema/default_db_xml_cache.public/dita_enter_to_ph.xsl

@@ -91,4 +91,13 @@
         </xsl:choose>
     </xsl:template>
     
+    
+    <xsl:template match="*" mode="dita_content_clean">
+        <xsl:value-of select="text()"/>
+        <xsl:apply-templates mode="dita_content_clean"/>
+    </xsl:template>
+    <xsl:template match="text()" mode="dita_content_clean">
+        <xsl:value-of select="."/>
+    </xsl:template>
+    
 </xsl:stylesheet>

+ 44 - 0
SE/schema/default_db_xml_cache.public/escaped_html_to_xml.xsl

@@ -8,10 +8,54 @@
     <xsl:output indent="yes"/>
     
     
+    <xsl:function name="system_cache__appinfo:escaped_html_to_xml">
+        <xsl:param name="html" required="yes"/>
+        <xsl:call-template name="system_cache__appinfo:escaped_html_to_xml">
+            <xsl:with-param name="html" select="$html"/>
+        </xsl:call-template>
+    </xsl:function>
     
     
+    <xsl:function name="system_cache__appinfo:enter_surround_to">
+        <xsl:param name="text" required="yes"/>
+        <xsl:param name="surround_with" required="yes"/>
+        <xsl:choose>
+            <xsl:when test=" contains(  $text,'&#10;')">
+                <xsl:for-each select="tokenize($text ,'&#10;')">
+                    <xsl:element name="{$surround_with}"><!-- to jest przetwarzane jak jest tekst lamany -->
+                        <xsl:value-of select="."/>
+                    </xsl:element>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy-of select="$text"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:function>
     
     
+    <xsl:template name="escaped_html_to_xml_and_surrounded_enter">
+        <xsl:param name="html" required="yes"/>
+        <xsl:param name="enter_surround_to" select="'br'"/>
+        <xsl:variable name="element_html" select="$html/name()"/>
+        <xsl:variable name="enter_surround_to_get" select="system_cache__appinfo:enter_surround_to($html,$enter_surround_to)"/>
+        <xsl:variable name="out">
+                    <xsl:for-each select="$enter_surround_to_get">
+                        <xsl:element name="{name()}">
+                            <xsl:copy-of select="system_cache__appinfo:escaped_html_to_xml(.)"/>
+                        </xsl:element>
+                    </xsl:for-each>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test=" count($enter_surround_to_get) &gt;1 ">
+                <xsl:copy-of select="$out/*" copy-namespaces="no"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy-of select="system_cache__appinfo:escaped_html_to_xml($html)"></xsl:copy-of>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
     
     
     <xsl:template name="system_cache__appinfo:escaped_html_to_xml">

+ 4 - 2
SE/schema/default_db_xml_cache.public/object_modeling.xsl

@@ -194,7 +194,7 @@
         <xsl:attribute name="{ name()}" select=" replace(.,$prototype_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,$new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable)"/>
     </xsl:template>
     
-    <xsl:template match="@base" mode="system_cache__appinfo:new_object_by_prototype_schema_child">
+    <xsl:template match="@base|@type" mode="system_cache__appinfo:new_object_by_prototype_schema_child">
         <xsl:param name="prototype_TargetNamespaceBindings_from_Namespace" required="yes"/>
         <xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>
         <xsl:param name="prototype_NamespacePrefix" required="yes"/>
@@ -207,6 +207,7 @@
         <xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>
         <xsl:attribute name="{ name()}" select="."/>
     </xsl:template>
+    
     <xsl:template match="@id" mode="system_cache__appinfo:new_object_by_prototype_schema_child">
       <!--  <xsl:param name="prototype_TargetNamespaceBindings_from_Namespace" required="yes"/>
         <xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>
@@ -214,7 +215,8 @@
         <xsl:attribute name="{ name()}" select="concat(substring($new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,0,15),'_',generate-id($node))"/>-->
     </xsl:template>
     
-    
+    <xsl:template match="@id" mode="system_cache__appinfo:new_object_by_prototype_schema_root"/>
+
     <xsl:template match="@name" mode="system_cache__appinfo:new_object_by_prototype_schema_root">
         <xsl:param name="prototype_TargetNamespaceBindings_from_Namespace" required="yes"/>
         <xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>