Преглед изворни кода

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda пре 9 година
родитељ
комит
0135bf919d
49 измењених фајлова са 3629 додато и 1744 уклоњено
  1. 55 5
      SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml
  2. 36 7
      SE/schema/WPS_Functions/default_db/recurse_ant/build_recurse_ant.xml
  3. 2 2
      SE/schema/WPS_Functions/get_wfs/build_get_wfs.xml
  4. 77 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/build_mapserver_gml_to_png.xml
  5. 5 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/example.sh
  6. BIN
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/Arial_Bold.ttf
  7. BIN
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/Arial_Narrow_Italic.ttf
  8. 1 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/fonts.list
  9. 180 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/genpng2.sh
  10. 41 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/projekt_3625.gfs
  11. 624 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/projekt_3625.gml
  12. 16 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/rur990_84.gfs
  13. 22 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/rur990_84.gml
  14. 46 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/swiatlowody.gfs
  15. 88 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/swiatlowody.gml
  16. 379 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/test2.gml
  17. 19 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/gml_layer.map.inc
  18. 31 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/head.map.inc
  19. 22 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/page.map.inc
  20. 24 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/tail.map.inc
  21. 14 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/wms_layer.map.inc
  22. 121 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/przywidz-test.map
  23. 93 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/map/wfs2048.map
  24. 109 0
      SE/schema/WPS_Functions/mapserver_gml_to_png/mapserver_gml_to_png.xsl
  25. 0 759
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build.xml
  26. 1 0
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build.xml
  27. 102 22
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build_recurse_ant.xml
  28. 37 9
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build_recurse_ant.xml
  29. 0 2
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/out/.htaccess
  30. 0 761
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build.xml
  31. 1 0
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build.xml
  32. 100 21
      SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build_recurse_ant.xml
  33. 459 0
      SE/schema/build.xml
  34. 35 0
      SE/schema/default_db_xml_cache.public/appinfo.xsd
  35. 86 10
      SE/schema/default_db_xml_cache.public/build_ant_universal_by_xsl_match.xsl
  36. 78 70
      SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl
  37. 7 0
      SE/schema/default_db_xml_cache.public/build_recurse_ant_loop_path_maintain.xsl
  38. 52 2
      SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl
  39. 29 3
      SE/schema/default_db_xml_cache.public/build_recurse_ant_xsl_xpath_filter.xsl
  40. 6 6
      SE/schema/default_db_xml_cache.public/builds_to_ant.xsl
  41. 4 3
      SE/schema/default_db_xml_cache.public/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl
  42. 215 45
      SE/schema/default_db_xml_cache.public/default_db/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI_tree_to_dita.xsl
  43. 122 0
      SE/schema/default_db_xml_cache.public/default_db/enter_to_ph.xsl
  44. 90 0
      SE/schema/default_db_xml_cache.public/default_db/images/images.xsl
  45. 14 0
      SE/schema/default_db_xml_cache.public/default_db/tree_to_dita.xsl
  46. 104 11
      SE/schema/default_db_xml_cache.public/main_build_recurse_ant.dita_with_id.xsl
  47. 1 1
      SE/schema/default_db_xml_cache.public/object_modeling.xsl
  48. 47 1
      SE/schema/default_db_xml_cache.public/system_cache__appinfo/TargetNamespaceBindings.xsl
  49. 34 4
      SE/schema/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl

+ 55 - 5
SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml

@@ -132,7 +132,7 @@
             <param name="properties.xml" expression="${properties.xml}"/>
             <param name="properties_override.xml" expression="${properties_override.xml}"/>
             <param name="parallel" expression="1"/>
-            <param name="threadCount" expression="10"/>
+            <param name="threadCount" expression="4"/>
             <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
         </xslt>
         <echo> should ant build be generated $default_db:PROCES_INIT:tree.raport.xml in ${default_db:PROCES_INIT:tree.raport.xml} </echo>
@@ -167,7 +167,7 @@
             <param name="properties.xml" expression="${properties.xml}"/>
             <param name="properties_override.xml" expression="${properties_override.xml}"/>
             <param name="parallel" expression="1"/>
-            <param name="threadCount" expression="10"/>
+            <param name="threadCount" expression="3"/>
             <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
         </xslt>
     </target>
@@ -213,17 +213,61 @@
             <param name="properties.xml" expression="${properties.xml}"/>
             <param name="properties_override.xml" expression="${properties_override.xml}"/>
             <param name="parallel" expression="1"/>
-            <param name="threadCount" expression="10"/>
+            <param name="threadCount" expression="3"/>
             <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
         </xslt>
     </target>
     
     
     
-    <target name="default_db:PROCES_INIT:tree:dita" depends="read_build_properties" description="To create .dita file by using PROCES_INIT_tree_to_dita.xsl">
+    <target name="default_db:PROCES_INIT:tree:dita" depends="read_build_properties" description="To create .dita file by using tree_to_dita.xsl which includes PROCES_INIT_tree_to_dita.xsl and also PROJECTS etc. ">
         <delete dir="${CRM_PROCES_tree_basedir.temp}/${uuid}" />
         <mkdir dir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
         <property name="uuid" value="${uuid}"/> <!-- to be set from param -->
+        
+        <tempfile prefix="postprocess_modules.xml" suffix=".xml" property="postprocess_modules.xml" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
+        <!-- todo cos takiego musi sie jakos generowac ogolnie jako mapping do modulow do odpalenia w postprocessingu -->
+        <echoxml file="${postprocess_modules.xml}">
+            <postprocess_modules>
+                <gml_to_image>
+                    <ant antfile="${mapserver_gml_to_png}" > <!-- inheritall="false" -->
+                        <property name="srcfile" value="@srcfile"/>
+                        <property name="dstfile" value="@dstfile"/>
+                        <property name="fileindex" value="@fileindex"/>
+                        <property name="ditadir" value="@ditadir"/>
+                    </ant>
+                </gml_to_image>
+            </postprocess_modules>
+        </echoxml>
+        
+        <tempfile prefix="preprocess" suffix=".xml" property="preprocess" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/> <!-- mainly for gml images - may be more than one ! -->
+        <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${tree_to_dita.xsl}" in="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"  out="${preprocess}"  >
+            <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="preprocess"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
+            <param name="uuid" expression="${uuid}"/>
+        </xslt>
+        
+        <tempfile prefix="build_preprocess" suffix=".xml" property="build_preprocess" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
+        <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${postprocess.xsl}" in="${preprocess}"  out="${build_preprocess}">
+            <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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}preprocess"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
+            <param name="uuid" expression="${uuid}"/>
+            <param name="postprocess_modules.xml" expression="${postprocess_modules.xml}"/>
+            <param name="basedir" expression="${basedir}"/>
+        </xslt>
+        
+        <ant antfile="${build_preprocess}"/>
+        
+        
+        
         <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${tree_to_dita.xsl}" in="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"  out="${CRM_PROCES_tree_basedir.temp}/${uuid}/${uuid}.ditamap"  force="true">
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -232,10 +276,12 @@
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
             <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
             <param name="uuid" expression="${uuid}"/>
+            <param name="preprocess" expression="${preprocess}"/> <!-- to use mainly for merge images -->
         </xslt>
         
-        <tempfile prefix="postprocess" suffix=".xml" property="postprocess" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
+
         
+        <tempfile prefix="postprocess" suffix=".xml" property="postprocess" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
         <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${tree_to_dita.xsl}" in="${default_db:recurse_ant_basedir.out}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"  out="${postprocess}"  >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -245,6 +291,8 @@
             <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
             <param name="uuid" expression="${uuid}"/>
         </xslt>
+        
+        
         <tempfile prefix="build_postprocess" suffix=".xml" property="build_postprocess" destdir="${CRM_PROCES_tree_basedir.temp}/${uuid}"/>
         
         <xslt basedir="${CRM_PROCES_tree_basedir.temp}" style="${postprocess.xsl}" in="${postprocess}"  out="${build_postprocess}">
@@ -255,6 +303,8 @@
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
             <param name="temp" expression="${CRM_PROCES_tree_basedir.temp}"/>
             <param name="uuid" expression="${uuid}"/>
+            <param name="postprocess_modules.xml" expression="${postprocess_modules.xml}"/>
+            <param name="basedir" expression="${basedir}"/>
         </xslt>
         
         <ant antfile="${build_postprocess}"/>

+ 36 - 7
SE/schema/WPS_Functions/default_db/recurse_ant/build_recurse_ant.xml

@@ -62,7 +62,8 @@
     
     <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/  -->
+    <!-- DO NOT SET --><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/  -->
+    <!-- DO NOT SET --><property name="parallel_pos" value="1"/>
     <!--<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"/>
@@ -88,7 +89,11 @@
     <property name="get_wfs_basedir" location="${default_db:recurse_ant_basedir}/../../get_wfs"/>
     <property name="get_wfs" location="${get_wfs_basedir}/build_get_wfs.xml"/>
     
-    <property name="parallel_pos" value="1"/>
+    <property name="build_CRM_PROCES_tree" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree/build_CRM_PROCES_tree.xml"/>
+    <property name="CRM_PROCES_tree_basedir" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree"  />                         
+    <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp"  />
+    
+    <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>
     
     <!--<echo>#93 $typeName= ${typeName};  $xpath= ${xpath};  $xpath_value= ${xpath_value}  </echo>-->
 
@@ -347,10 +352,31 @@
                         <echo message="OUTPUT__END"/>
          </target>
    
-    <!-- #### eof tr_map #### -->
-    
-    
-    <!-- ### php_session_id ### -->
+    <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_tree_to_dita" depends="xml_recursed_from_tr_map_with_RelatedFeatureLoop" description="URL_TASK Wygeneruj druk z obiektu uzywajac styli systemowych">
+        
+        <ant antfile="${build_CRM_PROCES_tree}" target="default_db:PROCES_INIT:tree:dita" inheritall="false">
+            <property name="uuid" value="${uuid}"/>
+        </ant>
+        
+        <exec executable="${dita.dir}" dir=".">
+            <arg value="-i"/>
+            <arg value="${CRM_PROCES_tree_basedir.temp}/${uuid}/${uuid}.ditamap" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="pdf"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        
+        <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>
+   
+   
     
         <target name="php_session_id_cond">
             <condition property="php_session_id_fail" taskname="php_session_id_check">
@@ -523,6 +549,9 @@
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
             <param name="xpath_query" expression="[1=1]"/>
             <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+            <param name="typeName" expression="${typeName}"/>
+            <param name="namespace_prefix_p5_tr_map" expression="${namespace_prefix_p5_tr_map}"/>
         </xslt>
     </target>
     
@@ -711,7 +740,7 @@
 
 
     <target name="buildpdf_recursed" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,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}" />

+ 2 - 2
SE/schema/WPS_Functions/get_wfs/build_get_wfs.xml

@@ -119,7 +119,7 @@
         <tempfile destdir="${get_wfs_basedir.temp}" suffix=".xml" prefix="Filter_ok" property="Filter.xml"/>
         <echoxml file="${Filter.xml}"></echoxml>
         <loadfile property="Filter.xml_file" srcfile="${Filter.xml}"/>-->
-        <property name="Filter" value="&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:PropertyIsLike&gt;&lt;ogc:PropertyName&gt;${xpath}&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;${xpath_value}&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsLike&gt;&lt;/ogc:Filter&gt;"/>
+        <property name="Filter" value="&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;${xpath}&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;${xpath_value}&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;&lt;/ogc:Filter&gt;"/>
     </target>
     
     <target name="Filter_fail" if="${Filter_cond}">
@@ -128,7 +128,7 @@
 
     <target name="GetFeature" description="URL_TASK Target GetFeature" depends="read_build_properties,Filter_check">
         <property name="get_url" value="${api_url}/${namespace_prefix}?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;typeName=${typeName}&amp;${Filter}"/>
-        <echo message="FETCHING '${get_url}'" level="debug"/>
+        <echo message="FETCHING '${get_url}'" /> <!-- level="debug" -->
         <tstamp>
             <format property="wfs.timestamp" pattern="yyyy-MM-dd HH:mm:ss"/>
         </tstamp>

+ 77 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/build_mapserver_gml_to_png.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." name="mapserver_gml_to_png" default="gml_to_image">
+  <description>to use from to dita conversion from xsl/ant to generate png maps</description>
+    
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
+    <!-- eof modules WPS_Functions  -->
+    
+    
+    <!-- local shared module individual properties should contain ${project.name} basedir ant its .temp -->
+    <property name="mapserver_gml_to_png" location="${basedir}/WPS_Functions/mapserver_gml_to_png/build_mapserver_gml_to_png.xml"/>
+    <property name="mapserver_gml_to_png_basedir" location="${basedir}/WPS_Functions/mapserver_gml_to_png"  />                         
+    <property name="mapserver_gml_to_png_basedir.temp" location="${mapserver_gml_to_png_basedir}/temp"  />
+    <!-- eof shared local module individual properties -->
+    
+    <!-- local individual module properties -->
+    <property name="genpng2.sh" location="${mapserver_gml_to_png_basedir}/map/genpng2.sh"/>
+    <property name="shp2img" value="/opt/local/bin/shp2img"/>
+    <property name="PATH_ADD" value="/opt/local/bin:/usr/bin:/bin"/>
+    
+    <property name="mapserver_gml_to_png:raster.NAME" location="Otomin"/><!-- to be dynamic -->
+    <property name="mapserver_gml_to_png:raster.TYPE" location="RASTER"/>
+    <property name="mapserver_gml_to_png:raster.CONNECTION" location="http://127.0.0.1:34580/wms/.single/33"/> <!-- to be dynamic -->
+    <property name="mapserver_gml_to_png:raster.CONNECTIONTYPE" location="WMS"/>
+    <property name="mapserver_gml_to_png:raster.EXTENT" location="6532395.136830 6020410.877370 6535394.317350 6022987.616550"/>
+    <property name="mapserver_gml_to_png:raster.PROJECTION" location="init=epsg:2177"/>
+    
+    
+    <target name="mapserver_gml_to_png:create_tempdir">
+        <mkdir dir="${mapserver_gml_to_png_basedir.temp}"/>
+    </target>
+    
+    <target name="read_build_properties" depends="mapserver_gml_to_png:create_tempdir">
+        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
+        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+    </target>
+    
+    
+    <target name="gml_to_image" depends="mapserver_gml_to_png:create_tempdir" description="To convert gml2image">
+        <property name="srcfile" value="${srcfile}"/>
+        <property name="dstfile" value="${dstfile}"/>
+        <property name="fileindex" value="${fileprefix}"/> <!-- to uniq name -->
+        <property name="ditadir" value="${ditadir}"/>
+        <property name="images.xml" value="${mapserver_gml_to_png_basedir}/map/images.xml"/> 
+        <!-- contains info about images 
+         <image x="1" y="1">
+            <xmin>6524926.16944566666666666690</xmin>
+            <ymin>6012771.75580466666666666690</ymin>
+            <xmax>6525264.83611233333333333310</xmax>
+            <ymax>6013110.42247133333333333310</ymax>
+            <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
+        </image> -->
+        
+        <echo>
+            gml_to_image - i get properties: $srcfile ${srcfile} $dstfile ${dstfile} $fileindex ${fileindex}
+        </echo>
+        <exec executable="${genpng2.sh}" dir="${mapserver_gml_to_png_basedir}/map">
+            <arg line="-s 1000"/>
+            <arg line="-g ${srcfile}"/>
+            <arg line="-w &quot;https://biuro.biall-net.pl/wms/rastry|Przywidz_Jesionowa&quot; &quot;https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_lin&quot; &quot;https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_textx&quot; &quot;http://mapy.geoportal.gov.pl/wss/service/img/guest/ORTO/MapServer/WMSServer|Raster&quot;"/> <!--  &quot;http://mapy.geoportal.gov.pl/wss/service/img/guest/ORTO/MapServer/WMSServer|Raster&quot;-->
+            <env key="PATH" path="$PATH:${PATH_ADD}"/>
+        </exec>
+        
+        <move file="${images.xml}" tofile="${dstfile}"/>
+        <mkdir dir="${ditadir}/${fileindex}"/>
+        <move todir="${ditadir}/${fileindex}" >
+            <fileset dir="${mapserver_gml_to_png_basedir}/map">
+                <include name="image-*"/>
+            </fileset>
+        </move>
+    </target>
+    
+    
+    
+</project>

+ 5 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/example.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#./genpng2.sh -s 2000 -g gml/projekt_3625.gml -w "https://biuro.biall-net.pl/wms/rastry|Przywidz_Jesionowa" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_lin" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_textx"
+#./genpng2.sh -s 2000 -g gml/rur990_84.gml -w "https://biuro.biall-net.pl/wms/rastry|Przywidz_Jesionowa" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_lin" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_textx"
+./genpng2.sh -s 2000 -g /Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/default_db/CRM_PROCES_tree/temp/IN7_MK_BAZA_DYSTRYBUCJI_ALL_ID3161_07_0247/990_Rozdzielcza_rurociag_wsg84_DRAFT.gml -w "https://biuro.biall-net.pl/wms/rastry|Przywidz_Jesionowa" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_lin" "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_textx"

BIN
SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/Arial_Bold.ttf


BIN
SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/Arial_Narrow_Italic.ttf


+ 1 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/fonts/fonts.list

@@ -0,0 +1 @@
+arial   Arial_Bold.ttf

+ 180 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/genpng2.sh

@@ -0,0 +1,180 @@
+#!/bin/sh
+
+#echo executed ${0} {$1} ${2} ${3} ${4}
+#echo path $PATH
+
+SIZE=800 # szerokosc i wysokosc obrazka
+DPI=120 # rozdzielczosc w DITA - nie ruszac
+SCALE=500 # domyslna skala
+BORDER=5 # liczba metrow, o ktora nalezy powiekszyc zasieg z kazdej strony wzgledem danych wejsciowych
+BORDER_CUT="5"
+
+IMAGE_FILE="${PWD}/image" # nazwa plikow obrazow wraz ze sciezka - sam prefix (zostana dodane oznaczenia wspolrzednych kafelkow oraz dodane rozszerzenie)
+XML_FILE="${PWD}/images.xml" # nazwa wynikowego pliku XML wraz ze sciezka
+FONT_DIR="${PWD}/fonts"
+
+MAP_SCHEMA_DIR="./map_schema"
+MAP_SCHEMA_HEAD="${MAP_SCHEMA_DIR}/head.map.inc"
+MAP_SCHEMA_TAIL="${MAP_SCHEMA_DIR}/tail.map.inc"
+MAP_SCHEMA_GML="${MAP_SCHEMA_DIR}/gml_layer.map.inc"
+MAP_SCHEMA_WMS="${MAP_SCHEMA_DIR}/wms_layer.map.inc"
+
+
+error() {
+	echo '<?xml version="1.0" encoding="UTF-8"?>'
+	echo "<Error>${1}</Error>"
+	exit 1
+}
+usage() {
+	cat >&2 << EOT
+Usage: ${0} -g|--gml FILE [OPTION]...
+
+ FILE - GML input file
+
+Options:
+ -s, --scale SCALE		Scale, defult 500 (means 1:500)
+ -b, --border METERS		Size of border in meters that will be added
+				  around GML data (default 5)
+ -cb, --cut-border METERS	Size of additional border in meters
+				  while splitting image (default 5)
+ -w, --wms WMS_LAYER[s]		URLs and layer names (as following arguments)
+				  of external WMS layers (URL|LAYER_NAME)
+
+Example:
+
+ ${0} -g gml/projekt_3625.gml -s 500 -w "https://biuro.biall-net.pl/wms/rastry|Przywidz_Jesionowa" \\
+    "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_lin" \\
+    "https://biuro.biall-net.pl/wms/podklady|MDCP_Przywidz_osiedle_jesionowa_textx"
+EOT
+	exit 1
+}
+
+declare -a WMS=()
+while [ "${1}" ]; do
+	case ${1} in
+		"-s"|"--scale")
+			PARAM="scale"
+			;;
+		"-b"|"--border")
+			PARAM="border"
+			;;
+		"-cb"|"--cut-border")
+			PARAM="cut_border"
+			;;
+		"-g"|"--gml")
+			PARAM="gml"
+			;;
+		"-w"|"--wms")
+			PARAM="wms"
+			;;
+		*)
+			case ${PARAM} in
+				"scale")
+					SCALE=${1}
+					;;
+				"border")
+					BORDER=${1}
+					;;
+				"cut_border")
+					CUT_BORDER={1}
+					;;
+				"gml")
+					FILE=${1}
+					;;
+				"wms")
+					WMS+=("${1}")
+					;;
+				*)
+					usage
+					;;
+			esac
+	esac
+	shift
+done
+
+if [ -z "${FILE}" ]; then
+	usage
+fi
+
+if [ ! -e ${FILE} ]; then
+	error "File ${FILE} not found."
+fi
+
+
+TMP=`mktemp -d`
+
+size=`echo "${SIZE}/${DPI}*2.54*${SCALE}/100" | bc -l`
+size_cut=`echo "${size} - ${BORDER_CUT}" | bc -l`
+
+ogr2ogr -t_srs EPSG:2177 ${TMP}/2177.shp ${FILE} 2>/dev/null
+extent=(`ogrinfo -al -so ${TMP}/2177.shp | grep Extent | sed 's/[()]/|/g;s/, /|/g' | awk -F '|' '{print $2,$3,$5,$6}'`)
+xmin=${extent[0]}
+ymin=${extent[1]}
+xmax=${extent[2]}
+ymax=${extent[3]}
+echo "Project extent: ${xmin} ${ymin} ${xmax} ${ymax}"
+
+xmin=`echo "${xmin} - 5" | bc -l`
+ymin=`echo "${ymin} - 5" | bc -l`
+xmax=`echo "${xmax} + 5" | bc -l`
+ymax=`echo "${ymax} + 5" | bc -l`
+echo "New extent after 5m border added: ${xmin} ${ymin} ${xmax} ${ymax}"
+
+lx=`echo "(${xmax} - ${xmin} - ${BORDER_CUT}) / ${size_cut} + ((${xmax} - ${xmin} - ${BORDER_CUT}) % ${size_cut} > 0)" | bc`
+ly=`echo "(${ymax} - ${ymin} - ${BORDER_CUT}) / ${size_cut} + ((${ymax} - ${ymin} - ${BORDER_CUT}) % ${size_cut} > 0)" | bc`
+echo "Images count (width x height): ${lx}x${ly}"
+
+xmin=`echo "${xmin} - (${lx} * ${size_cut} + ${BORDER_CUT} - (${xmax} - ${xmin})) / 2" | bc -l`
+ymin=`echo "${ymin} - (${ly} * ${size_cut} + ${BORDER_CUT} - (${ymax} - ${ymin})) / 2" | bc -l`
+xmax=`echo "${xmin} + ${lx} * ${size_cut} + ${BORDER_CUT}" | bc -l`
+ymax=`echo "${ymin} + ${ly} * ${size_cut} + ${BORDER_CUT}" | bc -l`
+echo "New extent after centering project features: ${xmin} ${ymin} ${xmax} ${ymax}"
+
+MAP="${TMP}/map.map"
+EXTENT="${xmin} ${ymin} ${xmax} ${ymax}"
+
+sed "s/__EXTENT__/${EXTENT}/g;s|__FONT_DIR__|${FONT_DIR}|g" ${MAP_SCHEMA_HEAD} > ${MAP}
+
+if [ ${#WMS[@]} -gt 0 ]; then
+	for i in `seq 0 $[${#WMS[@]}-1]`; do
+		URL=`echo ${WMS[i]} | cut -d '|' -f 1`
+		LAYER_NAME=`echo ${WMS[i]} | cut -d '|' -f 2`
+		sed "s|__URL__|${URL}|g;s|__EXTENT__|${EXTENT}|g;s|__LAYER_NAME__|${LAYER_NAME}|g" ${MAP_SCHEMA_WMS} >> ${MAP}
+	done
+fi
+
+sed "s|__GML_FILE__|${FILE}|g" ${MAP_SCHEMA_GML} >> ${MAP}
+cat ${MAP_SCHEMA_TAIL} >> ${MAP}
+
+echo '<?xml version="1.0" encoding="UTF-8"?>
+<images>' > ${XML_FILE}
+for y in `seq 1 ${ly}`; do
+	for x in `seq 1 ${lx}`; do
+		printf "Generating ${x}x${y} "
+		lxmin=`echo "${xmin} + ${size_cut} * (${x} -1)" | bc -l`
+		lymin=`echo "${ymin} + ${size_cut} * (${y} -1)" | bc -l`
+		lxmax=`echo "${lxmin} + ${size}" | bc -l`
+		lymax=`echo "${lymin} + ${size}" | bc -l`
+		printf "(BBOX: ${lxmin} ${lymin} ${lxmax} ${lymax})..."
+		file="${IMAGE_FILE}-${y}-${x}.png"
+		count=`ogrinfo -so -al -spat ${lxmin} ${lymin} ${lxmax} ${lymax} ${TMP}/2177.shp | grep "Feature Count:" | sed 's/.*: //g'`
+		if [ ${count} -gt 0 ]; then
+			echo "<image x=\"${x}\" y=\"${y}\">" >> ${XML_FILE}
+			echo "  <xmin>${lxmin}</xmin>" >> ${XML_FILE}
+			echo "  <ymin>${lymin}</ymin>" >> ${XML_FILE}
+			echo "  <xmax>${lxmax}</xmax>" >> ${XML_FILE}
+			echo "  <ymax>${lymax}</ymax>" >> ${XML_FILE}
+			echo "  <file>${file}</file>" >> ${XML_FILE}
+			echo "</image>" >> ${XML_FILE}
+			shp2img -m "${MAP}" -o ${file} -e ${lxmin} ${lymin} ${lxmax} ${lymax}
+			echo " done."
+		else
+			echo " no features found - skipping."
+		fi
+	done
+done
+echo '</images>' >> ${XML_FILE}
+echo "===== XML (${XML_FILE}) ====="
+cat ${XML_FILE}
+
+rm -rf ${TMP}

+ 41 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/projekt_3625.gfs

@@ -0,0 +1,41 @@
+<GMLFeatureClassList>
+  <GMLFeatureClass>
+    <Name>Rozdzielcza_Kabel_Swiatlowodowy_wsg84</Name>
+    <ElementPath>Rozdzielcza_Kabel_Swiatlowodowy_wsg84</ElementPath>
+    <!--LINESTRING-->
+    <GeometryType>2</GeometryType>
+    <SRSName>EPSG:4326</SRSName>
+    <DatasetSpecificInfo>
+      <FeatureCount>61</FeatureCount>
+      <ExtentXMin>18.31115</ExtentXMin>
+      <ExtentXMax>18.31382</ExtentXMax>
+      <ExtentYMin>54.19046</ExtentYMin>
+      <ExtentYMax>54.19164</ExtentYMax>
+    </DatasetSpecificInfo>
+    <PropertyDefn>
+      <Name>ID</Name>
+      <ElementPath>ID</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ID_KORESP_ZGL_ODB</Name>
+      <ElementPath>ID_KORESP_ZGL_ODB</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ZapasA</Name>
+      <ElementPath>ZapasA</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ZapasB</Name>
+      <ElementPath>ZapasB</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>POZIOM_OD</Name>
+      <ElementPath>POZIOM_OD</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+  </GMLFeatureClass>
+</GMLFeatureClassList>

+ 624 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/projekt_3625.gml

@@ -0,0 +1,624 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db" xsi:schemaLocation="https://biuro.biall-net.pl/wfs/default_db https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;TYPENAME=p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84&amp;REQUEST=DescribeFeatureType">
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.479">
+   <p5_default_db:ID>479</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.313332505107816 54.191345508757905,18.313327963329538 54.19133058635441,18.313331953497446 54.1912725706166,18.31334435944242 54.1912537082519</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.478">
+   <p5_default_db:ID>478</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31334355745417 54.1912466300343,18.313339112269343 54.19124311644154,18.313346784913836 54.191184008935025,18.313355241395946 54.19117972197224</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.477">
+   <p5_default_db:ID>477</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3138094958182 54.1908639298036,18.313800898571532 54.19086790453481,18.313790696199938 54.19094354101525,18.313796287009 54.1909503449256</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.476">
+   <p5_default_db:ID>476</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3138234002232 54.1907930952708,18.313812205076342 54.19080591778112,18.31380482126028 54.19085226928023,18.3138089002325 54.1908615601196</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.475">
+   <p5_default_db:ID>475</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3134120132672 54.190778583793,18.31340813804628 54.190784249572076,18.31340677875159 54.19083696506769,18.3134113448736 54.1908429476347</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.474">
+   <p5_default_db:ID>474</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.313413266561824 54.190707888453176,18.31340846442573 54.19071160517772,18.313406074038287 54.19077274529786,18.3134137256426 54.190775869355</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.473">
+   <p5_default_db:ID>473</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3130180339204 54.1906979698406,18.313011743092346 54.190703132530324,18.31300498190259 54.19075458758649,18.313008682631 54.1907599850046</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.472">
+   <p5_default_db:ID>472</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.313028497155436 54.19062327559344,18.31301971380237 54.19063075045791,18.313014619821374 54.19068778802068,18.3130185910707 54.1906952584097</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.471">
+   <p5_default_db:ID>471</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312603418243942 54.19059251456546,18.31259382940158 54.19059966043724,18.312587536883264 54.19066502232906,18.312597565042743 54.19066876624536</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.470">
+   <p5_default_db:ID>470</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3126110238968 54.1905118600777,18.31260227731055 54.19051681367834,18.312597162113146 54.19058057298561,18.3126033818997 54.1905876975188</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.469">
+   <p5_default_db:ID>469</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311261244935 54.1909764281827,18.311256434871694 54.19098560814023,18.311251682222444 54.1910265902164,18.3112571555583 54.1910379038707</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.468">
+   <p5_default_db:ID>468</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311276414020927 54.19086916857417,18.31126494516023 54.19087450119322,18.31125660158361 54.19096756606098,18.311265694859237 54.19097429182288</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.467">
+   <p5_default_db:ID>467</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3117027627823 54.1910063958447,18.31169658306172 54.191014441444125,18.31169460107094 54.19104817949226,18.311696103774764 54.191052503010006,18.311698620492 54.1910567849347</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.466">
+   <p5_default_db:ID>466</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311711270389 54.1909352656024,18.311701339522422 54.19094326646578,18.31169843612181 54.190998396993436,18.3117027373944 54.1910030212825</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.465">
+   <p5_default_db:ID>465</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3121525490631 54.1910216223197,18.312145616355167 54.191031740687606,18.312143935235323 54.191064384706976,18.3121496676397 54.1910756238315</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.464">
+   <p5_default_db:ID>464</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3121533275311 54.1910158352262,18.312145061644667 54.19100717902868,18.31214904626053 54.19095028211979,18.3121601793668 54.1909432629725</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.463">
+   <p5_default_db:ID>463</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3128382274886 54.1913583203725,18.31282906046666 54.19136820361623,18.3128272337795 54.19143675200635,18.3128339666629 54.1914465939632</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.462">
+   <p5_default_db:ID>462</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3128390975685 54.1913549031939,18.312831654164725 54.191347891313285,18.31283568715392 54.191278855713854,18.3128433841598 54.191270044454</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.461">
+   <p5_default_db:ID>461</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312310042113523 54.19144616910618,18.312297603813434 54.19145323373631,18.312285173825902 54.19152769204746,18.31230272132566 54.191535557995614</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.460">
+   <p5_default_db:ID>460</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312309263921584 54.191442361914135,18.312297476816227 54.19143638563942,18.312301341759415 54.191385683833865,18.312318774344735 54.19137831324</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.459">
+   <p5_default_db:ID>459</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311820905143197 54.19142898026884,18.311803917813897 54.191436928791965,18.311799248764725 54.191501339761935,18.31180802814584 54.19150898910916</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.458">
+   <p5_default_db:ID>458</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311821684020554 54.19142711835726,18.311808147404253 54.19141948132357,18.31181182833224 54.191381808909846,18.311825609145934 54.191369218945894</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.457">
+   <p5_default_db:ID>457</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3113101679787 54.1914131687362,18.311298808680764 54.19140768202409,18.311303759918303 54.19134881073537,18.3113170484148 54.1913405711614</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.456">
+   <p5_default_db:ID>456</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:ZapasA>15</p5_default_db:ZapasA>
+   <p5_default_db:ZapasB>15</p5_default_db:ZapasB>
+   <p5_default_db:POZIOM_OD>-1</p5_default_db:POZIOM_OD>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311312705257343 54.19141542573787,18.311294905155535 54.19141837492483,18.31129049557613 54.191490385474694,18.311301412942047 54.19149384109526</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.429">
+   <p5_default_db:ID>429</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.313017449707516 54.19069771039796,18.313032246042212 54.19055829432102,18.312885611131723 54.19055299279718,18.31285434431945 54.19079684756703,18.312856321662068 54.19080725097364,18.31290183533304 54.19086930051092,18.31320989295165 54.19094432772223,18.313197002651975 54.191065859696536,18.313195822551176 54.1910794001483,18.313275540783092 54.191090188602985</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.428">
+   <p5_default_db:ID>428</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31260633852972 54.19058843563286,18.312616614519587 54.190460911124276,18.31255375921189 54.19045881798084,18.31252295858539 54.190455889577926,18.31248768653127 54.19045522899617,18.312479906695582 54.19052895271524,18.31246686353565 54.19073776951159,18.31246618106014 54.19078386961793,18.312550745563737 54.19082433518173,18.312612111882924 54.190798981384326,18.31278818035685 54.19083532150652,18.312887912571824 54.19085896371946,18.31320637469881 54.190935681063166,18.313221705368814 54.19094066868177,18.313207994294984 54.19107786435106,18.313274757581762 54.1910878437993</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.427">
+   <p5_default_db:ID>427</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312156732657318 54.19101486670307,18.312165354697946 54.19090467434347,18.312042441241942 54.19090014251549,18.31204671587927 54.190840196181,18.312110248455717 54.19080434760366,18.312530433251855 54.19082439154349,18.312612898226828 54.190792304497585,18.31278921980227 54.19082857017858,18.312853145059727 54.190843285206896,18.313233104580032 54.190935854680035,18.313227600375427 54.19098922176904,18.313219380709292 54.191074122558376,18.313276171948694 54.19108436829197</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.426">
+   <p5_default_db:ID>426</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31170748193751 54.19099314198211,18.31171662787206 54.19088681145341,18.311596767996846 54.190882617715644,18.311600433571627 54.19083306637117,18.31169307927456 54.19077804825752,18.31236884892254 54.19081102773477,18.31252632842714 54.19081762983382,18.31261273201473 54.19078403560475,18.31284642692877 54.19083447283331,18.31296848459179 54.19086423888686,18.313245359226983 54.19093120622015,18.31323165109467 54.19106988991957,18.313277294015524 54.191084076819266</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.425">
+   <p5_default_db:ID>425</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.311266694847408 54.190969359940425,18.311278298380167 54.19086225737336,18.311153022790663 54.19085809777712,18.31115511001767 54.19082136904704,18.31117510201104 54.190809231041214,18.311581620874275 54.190818534481096,18.311666319283884 54.19076911997736,18.31194939930092 54.190782938071095,18.312523830436923 54.19081055080767,18.312609826835605 54.190776722369684,18.312979087151255 54.19085925726594,18.31325784817953 54.19092678273186,18.31325509085679 54.190952773397434,18.313242375697456 54.19106817317934,18.313277933741276 54.1910829779242</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.424">
+   <p5_default_db:ID>424</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.313282739322055 54.191093528359296,18.313263732509327 54.191071420786,18.313274998519848 54.19096259167035,18.313279463518548 54.190921382504435,18.313286378494293 54.19084385863752,18.3132990151083 54.190649413891535,18.313418815748925 54.19065134890219,18.313415653559872 54.19077999491407</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.423">
+   <p5_default_db:ID>423</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31328516762758 54.191078877667856,18.31329746177048 54.19106406686029,18.313313556848094 54.19096129997439,18.31341130775111 54.190963191516005,18.31356957225633 54.190955128270545,18.313701429102984 54.190952017772865,18.31373334855182 54.190763915424114,18.313822143697028 54.19076638758141,18.3138132780567 54.190858826986435</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.422">
+   <p5_default_db:ID>422</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31334623781659 54.191256294226164,18.313323146451488 54.19146655778432,18.3132268888864 54.19146706184251,18.313171294845066 54.1914301656032,18.313185302641866 54.19125526526514,18.31319648146344 54.19110151845141,18.313275855330335 54.191087995661086</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.421">
+   <p5_default_db:ID>421</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312838875436757 54.19136195485036,18.312831155955468 54.19153747336511,18.3128742239359 54.191556678945695,18.31306054757245 54.191522391246146,18.31318422073134 54.19142777536027,18.31319291770855 54.19130736423746,18.31320342869196 54.19115937171539,18.313205280851438 54.19113683111845,18.31320857368204 54.191104204978764,18.313275719174474 54.19109039031641,18.313275719174474 54.19109039031641</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.420">
+   <p5_default_db:ID>420</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.312311659517054 54.191451390189066,18.312298799932222 54.19159737146978,18.31232894765714 54.19161873284006,18.312530650875203 54.19162532632038,18.31283667692605 54.1915703081739,18.313064895873623 54.19152905172379,18.31319561574866 54.19143056262669,18.313200222298068 54.191370653001066,18.31321388263969 54.191171057213225,18.313217450206146 54.19110788844431,18.31327613917676 54.191093211201625</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.419">
+   <p5_default_db:ID>419</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.31181826604523 54.19143294941882,18.311804148689976 54.19157353782723,18.311850016425684 54.19160738203387,18.312084602464658 54.19161610429621,18.312529691050383 54.191632148848875,18.31268900972699 54.19160401050725,18.313071767865186 54.19153511259628,18.313207520185504 54.191433052210726,18.313214360451774 54.19133458864768,18.313226206676035 54.19116257425387,18.313228926611306 54.191121053899884,18.313229866133916 54.19111156270688,18.313279283237637 54.191093642806464</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.311">
+   <p5_default_db:ID>311</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.310">
+   <p5_default_db:ID>310</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.309">
+   <p5_default_db:ID>309</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.308">
+   <p5_default_db:ID>308</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.307">
+   <p5_default_db:ID>307</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.306">
+   <p5_default_db:ID>306</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.305">
+   <p5_default_db:ID>305</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.304">
+   <p5_default_db:ID>304</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.303">
+   <p5_default_db:ID>303</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.302">
+   <p5_default_db:ID>302</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.301">
+   <p5_default_db:ID>301</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.300">
+   <p5_default_db:ID>300</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom>
+    <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+     <gml:coordinates decimal="." cs=" " ts=",">18.3113092077669 54.1914195828822,18.3112984456678 54.1915188420973,18.3112913238485 54.1915881230065,18.311677747719 54.1916062729623,18.3121406034613 54.1916254459538,18.3125318962425 54.1916390679541,18.3126983757537 54.191609332163,18.3129335784125 54.1915667565199,18.3130785866636 54.1915407119012,18.3132183829265 54.1914368938423,18.3132319645017 54.1912432992663,18.313242434403396 54.191112860831474,18.313278863067687 54.19109527734095</gml:coordinates>
+    </gml:LineString>
+   </p5_default_db:the_geom>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.200">
+   <p5_default_db:ID>200</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.199">
+   <p5_default_db:ID>199</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.198">
+   <p5_default_db:ID>198</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.197">
+   <p5_default_db:ID>197</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.196">
+   <p5_default_db:ID>196</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.195">
+   <p5_default_db:ID>195</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.194">
+   <p5_default_db:ID>194</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.193">
+   <p5_default_db:ID>193</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.192">
+   <p5_default_db:ID>192</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.191">
+   <p5_default_db:ID>191</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.190">
+   <p5_default_db:ID>190</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.189">
+   <p5_default_db:ID>189</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.188">
+   <p5_default_db:ID>188</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+ <gml:featureMember>
+  <p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84 fid="Rozdzielcza_Kabel_Swiatlowodowy_wsg84.187">
+   <p5_default_db:ID>187</p5_default_db:ID>
+   <p5_default_db:ID_KORESP_ZGL_ODB>0</p5_default_db:ID_KORESP_ZGL_ODB>
+   <p5_default_db:the_geom/>
+  </p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84>
+ </gml:featureMember>
+</wfs:FeatureCollection>
+

+ 16 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/rur990_84.gfs

@@ -0,0 +1,16 @@
+<GMLFeatureClassList>
+  <GMLFeatureClass>
+    <Name>the_geom</Name>
+    <ElementPath>the_geom</ElementPath>
+    <!--LINESTRING-->
+    <GeometryType>2</GeometryType>
+    <SRSName>EPSG:4326</SRSName>
+    <DatasetSpecificInfo>
+      <FeatureCount>1</FeatureCount>
+      <ExtentXMin>18.38457</ExtentXMin>
+      <ExtentXMax>18.38472</ExtentXMax>
+      <ExtentYMin>54.24650</ExtentYMin>
+      <ExtentYMax>54.24652</ExtentYMax>
+    </DatasetSpecificInfo>
+  </GMLFeatureClass>
+</GMLFeatureClassList>

+ 22 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/rur990_84.gml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"
+                       xmlns="http://www.opengis.net/wfs"
+                       xmlns:gml="http://www.opengis.net/gml"
+                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                       xmlns:xlink="http://www.w3.org/1999/xlink"
+                       xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects"
+                       xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+                       xmlns:ogr="http://ogr.maptools.org/"
+                       local-name="Rozdzielcza_rurociag_wsg84_DRAFT">
+   <gml:featureMember>
+      <the_geom xmlns="" system_cache__appinfo:type="gml:AbstractFeatureType">
+         <LineString xpath="the_geom/LineString"
+                     srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
+            <coordinates xpath="the_geom/LineString/coordinates"
+                         decimal="."
+                         cs=" "
+                         ts=",">18.384717204568577 54.24650323939471,18.384570041172623 54.24651660060863</coordinates>
+         </LineString>
+      </the_geom>
+   </gml:featureMember>
+</wfs:FeatureCollection>

+ 46 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/swiatlowody.gfs

@@ -0,0 +1,46 @@
+<GMLFeatureClassList>
+  <GMLFeatureClass>
+    <Name>Rozdzielcza_Kabel_Swiatlowodowy_wsg84</Name>
+    <ElementPath>Rozdzielcza_Kabel_Swiatlowodowy_wsg84</ElementPath>
+    <!--LINESTRING-->
+    <GeometryType>2</GeometryType>
+    <SRSName>EPSG:4326</SRSName>
+    <DatasetSpecificInfo>
+      <FeatureCount>435</FeatureCount>
+      <ExtentXMin>18.29588</ExtentXMin>
+      <ExtentXMax>18.65460</ExtentXMax>
+      <ExtentYMin>54.14515</ExtentYMin>
+      <ExtentYMax>54.35915</ExtentYMax>
+    </DatasetSpecificInfo>
+    <PropertyDefn>
+      <Name>ID</Name>
+      <ElementPath>ID</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ZapasA</Name>
+      <ElementPath>ZapasA</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ZapasB</Name>
+      <ElementPath>ZapasB</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>ID_KORESP_ZGL_ODB</Name>
+      <ElementPath>ID_KORESP_ZGL_ODB</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>POZIOM_OD</Name>
+      <ElementPath>POZIOM_OD</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+    <PropertyDefn>
+      <Name>POZIOM_DO</Name>
+      <ElementPath>POZIOM_DO</ElementPath>
+      <Type>Integer</Type>
+    </PropertyDefn>
+  </GMLFeatureClass>
+</GMLFeatureClassList>

Разлика између датотеке није приказан због своје велике величине
+ 88 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/swiatlowody.gml


Разлика између датотеке није приказан због своје велике величине
+ 379 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/gml/test2.gml


+ 19 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/gml_layer.map.inc

@@ -0,0 +1,19 @@
+  LAYER
+    STATUS       ON
+    TYPE         LINE
+    CONNECTIONTYPE OGR
+    CONNECTION  "__GML_FILE__"
+    SYMBOLSCALEDENOM 1000
+    CLASS
+      STYLE
+        COLOR 255 0 0
+        WIDTH 1.0
+        LINECAP BUTT
+        PATTERN 5.0 3.0 END
+      END
+    END
+    PROJECTION
+      "init=epsg:4326"
+    END
+  END
+

+ 31 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/head.map.inc

@@ -0,0 +1,31 @@
+MAP
+
+  NAME "wfsmap"
+  STATUS ON
+  SIZE 2048 2048
+  EXTENT __EXTENT__
+  UNITS METERS
+  IMAGECOLOR 255 255 255
+  IMAGETYPE PNG
+  FONTSET "__FONT_DIR__/fonts.list"
+
+  PROJECTION
+    "init=epsg:2177"
+  END
+
+  SCALEBAR
+    INTERVALS 3
+    UNITS meters
+    STYLE 1
+    IMAGECOLOR "#FFFFFF80"
+    TRANSPARENT OFF
+    SIZE 420 10
+    STATUS embed
+    LABEL
+      SIZE 16
+      COLOR "#00000080"
+      FONT "arial"
+      TYPE truetype
+    END
+  END
+

+ 22 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/page.map.inc

@@ -0,0 +1,22 @@
+  LAYER
+    NAME "page"
+    STATUS ON
+    TYPE ANNOTATION
+    TRANSFORM ul
+    FEATURE
+      POINTS
+        10 10
+      END
+      TEXT "__PAGE__"
+    END
+    CLASS
+      LABEL
+        FONT "arial"
+        TYPE TRUETYPE
+        SIZE 24
+        COLOR "#000000"
+        FORCE TRUE
+      END
+    END
+    UNITS PIXELS
+  END

+ 24 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/tail.map.inc

@@ -0,0 +1,24 @@
+  LAYER
+    NAME "copyright"
+    STATUS ON
+    TYPE ANNOTATION
+    TRANSFORM lr
+    FEATURE
+      POINTS
+        -240 -40
+      END
+      TEXT "Generated by Procesy5"
+    END
+    CLASS
+      LABEL
+        FONT "arial"
+        TYPE TRUETYPE
+        SIZE 30
+        COLOR "#00000080"
+        FORCE TRUE
+      END
+    END
+    UNITS PIXELS
+  END
+
+END

+ 14 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/map_schema/wms_layer.map.inc

@@ -0,0 +1,14 @@
+  LAYER
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "__URL__"
+    CONNECTIONTYPE WMS
+    EXTENT __EXTENT__
+    METADATA
+      WMS_SRS "EPSG:2177"
+      WMS_NAME "__LAYER_NAME__"
+      WMS_FORMAT "image/png"
+      WMS_SERVER_VERSION "1.1.1"
+    END
+  END
+

+ 121 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/przywidz-test.map

@@ -0,0 +1,121 @@
+MAP
+
+  NAME "wfsmap"
+  STATUS ON
+  SIZE 2048 2048
+#  EXTENT 6520226.88849766666666666690 6006594.09771766666666666690 6520565.55516433333333333310 6006932.76438433333333333310
+  EXTENT 6520057.55516433333333333380 6006424.76438433333333333380 6520734.88849766666666666620 6007102.09771766666666666620
+  UNITS METERS
+  IMAGECOLOR 255 255 255
+  IMAGETYPE PNG
+  FONTSET "fonts/fonts.list"
+
+  PROJECTION
+    "init=epsg:2177"
+  END
+
+  SCALEBAR
+    INTERVALS 3
+    UNITS meters
+    STYLE 1
+    IMAGECOLOR "#FFFFFF80"
+    TRANSPARENT OFF
+    SIZE 420 10
+    STATUS embed
+    LABEL
+      SIZE 16
+      COLOR "#00000080"
+      FONT "arial"
+      TYPE truetype
+    END
+  END
+
+  LAYER
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "https://biuro.biall-net.pl/wms/rastry"
+    CONNECTIONTYPE WMS
+#    EXTENT	6520226.88849766666666666690 6006594.09771766666666666690 6520565.55516433333333333310 6006932.76438433333333333310
+    EXTENT 6520057.55516433333333333380 6006424.76438433333333333380 6520734.88849766666666666620 6007102.09771766666666666620
+    METADATA
+      WMS_SRS "EPSG:2177"
+      WMS_NAME "Przywidz_Jesionowa"
+      WMS_FORMAT "image/png"
+      WMS_SERVER_VERSION "1.1.1"
+    END
+  END
+
+  LAYER
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "https://biuro.biall-net.pl/wms/podklady"
+    CONNECTIONTYPE WMS
+#    EXTENT	6520226.88849766666666666690 6006594.09771766666666666690 6520565.55516433333333333310 6006932.76438433333333333310
+    EXTENT 6520057.55516433333333333380 6006424.76438433333333333380 6520734.88849766666666666620 6007102.09771766666666666620
+    METADATA
+      WMS_SRS "EPSG:2177"
+      WMS_NAME "MDCP_Przywidz_osiedle_jesionowa_lin"
+      WMS_FORMAT "image/png"
+      WMS_SERVER_VERSION "1.1.1"
+    END
+  END
+
+  LAYER
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "https://biuro.biall-net.pl/wms/podklady"
+    CONNECTIONTYPE WMS
+#    EXTENT	6520226.88849766666666666690 6006594.09771766666666666690 6520565.55516433333333333310 6006932.76438433333333333310
+    EXTENT 6520057.55516433333333333380 6006424.76438433333333333380 6520734.88849766666666666620 6007102.09771766666666666620
+    METADATA
+      WMS_SRS "EPSG:2177"
+      WMS_NAME "MDCP_Przywidz_osiedle_jesionowa_textx"
+      WMS_FORMAT "image/png"
+      WMS_SERVER_VERSION "1.1.1"
+    END
+  END
+
+  LAYER
+#    NAME         "Rozdzielcza_Kabel_Swiatlowodowy_wsg84"
+    STATUS       ON
+    TYPE         LINE
+    CONNECTIONTYPE OGR
+    CONNECTION  "gml/swiatlowody.gml"
+    SYMBOLSCALEDENOM 1000
+    CLASS
+      STYLE
+        COLOR 255 0 0
+        WIDTH 1.0
+        LINECAP BUTT
+        PATTERN 5.0 3.0 END
+      END
+    END
+    PROJECTION
+      "init=epsg:4326"
+    END
+  END
+
+  LAYER
+    NAME "copyright"
+    STATUS ON
+    TYPE ANNOTATION
+    TRANSFORM lr
+    FEATURE
+      POINTS
+        -240 -40
+      END
+      TEXT "Generated by Procesy5"
+    END
+    CLASS
+      LABEL
+        FONT "arial"
+        TYPE TRUETYPE
+        SIZE 30
+        COLOR "#00000080"
+        FORCE TRUE
+      END
+    END
+    UNITS PIXELS
+  END
+
+END

+ 93 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/map/wfs2048.map

@@ -0,0 +1,93 @@
+MAP
+
+  NAME "wfsmap"
+  STATUS ON
+  SIZE 2048 2048
+  EXTENT 6532395.136830 6020410.877370 6535394.317350 6022987.616550
+  UNITS METERS
+  IMAGECOLOR 255 255 255
+  IMAGETYPE PNG
+  FONTSET "fonts/fonts.list"
+
+  PROJECTION
+    "init=epsg:2177"
+  END
+
+  SCALEBAR
+    INTERVALS 3
+    UNITS meters
+    STYLE 1
+    IMAGECOLOR "#FFFFFF80"
+    TRANSPARENT OFF
+    SIZE 420 10
+    STATUS embed
+    LABEL
+      SIZE 16
+      COLOR "#00000080"
+      FONT "arial"
+      TYPE truetype
+    END
+  END
+
+  LAYER
+#    NAME        "Otomin"
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "https://biuro.biall-net.pl/wms/rastry"
+    CONNECTIONTYPE WMS
+    METADATA
+      WMS_TITLE "Otomin"
+      WMS_SRS "EPSG:2177"
+      WMS_NAME "Otomin"
+      WMS_FORMAT "image/png"
+      WMS_SERVER_VERSION "1.1.1"
+    END
+    PROJECTION
+      "init=epsg:2177"
+    END
+  END
+
+  LAYER
+    NAME         "Rozdzielcza_Kabel_Swiatlowodowy_wsg84"
+    STATUS       ON
+    TYPE         LINE
+    CONNECTIONTYPE OGR
+    CONNECTION  "gml/swiatlowody.gml"
+    SYMBOLSCALEDENOM 1000
+    CLASS
+      STYLE
+        COLOR 255 0 0
+        WIDTH 1.0
+        LINECAP BUTT
+        PATTERN 5.0 3.0 END
+      END
+    END
+    PROJECTION
+      "init=epsg:4326"
+    END
+  END
+
+  LAYER
+    NAME "copyright"
+    STATUS ON
+    TYPE ANNOTATION
+    TRANSFORM lr
+    FEATURE
+      POINTS
+        -240 -40
+      END
+      TEXT "Generated by Procesy5"
+    END
+    CLASS
+      LABEL
+        FONT "arial"
+        TYPE TRUETYPE
+        SIZE 30
+        COLOR "#00000080"
+        FORCE TRUE
+      END
+    END
+    UNITS PIXELS
+  END
+
+END

+ 109 - 0
SE/schema/WPS_Functions/mapserver_gml_to_png/mapserver_gml_to_png.xsl

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <!-- template to generate mapfile for mapserver for use from build_mapserver_gml_to_png.xml-->
+    <!-- MAP
+
+  NAME "wfsmap"
+  STATUS ON
+  SIZE 2048 2048
+  EXTENT 6532395.136830 6020410.877370 6535394.317350 6022987.616550
+  UNITS METERS
+  IMAGECOLOR 255 255 255
+  IMAGETYPE PNG
+  FONTSET "fonts/fonts.list"
+
+  PROJECTION
+    "init=epsg:2177"
+  END
+
+  SCALEBAR
+    INTERVALS 3
+    UNITS meters
+    STYLE 1
+    IMAGECOLOR "#FFFFFF80"
+    TRANSPARENT OFF
+    SIZE 420 10
+    STATUS embed
+    LABEL
+      SIZE 16
+      COLOR "#00000080"
+      FONT "arial"
+      TYPE truetype
+    END
+  END
+
+  LAYER
+    NAME        "Otomin"
+    STATUS      ON
+    TYPE        RASTER
+    CONNECTION  "http://127.0.0.1:34580/wms/.single/33"
+    CONNECTIONTYPE WMS
+    EXTENT      6532395.136830 6020410.877370 6535394.317350 6022987.616550
+    PROJECTION
+      "init=epsg:2177"
+    END
+  END
+
+  LAYER
+    NAME         "Rozdzielcza_Kabel_Swiatlowodowy_wsg84"
+    STATUS       ON
+    TYPE         LINE
+    CONNECTIONTYPE OGR
+    CONNECTION  "gml/swiatlowody.gml"
+    EXTENT      18.295880 54.145150 18.654600 54.359150
+    SYMBOLSCALEDENOM 1000
+    CLASS
+      STYLE
+        COLOR 255 0 0
+        WIDTH 1.0
+        LINECAP BUTT
+        PATTERN 5.0 3.0 END
+      END
+    END
+    PROJECTION
+      "init=epsg:4326"
+    END
+  END
+
+  LAYER
+    NAME "copyright"
+    STATUS ON
+    TYPE ANNOTATION
+    TRANSFORM lr
+    FEATURE
+      POINTS
+        -240 -40
+      END
+      TEXT "Generated by Procesy5"
+    END
+    CLASS
+      LABEL
+        FONT "arial"
+        TYPE TRUETYPE
+        SIZE 30
+        COLOR "#00000080"
+        FORCE TRUE
+      END
+    END
+    UNITS PIXELS
+  END
+
+END -->
+    
+    
+    
+    <!--<xsl:template match="system_cache__appinfo:MAP"/>-->
+    
+    <!--<xsl:template match="system_cache__appinfo:LAYER"/>-->
+    
+    
+    
+</xsl:stylesheet>

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

@@ -1,759 +0,0 @@
-<?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>

+ 1 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build.xml

@@ -0,0 +1 @@
+build_recurse_ant.xml

+ 102 - 22
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/etykieta/build_recurse_ant.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project basedir="." name="PRINT_TEMPLATE" default="xml_recursed_from_tr_map_with_RelatedFeatureLoop_html">
+<project basedir="." name="PRINT_TEMPLATE" default="xml_recursed_from_tr_map_with_RelatedFeatureLoop_html"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" >
     <description>
         Etykieta
     </description>
@@ -33,10 +34,10 @@
         -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="basedir"  location="${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/${uuid}"/> <!-- /${uuid} -->
-    <property name="default_db:recurse_ant" location="${default_db:recurse_ant}"/>
+    <property name="default_db:recurse_ant" value="${default_db:recurse_ant_basedir}/build_recurse_ant.xml"/>
      
     <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" />
@@ -63,9 +64,10 @@
     
     <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="parallel_pos" value="1"/><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"/>
+    <property name="build_recurse_ant_xpath_query.xsl" value="${default_db:recurse_ant_basedir.temp}/build_recurse_ant_xpath_query.xsl"/>
+    <property name="process_locks" value="${default_db:recurse_ant_basedir.temp}/.locks"/><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 -->
     
@@ -90,7 +92,18 @@
     </echo>-->
 
     <!-- uuid -->
-    <target name="uuid_cond">
+    <property name="build_check_java_process_count.xml"  value="${basedir}/../check_java_process_count/build_check_java_process_count.xml"/>
+    <property name="parallel_java_process_max" value="20"/> <!-- to limit max processes in parallel concurent tasks jobs - will use ${build_check_java_process_count.xml} -->
+     <!-- do zrobienia  -->
+    <!--<tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  suffix=".xml" />-->
+    <property name="get_wfs_basedir" location="${default_db:recurse_ant_basedir}/../../get_wfs"/>
+    <property name="get_wfs" location="${get_wfs_basedir}/build_get_wfs.xml"/>
+    
+    <property name="build_CRM_PROCES_tree" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree/build_CRM_PROCES_tree.xml"/>
+    <property name="CRM_PROCES_tree_basedir" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree"  />                         
+    <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp"  />
+    
+    <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/><target name="uuid_cond">
         <condition property="uuid_set" taskname="uuid_check">
             <or>
                 <equals arg1="${uuid}" arg2=""/>
@@ -302,7 +315,11 @@
                         <!--<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">
+        <target name="mkdir_process_locks">
+            <mkdir dir="${process_locks}"/>
+        </target>
+    
+    <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop" depends="mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,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" />-->
@@ -339,7 +356,30 @@
     
     <!-- ### php_session_id ### -->
     
-        <target name="php_session_id_cond">
+        <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_tree_to_dita" depends="xml_recursed_from_tr_map_with_RelatedFeatureLoop" description="URL_TASK Wygeneruj druk z obiektu uzywajac styli systemowych">
+        
+        <ant antfile="${build_CRM_PROCES_tree}" target="default_db:PROCES_INIT:tree:dita" inheritall="false">
+            <property name="uuid" value="${uuid}"/>
+            <property name="default_db:recurse_ant_basedir.out" value="${default_db:recurse_ant_basedir}/out"/>
+        </ant>
+        
+        <exec executable="${dita.dir}" dir=".">
+            <arg value="-i"/>
+            <arg value="${CRM_PROCES_tree_basedir.temp}/${uuid}/${uuid}.ditamap" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="pdf"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        
+        <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><target name="php_session_id_cond">
             <condition property="php_session_id_fail" taskname="php_session_id_check">
                 <or>
                     <equals arg1="${php_session_id}" arg2=""/>
@@ -385,8 +425,8 @@
         <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>
+        <property name="build_recurse_ant_xsl_xpath_filter.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_xsl_xpath_filter.xsl"/><property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.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>
@@ -395,7 +435,7 @@
         <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"/>
+        <property name="build_recurse_ant_xsl_xpath_filter.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_xsl_xpath_filter.xsl"/><property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.xsl"/>
     </target>
     
     
@@ -478,14 +518,49 @@
     </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">
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl_check" description="if it is set ">
+        <condition taskname="build_recurse_ant_xsl_xpath_filter.xsl" property="xpath_query_set">
+            <or>
+                <equals arg1="${xpath_query}" arg2=""/>
+                <equals arg1="${xpath_query}" arg2="$${xpath_query}"/>
+            </or>
+        </condition>
+        <antcall target="build_recurse_ant_xsl_xpath_filter.xsl_fail"/> <!-- if failed run or not if not -->
+    </target>
+    
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl_fail" depends="check_default_db_xml_cache.public_default,check_set_default_db_xml_cache.public_local"  if="${xpath_query_set}"  description="if it is not set ">
+        <echo>build_recurse_ant_xsl_xpath_filter.xsl using $default_db_xml_cache.public ${default_db_xml_cache.public}</echo>
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xsl_xpath_filter.xsl}" in="${build_recurse_ant.xsl}"  destdir="./" out="${build_recurse_ant_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]"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+            <param name="typeName" expression="${typeName}"/>
+            <param name="namespace_prefix_p5_tr_map" expression="${namespace_prefix_p5_tr_map}"/>
+        </xslt>
+    </target>
+    
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl" depends="check_default_db_xml_cache.public_default,check_set_default_db_xml_cache.public_local,build_recurse_ant_xsl_xpath_filter.xsl_check" unless="${xpath_query_set}" description="Create build_recurse_ant_xsl_xpath_filter.xsl">
+        <echo>build_recurse_ant_xsl_xpath_filter.xsl using $default_db_xml_cache.public ${default_db_xml_cache.public}</echo>
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xsl_xpath_filter.xsl}" in="${build_recurse_ant.xsl}"  destdir="./" out="${build_recurse_ant_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}"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+        </xslt>
+    </target><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}"  >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xpath_query.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>
@@ -513,7 +588,7 @@
             <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="build_recurse_ant.xsl" expression="${build_recurse_ant_xpath_query.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}"/>
@@ -525,11 +600,17 @@
             <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
             <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
             <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
+        <param name="build_check_java_process_count.xml" expression="${build_check_java_process_count.xml}"/>
+            <param name="parallel_java_process_max" expression="${parallel_java_process_max}"/>
+            <param name="debug_xsl_in_filename" expression="${main_build_recurse_ant.dita_with_id}"/>
+            <param name="debug_xsl_out_filename" expression="${build_recurse_ant.xml}"/>
+            <param name="debug_xsl_out_filename" expression="${build_recurse_ant.xml}"/>
+            <param name="parallel_pos" expression="${parallel_pos}"/>
+            <param name="process_locks" expression="${process_locks}"/>
+            <param name="get_wfs" expression="${get_wfs}"/>
         </xslt>
-        <!--<import file="${build_recurse_ant.xml}"/>-->
-        <record action="stop" name="ant.log"/>
-        <ant  antfile="${build_recurse_ant.xml}" dir="." />
-
+        <ant  antfile="${build_recurse_ant.xml}" dir="." ><property name="parallel_pos" value="${parallel_pos}"/>
+        </ant>
         <!-- pozbierac wszystkie do kupy xmle  -->
     </target>
     
@@ -633,8 +714,7 @@
 
 
 
-    <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"/>
+    <target name="buildpdf_recursed" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,check_dita" if="${test_if_dita}">
         <exec executable="${dita.dir}" dir=".">
             <arg value="-i"/>
             <arg value="${out_task.dita.final}" />

+ 37 - 9
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build_recurse_ant.xml

@@ -48,13 +48,13 @@
     <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="api_url" value="https://biuro.biall-net.pl/SE/version-git/wfs-data.php"/>
+    <property name="url" value="${url}"/>
     <!--<property name="url" value="${url}"/>-->
     <!--<property name="url" value="${api_url}"/>-->
     <property name="webRootUrl" value="${$webRootUrl}"/>
 
     
-    <property name="namespace_prefix" value="p5_default_db"/> <!-- ex: p5_default_db to complete after p5_default_db:IN7_DZIENNIK_KORESP -->
+    <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  -->
@@ -66,7 +66,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="parallel_pos" value="1"/><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="build_recurse_ant_xpath_query.xsl" value="${default_db:recurse_ant_basedir.temp}/build_recurse_ant_xpath_query.xsl"/>
     <property name="process_locks" value="${default_db:recurse_ant_basedir.temp}/.locks"/>
@@ -90,7 +90,7 @@
     <property name="get_wfs_basedir" location="${default_db:recurse_ant_basedir}/../../get_wfs"/>
     <property name="get_wfs" location="${get_wfs_basedir}/build_get_wfs.xml"/>
     
-    <property name="parallel_pos" value="1"/>
+    <property name="build_CRM_PROCES_tree" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree/build_CRM_PROCES_tree.xml"/>
     
     <!--<echo>#93 $typeName= ${typeName};  $xpath= ${xpath};  $xpath_value= ${xpath_value}  </echo>-->
 
@@ -100,7 +100,10 @@
     </echo>-->
 
     <!-- uuid -->
-    <target name="uuid_cond">
+    <property name="CRM_PROCES_tree_basedir" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree"  />                         
+    <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp"  />
+    
+    <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/><target name="uuid_cond">
         <condition property="uuid_set" taskname="uuid_check">
             <or>
                 <equals arg1="${uuid}" arg2=""/>
@@ -354,7 +357,30 @@
     
     <!-- ### php_session_id ### -->
     
-        <target name="php_session_id_cond">
+        <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_tree_to_dita" depends="xml_recursed_from_tr_map_with_RelatedFeatureLoop" description="URL_TASK Wygeneruj druk z obiektu uzywajac styli systemowych">
+        
+        <ant antfile="${build_CRM_PROCES_tree}" target="default_db:PROCES_INIT:tree:dita" inheritall="false">
+            <property name="uuid" value="${uuid}"/>
+            <property name="default_db:recurse_ant_basedir.out" value="${default_db:recurse_ant_basedir}/out"/>
+        </ant>
+        
+        <exec executable="${dita.dir}" dir=".">
+            <arg value="-i"/>
+            <arg value="${CRM_PROCES_tree_basedir.temp}/${uuid}/${uuid}.ditamap" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="pdf"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        
+        <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><target name="php_session_id_cond">
             <condition property="php_session_id_fail" taskname="php_session_id_check">
                 <or>
                     <equals arg1="${php_session_id}" arg2=""/>
@@ -525,7 +551,9 @@
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
             <param name="xpath_query" expression="[1=1]"/>
             <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
-        </xslt>
+        <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+            <param name="typeName" expression="${typeName}"/>
+            <param name="namespace_prefix_p5_tr_map" expression="${namespace_prefix_p5_tr_map}"/></xslt>
     </target>
     
     <target name="build_recurse_ant_xsl_xpath_filter.xsl" depends="check_default_db_xml_cache.public_default,check_set_default_db_xml_cache.public_local,build_recurse_ant_xsl_xpath_filter.xsl_check" unless="${xpath_query_set}" description="Create build_recurse_ant_xsl_xpath_filter.xsl">
@@ -558,7 +586,7 @@
             <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="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}"/>
             
@@ -713,7 +741,7 @@
 
 
     <target name="buildpdf_recursed" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,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}" />

+ 0 - 2
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/out/.htaccess

@@ -1,2 +0,0 @@
-Order Allow,Deny
-Allow from all

+ 0 - 761
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build.xml

@@ -1,761 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project basedir="." name="PRINT_TEMPLATE" default="buildpdf_recursed"  >
-    <description>
-        Umowa
-    </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>-->
-                        
-                        <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>
-                        <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_file}.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; 
-        </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;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;
-        </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>

+ 1 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build.xml

@@ -0,0 +1 @@
+build_recurse_ant.xml

+ 100 - 21
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/umowa/build_recurse_ant.xml

@@ -33,10 +33,10 @@
         -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="basedir"  location="${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/${uuid}"/> <!-- /${uuid} -->
-    <property name="default_db:recurse_ant" location="${default_db:recurse_ant}"/>
+    <property name="default_db:recurse_ant" value="${default_db:recurse_ant_basedir}/build_recurse_ant.xml"/>
      
     <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" />
@@ -63,9 +63,10 @@
     
     <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="parallel_pos" value="1"/><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"/>
+    <property name="build_recurse_ant_xpath_query.xsl" value="${default_db:recurse_ant_basedir.temp}/build_recurse_ant_xpath_query.xsl"/>
+    <property name="process_locks" value="${default_db:recurse_ant_basedir.temp}/.locks"/><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 -->
     
@@ -90,7 +91,18 @@
     </echo>-->
 
     <!-- uuid -->
-    <target name="uuid_cond">
+    <property name="build_check_java_process_count.xml"  value="${basedir}/../check_java_process_count/build_check_java_process_count.xml"/>
+    <property name="parallel_java_process_max" value="20"/> <!-- to limit max processes in parallel concurent tasks jobs - will use ${build_check_java_process_count.xml} -->
+     <!-- do zrobienia  -->
+    <!--<tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  suffix=".xml" />-->
+    <property name="get_wfs_basedir" location="${default_db:recurse_ant_basedir}/../../get_wfs"/>
+    <property name="get_wfs" location="${get_wfs_basedir}/build_get_wfs.xml"/>
+    
+    <property name="build_CRM_PROCES_tree" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree/build_CRM_PROCES_tree.xml"/>
+    <property name="CRM_PROCES_tree_basedir" location="${default_db:recurse_ant_basedir}/../CRM_PROCES_tree"  />                         
+    <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp"  />
+    
+    <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/><target name="uuid_cond">
         <condition property="uuid_set" taskname="uuid_check">
             <or>
                 <equals arg1="${uuid}" arg2=""/>
@@ -302,7 +314,11 @@
                         <!--<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">
+        <target name="mkdir_process_locks">
+            <mkdir dir="${process_locks}"/>
+        </target>
+    
+    <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop" depends="mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,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" />-->
@@ -339,7 +355,30 @@
     
     <!-- ### php_session_id ### -->
     
-        <target name="php_session_id_cond">
+        <target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_tree_to_dita" depends="xml_recursed_from_tr_map_with_RelatedFeatureLoop" description="URL_TASK Wygeneruj druk z obiektu uzywajac styli systemowych">
+        
+        <ant antfile="${build_CRM_PROCES_tree}" target="default_db:PROCES_INIT:tree:dita" inheritall="false">
+            <property name="uuid" value="${uuid}"/>
+            <property name="default_db:recurse_ant_basedir.out" value="${default_db:recurse_ant_basedir}/out"/>
+        </ant>
+        
+        <exec executable="${dita.dir}" dir=".">
+            <arg value="-i"/>
+            <arg value="${CRM_PROCES_tree_basedir.temp}/${uuid}/${uuid}.ditamap" />
+            <!-- <arg value="-t" />
+            <arg value="temp" />-->
+            <arg value="-f" />
+            <arg value="pdf"/>
+            <arg value="-o"/>
+            <arg value="${out}"/>
+        </exec>
+        
+        <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><target name="php_session_id_cond">
             <condition property="php_session_id_fail" taskname="php_session_id_check">
                 <or>
                     <equals arg1="${php_session_id}" arg2=""/>
@@ -385,8 +424,8 @@
         <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>
+        <property name="build_recurse_ant_xsl_xpath_filter.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_xsl_xpath_filter.xsl"/><property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.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>
@@ -395,7 +434,7 @@
         <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"/>
+        <property name="build_recurse_ant_xsl_xpath_filter.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_xsl_xpath_filter.xsl"/><property name="recurse_ant_to_html.xsl" value="${default_db_xml_cache.public}/recurse_ant_to_html.xsl"/>
     </target>
     
     
@@ -478,14 +517,49 @@
     </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">
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl_check" description="if it is set ">
+        <condition taskname="build_recurse_ant_xsl_xpath_filter.xsl" property="xpath_query_set">
+            <or>
+                <equals arg1="${xpath_query}" arg2=""/>
+                <equals arg1="${xpath_query}" arg2="$${xpath_query}"/>
+            </or>
+        </condition>
+        <antcall target="build_recurse_ant_xsl_xpath_filter.xsl_fail"/> <!-- if failed run or not if not -->
+    </target>
+    
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl_fail" depends="check_default_db_xml_cache.public_default,check_set_default_db_xml_cache.public_local"  if="${xpath_query_set}"  description="if it is not set ">
+        <echo>build_recurse_ant_xsl_xpath_filter.xsl using $default_db_xml_cache.public ${default_db_xml_cache.public}</echo>
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xsl_xpath_filter.xsl}" in="${build_recurse_ant.xsl}"  destdir="./" out="${build_recurse_ant_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]"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
+            <param name="typeName" expression="${typeName}"/>
+            <param name="namespace_prefix_p5_tr_map" expression="${namespace_prefix_p5_tr_map}"/>
+        </xslt>
+    </target>
+    
+    <target name="build_recurse_ant_xsl_xpath_filter.xsl" depends="check_default_db_xml_cache.public_default,check_set_default_db_xml_cache.public_local,build_recurse_ant_xsl_xpath_filter.xsl_check" unless="${xpath_query_set}" description="Create build_recurse_ant_xsl_xpath_filter.xsl">
+        <echo>build_recurse_ant_xsl_xpath_filter.xsl using $default_db_xml_cache.public ${default_db_xml_cache.public}</echo>
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xsl_xpath_filter.xsl}" in="${build_recurse_ant.xsl}"  destdir="./" out="${build_recurse_ant_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}"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+        </xslt>
+    </target><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}"  >
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_recurse_ant_xpath_query.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>
@@ -513,7 +587,7 @@
             <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="build_recurse_ant.xsl" expression="${build_recurse_ant_xpath_query.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}"/>
@@ -525,11 +599,17 @@
             <param name="simpleSchema_dir" expression="${simpleSchema_dir}"/>
             <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
             <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
+        <param name="build_check_java_process_count.xml" expression="${build_check_java_process_count.xml}"/>
+            <param name="parallel_java_process_max" expression="${parallel_java_process_max}"/>
+            <param name="debug_xsl_in_filename" expression="${main_build_recurse_ant.dita_with_id}"/>
+            <param name="debug_xsl_out_filename" expression="${build_recurse_ant.xml}"/>
+            <param name="debug_xsl_out_filename" expression="${build_recurse_ant.xml}"/>
+            <param name="parallel_pos" expression="${parallel_pos}"/>
+            <param name="process_locks" expression="${process_locks}"/>
+            <param name="get_wfs" expression="${get_wfs}"/>
         </xslt>
-        <!--<import file="${build_recurse_ant.xml}"/>-->
-        <record action="stop" name="ant.log"/>
-        <ant  antfile="${build_recurse_ant.xml}" dir="." />
-
+        <ant  antfile="${build_recurse_ant.xml}" dir="." ><property name="parallel_pos" value="${parallel_pos}"/>
+        </ant>
         <!-- pozbierac wszystkie do kupy xmle  -->
     </target>
     
@@ -633,8 +713,7 @@
 
 
 
-    <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"/>
+    <target name="buildpdf_recursed" depends="install_folders,uuid_check,typeName_check,xpath_check,xpath_value_check,passwordBase64Basic_check,php_session_id_check,mkdir_process_locks,build_recurse_ant_xsl_xpath_filter.xsl,check_dita" if="${test_if_dita}">
         <exec executable="${dita.dir}" dir=".">
             <arg value="-i"/>
             <arg value="${out_task.dita.final}" />

+ 459 - 0
SE/schema/build.xml

@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="xmlschema_procesy5" default="sync_p5_tr_map_with_se"> <!--  sync_p5_tr_map_with_se new-schema-with-ID-to-move-and-rename-to-xsd generate_schema_with_id build_detect_objects_parent_relations build_detect_resource_type build_tr_map element_complexType.xml generate_schema_with_id sync_p5_tr_map_with_se -->
+    <description>This file is Business Objects Transformations Component described in procesy5 documentation </description>
+  <!--<description>Do przetwarzania wygenerowanych schematow itp i integracji z systemem</description>-->
+    
+    
+    <!-- licence values -->
+    <property name="TargetNamespaceBindings" value="https://biuro.biall-net.pl"/> <!-- default https://biuro.biall-net.pl for API working in this domain -->
+    <property name="TargetNamespaceBindingsApi" value="${TargetNamespaceBindings}/wfs"/>
+    <property name="TargetNamespaceBindingsApiUrl" value="${TargetNamespaceBindingsApi}/wfs-data.php"/>
+    <property name="targetNamespace_DEFAULTS_prefix" value="default_db"/>
+    <property name="targetNamespace_DEFAULTS_prefix_objects" value="default_objects"/>
+    <property name="targetNamespace_DEFAULTS" value="${TargetNamespaceBindings}/xmlschema_procesy5/${targetNamespace_DEFAULTS_prefix}"/> <!-- namespace do lokalnego bindowania do default_db http://biuro.biall-net.pl/xmlschema_procesy5/default_db -->
+    <property name="config_dir" value="${basedir}/config"/>
+    <property name="NamespaceBinding.xml" value="${config_dir}/NamespaceBinding.xml"/> <!-- file with binding informations -->
+    
+    
+    <property name="public_html" location="${basedir}"/> <!-- do wstawienia schematos -->
+    
+   
+    
+    <!-- modules WPS_Functions -->
+    <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
+    <!-- went to WPS_Functions/build_WPS_Functions -->
+    <property name="ant-launcher.jar" location="/opt/local/share/java/apache-ant/lib/ant-launcher.jar"/>
+   
+    
+    <property name="Shared_Git_Root" location="../../../"/> <!-- do ustalenia gdzie trzymamy wszystkie repozytoria na serwerze -->
+    
+    <property name="remote" location="${Shared_Git_Root}/se/SE/schema"/>
+    
+    <property name="table.local" location="${public_html}/table"/>
+    <property name="table.remote" location="${remote}/table"/>
+    
+    
+    
+    <property name="default_db.instance.xml" value="${basedir}/default_db.instance.xml"><!--<glossgroup id="glossgroup_ezt_5sz_gz">--></property> 
+    <property name="default_db.instance.xml.symlink" value="${basedir}/default_db.instance.xml.symlink"/>
+    
+    <property name="transformed.local" location="${default_db.instance.xml}/transformed"/> <!-- dir for some raport outputs -->
+        <property name="procesy5_system_schema.xml" value="${transformed.local}/procesy5_system_schema.xml"/>
+        <property name="vrtfNamespaces.xml" value="${transformed.local}/vrtfNamespaces.xml"/>
+        <property name="element_complexType.xml" value="${transformed.local}/element_complexType.xml"/><!-- for build flat schema and tr_map -->
+        
+        
+        
+    
+    <property name="build_complexType.local" location="${default_db.instance.xml}/build_complexType"/>
+    <property name="build_complexType.remote" location="${remote}/default_db.instance.xml/build_complexType"/>
+    
+    <property name="p5_tr_map.local" location="${default_db.instance.xml}/p5_tr_map"/>
+    <property name="p5_tr_map.remote" location="${remote}/default_db.instance.xml/p5_tr_map"/>
+    
+    
+    <property name="detect_resource_type.local" location="${default_db.instance.xml}/detect_resource_type"/>
+    <property name="detect_resource_type.remote" location="${remote}/default_db.instance.xml/detect_resource_type"/>
+   
+    <property name="simpleSchema.local" location="${default_db.instance.xml}/simpleSchema"/>
+    <property name="simpleSchema.remote" location="${remote}/default_db.instance.xml/simpleSchema"/>
+    
+    <!-- module cache -->
+    <property name="build_properties" location="${public_html}/build_properties" />
+    
+    
+    
+    
+    <property name="new-schema-with-ID-to-move-and-rename-to-xsd"  location="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd"/>
+    <property name="empty.xml"  value="empty.xml"/>
+    <!-- templates -->  
+    <property name="default_db_xml_cache.public" location="${public_html}/default_db_xml_cache.public"/>
+    <property name="default_db_xml_cache" value="default_db_xml_cache"/><!-- xsl Business Objects Transformers -->
+        <property name="system_cache__resources_tree_generate_xsl_required_occurs_raport" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport"/>
+        <property name="parse_schema_to_generate_id.xsl" value="${system_cache__resources_tree_generate_xsl_required_occurs_raport}/parse_schema_to_generate_id.xsl" />
+        <property name="parse_schema_to_generate_id_raport.xml" value="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd.xml"/>
+        <property name="get_all_xsd.xsl" value="${default_db_xml_cache.public}/get_all_xsd.xsl"/>
+        
+        <property name="build_element_complexType.xml" value="${transformed.local}/build_element_complexType.xml"/> <!-- ant build to generate elements flat and p5_tr_map -->
+        
+        <property name="build_complexType.xsl" value="${default_db_xml_cache}/build_complexType.xsl"/>
+        <property name="build_complexType_raport.xml" value="${transformed.local}/build_complexType_raport.xml"/>
+        
+        <property name="build_tr_map_raport.xml" value="${transformed.local}/build_tr_map_raport.xml"/>
+        <property name="p5_tr_map.xsl" value="${default_db_xml_cache}/p5_tr_map.xsl"/>
+        
+        <property name="detect_resource_type.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_resource_type.xsl"/>
+        <property name="detect_resource_type.xml" value="${transformed.local}/detect_resource_type.xml"/> <!-- ${targetNamespace_DEFAULTS_prefix} -->
+        
+        <property name="detect_objects_parent_relations.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_objects_parent_relations.xsl"/>
+        <property name="detect_objects_parent_relations.xml" value="${transformed.local}/detect_objects_parent_relations.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"/>
+        <property name="main_build_recurse_ant.dita_with_id_raport.xml" value="${transformed.local}/main_build_recurse_ant.dita_with_id_raport.xml"/><!-- raport only for simpleSchema -->
+    
+    
+    <property name="default_db.xml" value="${public_html}/default_db/default_db.xml"/>
+    <property name="default_db.xml.get_url" value="${TargetNamespaceBindings}/SE/version-git/api.php/xml/xsd/default_db"/> <!-- TODO to be set  -->
+    
+    <property name="TargetNamespaceBindings.xsl" value="${default_db_xml_cache.public}/system_cache__appinfo/TargetNamespaceBindings.xsl"/>
+    
+   
+    
+    
+    
+    <!-- important xsl templates another -->
+    <property name="build_ant_universal_by_xsl_match.xsl" value="${default_db_xml_cache.public}/build_ant_universal_by_xsl_match.xsl"/>
+    
+    <!-- this is current dowloaded from API GET_ALL_XSD scehema of database to rebuild_structures and analysis etc... 
+     <xsl:variable name="URL" select="concat($api_url,'/dev-pl/se-feature-api/api.php/xml/xsd/',$db_name_prefix)"/>
+    -->
+    
+    
+    
+    <!-- for WPS_Functions/default_db/CRM_PROCES_tree informations -->
+    <!--<FeatureType xmlns:default_objects="https://biuro.biall-net.pl/wfs/default_objects">
+        <Name>SystemProcess</Name>
+        <Title>SystemProcess</Title>
+        <Abstract>SystemProcess</Abstract>
+        <Keywords>SystemProcess</Keywords>
+        <SRS>EPSG:4326</SRS>
+    </FeatureType>-->
+    <property name="default_objects:SystemProces" value="default_objects:SystemProces"/> <!-- to retrieve SystemProces -->
+    
+     
+    <!--<target name="detect_objects_parent_relations_clean">
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+    </target>-->
+    
+    
+    <target name="save_build_properties" >
+        <ant antfile="${build_WPS_Functions.xml}" inheritall="yes"/>
+        <echoproperties destfile="${build_properties}" />
+    </target>
+    
+    <!--<target name="read_build_properties_check">
+        <!-\-<condition property="read_build_properties_check" taskname="save_build_properties" >
+            <available file="${build_properties}"/>
+        </condition>-\->
+        <antcall target="save_build_properties"/>
+        <loadproperties srcfile="${build_properties}"/>
+    </target>-->
+    
+    <target name="read_build_properties">
+        <loadproperties srcfile="${build_properties}"/>
+    </target>
+    
+    
+    <target name="procesy5_system_schema.xml_if_not_exists_check" description="to be called from procesy5_system_schema.xml_if_not_exists">
+        <echo>Debug test relative property  object_modeling_basedir=${object_modeling_basedir} </echo>
+        <condition property="procesy5_system_schema.xml_if_not_exists_check" taskname="procesy5_system_schema.xml_if_not_exists">
+            <available file="${procesy5_system_schema.xml}"/>
+        </condition>
+    </target>
+    
+    <target name="procesy5_system_schema.xml_if_not_exists" depends="procesy5_system_schema.xml_if_not_exists_check" unless="${procesy5_system_schema.xml_if_not_exists_check}" description="For external ant calls to be sure that xmlshema is generated if not - do it">
+        <echo>procesy5_system_schema.xml_if_not_exists we do it by antcall procesy5_system_schema.xml </echo>
+        <antcall target="procesy5_system_schema.xml"/>
+    </target>
+    
+    
+    <target name="procesy5_system_schema.xml" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
+        <mkdir dir="${default_db.instance.xml}"/>
+        <mkdir dir="${transformed.local}"/>
+        <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
+        <echo> run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${public_html}; </echo>
+        <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+        <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${empty.xml}"  destdir="./" out="${procesy5_system_schema.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
+            </factory>
+            <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
+            <param name="cache" expression="refresh"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+
+        <delete file="${vrtfNamespaces.xml}"/>        
+        <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${vrtfNamespaces.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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
+            </factory>
+            <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
+            <param name="cache" expression="refresh"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="procesy5_system_schema.xml_complete" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
+        <mkdir dir="${default_db.instance.xml}"/>
+        <mkdir dir="${transformed.local}"/>
+        <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+        <echo> run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${public_html}; </echo>
+        <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${empty.xml}"  destdir="./" out="${procesy5_system_schema.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
+            </factory>
+            <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
+            <param name="cache" expression="refresh"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        
+        <delete file="${vrtfNamespaces.xml}"/>        
+        <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${vrtfNamespaces.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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
+            </factory>
+            <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
+            <param name="cache" expression="refresh"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="generate_schema_with_id" depends="procesy5_system_schema.xml" description="first we generate schema to check if all have correct ID">
+        <!-- schema @id fixing -->
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        <delete file="${parse_schema_to_generate_id_raport.xml}"/>
+        <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+        <xslt basedir="./" style="${parse_schema_to_generate_id.xsl}"   in="${empty.xml}"  destdir="./" out="${parse_schema_to_generate_id_raport.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}parse_schema_to_generate_id"/>
+            </factory>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
+            <param name="new-schema-with-ID-to-move-and-rename-to-xsd" expression="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="NamespaceBinding.xml" description="To generate config for NamespaceBinding.xml for use in SimpleSchema for related features etc - correctly use namespace prefix and url for API requests">
+        <xslt basedir="./" style="${TargetNamespaceBindings.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${NamespaceBinding.xml}.temp.xml"  force="true">
+            <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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}NamespaceBinding.xml"/>
+            </factory>
+            <param name="targetNamespace_DEFAULTS_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
+            <param name="targetNamespace_DEFAULTS_prefix_objects" expression="${targetNamespace_DEFAULTS_prefix_objects}"/>
+            <param name="TargetNamespaceBindingsApiUrl" expression="${TargetNamespaceBindingsApiUrl}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        
+        
+    </target>
+    
+    <target name="element_complexType.xml" depends="procesy5_system_schema.xml_complete,NamespaceBinding.xml" description=" generate list of elements and Complextype to generate flat and tr_map">
+        <delete file="${element_complexType.xml}"/>
+        <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${element_complexType.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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}element_complexType"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="build_complexType" depends="element_complexType.xml"  description="we generate all complexType for all known elements and complexType in schema">
+        <delete dir="${build_complexType.local}"/>
+        <xslt basedir="./" style="${build_complexType.xsl}"  in="${element_complexType.xml}"  destdir="./" out="${build_complexType_raport.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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}element_complexType"/>
+            </factory>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <target name="build_tr_map" depends="build_complexType" description="we generate all tr_map for all known elements and complexType in schema">
+        <delete dir="${p5_tr_map.local}"/>
+        <xslt basedir="./" style="${p5_tr_map.xsl}"  in="${element_complexType.xml}"  destdir="./" out="${build_tr_map_raport.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="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd}element_complexType_tr_map"/>
+            </factory>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <!-- depends="build_tr_map" -->
+    <target name="build_detect_resource_type" depends="build_tr_map"   description="we generate detect_resource_type for use it for generate detect_objects_parent_relations">
+        <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+        <delete file="${detect_resource_type.xml}"/>
+        <xslt basedir="./" style="${detect_resource_type.xsl}"  in="${empty.xml}"  destdir="./" out="${detect_resource_type.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}detect_resource_type"/>
+            </factory>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
+            <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/> <!-- todo for better handle DefaultObjects etc -->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        <!-- file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/transformed/resources_tree_required_occurs_raport/detect_resource_type-\-http__x3A____x2F____x2F__biuro.biall__x2D__net.pl__x2F__xmlschema_procesy5__x2F__default_db.xml-->   
+    </target>
+    
+    <!-- depends="build_detect_resource_type" -->
+    <target name="build_detect_objects_parent_relations" depends="build_detect_resource_type"   description="we generate detect resources parent relations ">
+        <delete dir="${detect_resource_type.local}"/>
+        <delete file="${detect_objects_parent_relations.xml}"/>
+        
+        <xslt basedir="./" style="${detect_objects_parent_relations.xsl}"  in="${detect_resource_type.xml}"  destdir="./" out="${detect_objects_parent_relations.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}detect_resource_type"/>-->
+            </factory>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        
+    <!--file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/transformed/resources_tree_required_occurs_raport/detect_objects_parent_relations-\-http__x3A____x2F____x2F__biuro.biall__x2D__net.pl__x2F__xmlschema_procesy5__x2F__default_db.xml-->
+    </target>
+    
+    
+    
+    <!-- depends="build_detect_objects_parent_relations" -->
+    <target name="build_simpleSchema_for_recurse_ant" depends="build_detect_objects_parent_relations" description="we generate by using main_build_recurse_ant.dita_with_id.xsl simple transport map for use in interfaces and ant xml output">
+        <delete dir="${simpleSchema.local}"/>
+        <xslt basedir="./" style="${main_build_recurse_ant.dita_with_id.xsl}"  in="${detect_objects_parent_relations.xml}"  destdir="./" out="${main_build_recurse_ant.dita_with_id_raport.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="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}build_simpleSchema_for_recurse_ant"/>
+            </factory>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <!--<param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-->
+            <param name="namespace_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
+            <param name="detect_resource_type_dir" expression="${detect_resource_type.local}"/>
+            <param name="build_complexType_dir" expression="${build_complexType.local}"/>
+            <param name="simpleSchema_dir" expression="${simpleSchema.local}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        
+    </target>
+    <!--<target name="generate_ant_data_business_modules" description="generate modules specified in "/>
+    <target name="read_db_structure" description="we read db structure to than analyze it against missing or not correct fields/tables/indexes "/>
+    <target name="modify_uncorrect_structure" description="we add missing structure fields/tables/indexes "/>
+    <target name="add_missing_structure" description="we add missing structure fields/tables/indexes "/>
+    <target name="read_installed_business_objects" description="we read current installed business_objects to verify to update them (version)"/>
+    <target name="update_installed_business_objects" description="we update current installed business_objects (version) and applying transaction apply template if some data need to be updated"/>
+    <target name="install_business_objects" description="we install business_objects (version) and applying transaction apply template if some data need to be updated - rebuild references or instances "/>
+    -->
+    
+    
+    
+    
+    <target name="detect_objects_parent_relations_clean" description="piewsze czyszczenie - pewnie nie ma @id">
+        <!--<exec command="make">
+            <arg line="clean"/>
+        </exec>-->
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        <delete dir="${detect_resource_type.local}"/>
+        <delete dir="${transformed.local}"/>
+        <delete dir="${build_complexType.local}"/>
+        <delete dir="${p5_tr_map.local}"/>
+        <delete dir="${simpleSchema.local}"/>
+    </target>
+    <!--<target name="detect_objects_parent_relations" depends="detect_objects_parent_relations_clean" description="pierwsze szukanie relacji - moga nie miec @id">
+        <!-\-<exec command="make" failifexecutionfails="no">
+            <arg line="detect_objects_parent_relations"/>
+        </exec>-\->
+        <antcall target="build_complexType"/>
+        <antcall target="build_tr_map"/>
+        <antcall target="build_detect_resource_type"/>
+    </target>-->
+    
+    
+    <target depends="generate_schema_with_id" name="new-schema-with-ID-to-move-and-rename-to-xsd_test">
+        <condition taskname="new-schema-with-ID-to-move-and-rename-to-xsd"    property="new-schema-with-ID-to-move-and-rename-to-xsd_exists">
+            <available file="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        </condition>
+    </target>
+    
+    <target name="new-schema-with-ID-to-move-and-rename-to-xsd" depends="new-schema-with-ID-to-move-and-rename-to-xsd_test" if="${new-schema-with-ID-to-move-and-rename-to-xsd_exists}">
+        <copy todir="${public_html}">
+            <fileset dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        </copy>
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+    </target>
+    
+    
+    <!--<target name="detect_objects_parent_relations_clean_complete" if="${new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists}" description="drugi raz czyscimy na czysto - z @id">
+        <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        <delete dir="${detect_resource_type.local}"/>
+        <delete dir="${transformed.local}"/>
+        <delete dir="${build_complexType.local}"/>
+        <delete dir="${p5_tr_map.local}"/>
+        <delete dir="${simpleSchema.local}"/>
+        <!-\-<exec command="make">
+            <arg line="clean"/>
+        </exec>-\->
+    </target>-->
+
+    <!--<target name="new-schema-with-ID-to-move-and-rename-to-xsd_test_complete">
+        <condition taskname="detect_objects_parent_relations_complete"    property="new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists">
+            <available file="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+        </condition>
+    </target>-->
+    
+    <!--<target name="detect_objects_parent_relations_complete" if="${new-schema-with-ID-to-move-and-rename-to-xsd_complete_exists}" depends="new-schema-with-ID-to-move-and-rename-to-xsd_test_complete,detect_objects_parent_relations_clean_complete" description=" tutaj juz sa skopiowane z @id">
+        <!-\-<exec command="make">
+            <arg line="detect_objects_parent_relations"/>
+        </exec>-\->
+        <!-\-<antcall target="build_complexType"/>
+        <antcall target="build_tr_map"/>
+        <antcall target="build_detect_resource_type"/>-\->
+        <!-\-<antcall target="build_simpleSchema_for_recurse_ant"/> <!-\\- to wystarczy - wyzwala sie kolejno po dependency -\\->-\->
+    </target>-->
+    
+    <target name="sync_p5_tr_map_with_se" depends="new-schema-with-ID-to-move-and-rename-to-xsd,build_simpleSchema_for_recurse_ant" description="syncrhonizacja wygenerowanych map z default_db.instance/p5_tr_map do SE/schema/public_instance/p5_tr_map">
+        <delete dir="${p5_tr_map.remote}" failonerror="no"/>
+        <!--<copydir src="${p5_tr_map.local}" dest="${p5_tr_map.remote}" />-->
+        <mkdir dir="${p5_tr_map.remote}"/>
+        <copy todir="${p5_tr_map.remote}">
+            <fileset dir="${p5_tr_map.local}"/>
+        </copy>
+        <delete dir="${detect_resource_type.remote}" failonerror="no"/>
+        <copy todir="${detect_resource_type.remote}">
+            <fileset dir="${detect_resource_type.local}"/>
+        </copy>
+        <delete dir="${table.remote}" failonerror="no"/>
+        <copy todir="${table.remote}">
+            <fileset dir="${table.local}"/>
+        </copy>
+        <delete dir="${build_complexType.remote}" failonerror="no"/>
+        <copy todir="${build_complexType.remote}">
+            <fileset dir="${build_complexType.local}"/>
+        </copy>
+        <delete dir="${simpleSchema.remote}" failonerror="no"/>
+        <copy todir="${simpleSchema.remote}">
+            <fileset dir="${simpleSchema.local}"/>
+        </copy>
+        
+    </target>
+    
+    
+</project>

+ 35 - 0
SE/schema/default_db_xml_cache.public/appinfo.xsd

@@ -603,4 +603,39 @@ Ostatni wezel bedzie miec powtorzony ten numer w polu @change_optimize_id_root</
             <xs:attribute name="xpath_value"/>
         </xs:complexType>
     </xs:element>
+    <xs:element name="NamespaceBinding">
+        <xs:annotation>
+            <xs:documentation>${basedir}/config/NamespaceBinding.xml</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" ref="system_cache__appinfo:binding"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="binding">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="system_cache__appinfo:prefix">
+                    <xs:annotation>
+                        <xs:documentation>Describe which prefix to use to retrieve objects from api  (used temporary - should use namespace URL)</xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element maxOccurs="unbounded" ref="system_cache__appinfo:api"/>
+            </xs:sequence>
+            <xs:attribute name="bindPolicy" use="required" type="xs:NCName"/>
+            <xs:attribute name="targetNamespace" use="required" type="xs:anyURI"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="api">
+        <xs:complexType>
+            <xs:simpleContent>
+                <xs:extension base="xs:anyURI">
+                    <xs:attribute name="Strip" type="xs:integer"/>
+                    <xs:attribute name="type" use="required" type="xs:NCName"/>
+                </xs:extension>
+            </xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="prefix" type="xs:NCName"/>
 </xs:schema>

+ 86 - 10
SE/schema/default_db_xml_cache.public/build_ant_universal_by_xsl_match.xsl

@@ -30,6 +30,7 @@
     <xsl:param name="threadCount" select="10"/>
     <xsl:param name="ant-launcher.jar" required="yes"/>
     
+    
     <xsl:template match="*">
         <xsl:choose>
             <xsl:when test="name()=$match_root_element">
@@ -61,16 +62,26 @@
                             <arg value="{$antfile}"/>
                             <!--<arg value="-DXmx5512m"/>--><!-- TODO test if this is working?-->
                             <xsl:apply-templates/>
-                            <xsl:if test="$properties.xml">
+                            
+                            <xsl:variable name="properties_temp">
+                                <xsl:call-template name="properties"/>
+                            </xsl:variable>
+                            
+                            <!--<xsl:message>#71 count $properties_temp= <xsl:value-of select="count($properties_temp/*)"/></xsl:message>-->
+                            <xsl:for-each select="$properties_temp/*[@name]"> <!-- BUG in saxon engine!!! without filter it found node that is not in this variable -->
+                                <arg value="-D{@name}={@value}"/>
+                            </xsl:for-each>
+                            
+                            <!--<xsl:if test="$properties.xml">
                                 <xsl:for-each select="doc($properties.xml)/*/*">
                                     <arg value="-D{@name}={@value}"/>
                                 </xsl:for-each>
-                            </xsl:if>
-                            <xsl:if test="$properties_override.xml">
+                            </xsl:if>-->
+                            <!--<xsl:if test="$properties_override.xml">
                                 <xsl:for-each select="doc($properties_override.xml)/*/*">
                                     <arg value="-D{@name}={@value}"/>
                                 </xsl:for-each>
-                            </xsl:if>
+                            </xsl:if>-->
                             <xsl:if test="$target"><arg value="{$target}"/></xsl:if>
                         </java>
                     </xsl:when>
@@ -81,21 +92,28 @@
                             <xsl:attribute name="target" select="$target"/>
                         </xsl:if>
                         <xsl:apply-templates/>
-                            <xsl:if test="$properties_override.xml">
+                            <xsl:variable name="properties">
+                                <xsl:call-template name="properties"/>
+                            </xsl:variable>
+                            <xsl:copy-of select="$properties"/>
+                            <!--<xsl:if test="$properties_override.xml">
                             <xsl:copy-of select="doc($properties_override.xml)/*/*"></xsl:copy-of>
-                        </xsl:if>
-                        <xsl:if test="$properties.xml">
+                        </xsl:if>-->
+                        <!--<xsl:if test="$properties.xml">
                             <xsl:copy-of select="doc($properties.xml)/*/*"></xsl:copy-of>
-                        </xsl:if>
+                        </xsl:if>-->
                         </ant>
                     </xsl:otherwise>
                 </xsl:choose>
-                
             </xsl:when>
             <xsl:when test="name()=$match_child_element">
                 <xsl:choose>
                     <xsl:when test="$parallel">
+                        <!--<xsl:comment><xsl:value-of select="$match_child_element_property_name"/> = <xsl:value-of select="text()"/></xsl:comment>-->
                         <arg value="-D{$match_child_element_property_name}={text()}"/>
+                        <!--<xsl:element name="arg">
+                            <xsl:attribute name="value" select="'jasiu'"/>
+                        </xsl:element>-->
                     </xsl:when>
                     <xsl:otherwise>
                         <property>
@@ -105,10 +123,68 @@
                     </xsl:otherwise>
                 </xsl:choose>
             </xsl:when>
-            <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+            <xsl:otherwise>
+                <!--<xsl:message>#123 otherwise dla <xsl:value-of select="name()"/>; </xsl:message>-->
+                <xsl:apply-templates/>
+            </xsl:otherwise>
         </xsl:choose>
     </xsl:template>
     
+    
+    <xsl:template name="properties">
+        <!--<xsl:message>#117 called properties</xsl:message>-->
+        <xsl:choose>
+            <xsl:when test="$properties_override.xml and $properties.xml">
+                <xsl:variable name="properties_override" select="doc($properties_override.xml)"/>
+                <xsl:variable name="properties">
+                    <xsl:apply-templates mode="properties_override" select="doc($properties.xml)">
+                        <xsl:with-param name="properties_override" select="$properties_override"/>
+                    </xsl:apply-templates>
+                </xsl:variable>
+                <xsl:copy-of select="$properties"/>
+                <xsl:for-each select="$properties_override/*/*">
+                    <xsl:choose>
+                        <xsl:when test="$properties/property[@name= current()/@name]"/>
+                        <xsl:otherwise>
+                            <property name="{@name}" value="{@value}"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:when test="$properties.xml">
+                <xsl:copy-of select="doc($properties.xml)/*/*"></xsl:copy-of>
+            </xsl:when>
+            <xsl:when test="$properties_override.xml">
+                <xsl:copy-of select="doc($properties_override.xml)/*/*"></xsl:copy-of>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:apply-templates></xsl:apply-templates>
+    </xsl:template>
+    
+    
+    <xsl:template match="properties" mode="properties_override">
+        <xsl:param name="properties_override" required="yes"/>
+        <!--<xsl:message>#137 matching properties</xsl:message>-->
+        <xsl:for-each select="property">
+            <xsl:choose>
+                <xsl:when test="$properties_override//@name= current()/@name">
+                    <xsl:message>#137 overriding @name <xsl:value-of select="@name"/> from val=<xsl:value-of select="@value"/>; to val=<xsl:value-of select="$properties_override//.[@name=current()/@name]/@value"/>;</xsl:message>
+                    <xsl:element name="{name()}">
+                        <xsl:attribute name="name" select="@name"/>
+                        <xsl:attribute name="value" select="$properties_override//.[@name= current()/@name]/@value"/>
+                    </xsl:element>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:element name="{name()}">
+                        <xsl:attribute name="name" select="@name"/>
+                        <xsl:attribute name="value" select="@value"/>
+                    </xsl:element>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:for-each>
+    </xsl:template>
+    
+    
     <xsl:template match="text()|comment()"/>
     
     

+ 78 - 70
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -21,7 +21,7 @@
     
     
     
-    <xsl:include href="escaped_html_to_xml.xsl"/>
+    <!--<xsl:include href="escaped_html_to_xml.xsl"/>-->
     
     <!--
     <property name="url" value="${url}"/> - to point what is record/table to download
@@ -32,7 +32,7 @@
     <!-- variables to be set first by GUI first_request from executing API (php -> bash)-->
     <xsl:param name="uuid" required="yes" /> <!-- pewnie bedziemy ignorowac i dzialac na bazie ${'wfs_output'} ktory juz jest tempfilem -->
     <xsl:param name="passwordBase64Basic" required="yes" />
-    <xsl:param name="url" />
+    <!--<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 -->
@@ -79,7 +79,7 @@
     <xsl:param name="process_locks"/>
     <xsl:param name="get_wfs" required="yes"/>
     <xsl:param name="debug_xsl_out_filename" required="yes" />  
-    <xsl:param name="debug" select="1"/>
+    <xsl:param name="debug" select="5"/>
     <!--<xsl:variable name="temp_current">
         <xsl:choose>
             <xsl:when test="$temp='temp'">
@@ -231,10 +231,10 @@
                         <xsl:attribute name="name" select="'php_session_id'"/>
                         <xsl:attribute name="value" select="$cookie_curl_option"/>
                     </xsl:element>
-                    <xsl:element name="property">
+                    <!--<xsl:element name="property">
                         <xsl:attribute name="name" select="'url'"/>
                         <xsl:attribute name="value" select="$url"/>
-                    </xsl:element>
+                    </xsl:element>-->
                     <xsl:element name="property">
                         <xsl:attribute name="name" select="'webRootUrl'"/>
                         <xsl:attribute name="value" select="$webRootUrl"/>
@@ -621,10 +621,10 @@
                         <xsl:attribute name="name" select="'php_session_id_tested'"/>
                         <xsl:attribute name="value" select="$cookie_curl_option"/>
                     </xsl:element>
-                    <xsl:element name="property">
+                    <!--<xsl:element name="property">
                         <xsl:attribute name="name" select="'url'"/>
                         <xsl:attribute name="value" select="$url"/>
-                    </xsl:element>
+                    </xsl:element>-->
                     <xsl:element name="property">
                         <xsl:attribute name="name" select="'webRootUrl'"/>
                         <xsl:attribute name="value" select="$webRootUrl"/>
@@ -1751,7 +1751,67 @@
         <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:if test="$debug &gt; 2"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message></xsl:if>&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>
+        <xsl:param name="RelatedFilter"/>
+        <xsl:if test="$debug &gt; 2"><xsl:message>#1754 name="simpleTypeMakeOgcFilter_merge"
+            $simpleTypeMakeOgcFilter = <xsl:copy-of select="$simpleTypeMakeOgcFilter"></xsl:copy-of>
+            $xpath_dita = <xsl:copy-of select="$xpath_dita"/>
+            $xpath_value_dita = <xsl:copy-of select="$xpath_value_dita"/>
+            #EOF
+        </xsl:message>
+        </xsl:if>
+        <!--&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose><xsl:when test="$RelatedFilter"><xsl:if test="$debug &gt; 2"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message></xsl:if>&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;-->
+        <!-- &amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose>
+            <xsl:when test="$RelatedFilter"><xsl:if test="$debug &gt; 2">
+            <xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message>
+            </xsl:if>&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; 
+        -->
+        <!--<RelatedFilter xpath="PARENT_ID" xpath_value=""/>-->
+        <xsl:value-of select="'&amp;Filter=&lt;ogc:Filter&gt;'"/>
+        <xsl:variable name="Filter">
+            <And>
+                <xsl:for-each select="$RelatedFilter">
+                    <ogc:PropertyIsEqualTo>
+                        <ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName>
+                        <ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal>
+                    </ogc:PropertyIsEqualTo>
+                </xsl:for-each>
+                <ogc:PropertyIsEqualTo>
+                    <ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName>
+                    <ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal>
+                </ogc:PropertyIsEqualTo>
+                <And>
+                <xsl:for-each select="$simpleTypeMakeOgcFilter/*">
+                    <xsl:copy-of select="."/>
+                </xsl:for-each>
+                </And>
+            </And>
+        </xsl:variable>
+        <xsl:apply-templates select="$Filter" mode="simpleTypeMakeOgcFilter_merge_apply"/>
+        <xsl:value-of select="'&lt;/ogc:Filter&gt;'"/>
+    </xsl:template>
+    
+    <xsl:template match="And" mode="simpleTypeMakeOgcFilter_merge_apply">
+        <xsl:choose>
+            <xsl:when test="child::node()">
+                <xsl:value-of select="'&lt;ogc:And&gt;'"/>
+                    <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
+                <xsl:value-of select="'&lt;/ogc:And&gt;'"/>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+    <xsl:template match="*" mode="simpleTypeMakeOgcFilter_merge_apply" xpath-default-namespace="http://www.opengis.net/ogc">
+        <xsl:value-of select="concat('&lt;',name(),'&gt;')"/>
+            <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
+        <xsl:value-of select="concat('&lt;/',name(),'&gt;')"/>
+    </xsl:template>
+    
+    <xsl:template match="text()" mode="simpleTypeMakeOgcFilter_merge_apply">
+        <xsl:value-of select="."/>
+    </xsl:template>
     
     <!-- second step from local ant leaf -->
     <!-- wyzwalane przez  http://saxon.sf.net/feature/initialMode w template match="RelatedFeature" mode ant_target , 
@@ -1909,32 +1969,36 @@
                                         <xsl:with-param name="html" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
                                     </xsl:call-template>
                                 </xsl:variable>-->
-                                <xsl:variable name="enter_to_ph">
+                                <!--<xsl:variable name="enter_to_ph">
                                     <xsl:apply-templates mode="enter_to_ph" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]">
                                         <xsl:with-param name="count" select="count($input_obj_with_xpath/node()[local-name()=current()/@xpath])"/>
                                         <xsl:with-param name="element" select="name()"/>
-                                        <!--<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>--><!-- mozliwosc wybrania pierwszego wyrazu np ' ' -->
-                                        <!--<xsl:with-param name="xpath_token" select="@xpath_token"/>--><!-- mozliwosc wybrania pierwszego wyrazu np 1 -->
+                                        <!-\-<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np ' ' -\->
+                                        <!-\-<xsl:with-param name="xpath_token" select="@xpath_token"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np 1 -\->
                                     </xsl:apply-templates>
-                                </xsl:variable>
+                                </xsl:variable>-->
                                 <xsl:variable name="enter_to_ph">
                                     <xsl:choose>
                                         <xsl:when test="@xpath_token_filter and @xpath_token ">
                                             <!-- implementacja filtra dla czegos oddzielonego parametrem -->
-                                            <xsl:variable name="xpath_token_filter" select="tokenize($enter_to_ph,@xpath_token_filter)"/>
+                                            <xsl:variable name="xpath_token_filter" select="tokenize($input_obj_with_xpath/node()[local-name()=current()/@xpath],@xpath_token_filter)"/>
                                             <xsl:for-each select=" tokenize(@xpath_token,' ')">
                                                 <xsl:variable name="xpath_token" select="number(.)"/>
                                                 <xsl:copy-of select="$xpath_token_filter[$xpath_token]"></xsl:copy-of>
                                             </xsl:for-each>
                                         </xsl:when>
+                                        <xsl:when test="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*">
+                                            <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*"/>
+                                        </xsl:when>
                                         <xsl:otherwise>
-                                            <xsl:copy-of select="$enter_to_ph"/>
+                                            <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
                                         </xsl:otherwise>
                                     </xsl:choose>
                                 </xsl:variable>
                                 <xsl:copy-of select="$enter_to_ph"/>
                             </xsl:when>
                         </xsl:choose>
+                        <!--<xsl:comment>#1938 value of text()</xsl:comment>-->
                         <xsl:value-of select="text()"/>
                         <xsl:apply-templates mode="after_first_ant_assing_vars_childs">
                             <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
@@ -2129,62 +2193,6 @@
     <!-- pozbieranie do kupy wszystkich xmli i zlozenie dity -->
     
     
-    <xsl:template match="*" mode="enter_to_ph">
-        <xsl:param name="count"/>
-        <xsl:param name="element"/>
-        <xsl:variable name="current" select="."/>
-        <xsl:variable name="surround_with">
-            <xsl:choose>
-                <xsl:when test="$element='p'"><xsl:value-of select="'codeblock'"/></xsl:when>
-                <xsl:when test="$element='bodydiv'"><xsl:value-of select="'p'"/></xsl:when>
-                <xsl:otherwise><xsl:value-of select="'codeblock'"/></xsl:otherwise>
-            </xsl:choose>
-        </xsl:variable>
-        <xsl:choose>
-            <xsl:when test=" contains(  text(),'&#13;')">
-                <xsl:for-each select="tokenize(  text(),'&#13;')">
-                    <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:choose>
-                    <xsl:when test="$count &gt;1">
-                        <codeblock>
-                                <!--<xsl:attribute name="DDxpath" select="@xpath"/>-->
-                                <!--DN(<xsl:value-of select="$element"/>)-->
-                                <!--count:<xsl:value-of select="$count"/>-->
-                            <xsl:copy-of select=" text()"/>
-                        </codeblock>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates mode="enter_to_ph_text">
-                            <xsl:with-param name="element" select="$element"/>
-                        </xsl:apply-templates>
-                        <!--<xsl:copy-of select=" text()"/>-->
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-    <!-- dodanie enterow dla tabel w ktorych wyrazy sa dluzsze niz 10 znakow  -->
-    <xsl:template match="text()" mode="enter_to_ph_text">
-        <xsl:param name="element" required="yes"/>
-        <xsl:choose>
-            <xsl:when test="$element='entry'">
-                <xsl:for-each select="tokenize(.,' ')">
-                    <xsl:value-of select="' '"/>
-                    <xsl:variable name="phrase" select="."/>
-                    <xsl:for-each select="1 to string-length(.)">
-                        <xsl:if test="position() mod 12 = 0"><xsl:value-of select="' -'"/></xsl:if>
-                        <xsl:value-of select="substring($phrase,position(),1)"/>
-                    </xsl:for-each>
-                </xsl:for-each>
-            </xsl:when>
-            <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
     
     
     <xsl:template name="test_xpath_query">

+ 7 - 0
SE/schema/default_db_xml_cache.public/build_recurse_ant_loop_path_maintain.xsl

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+</xsl:stylesheet>

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

@@ -20,6 +20,10 @@
     <xsl:param name="with_RelatedFeatureLoop" select="false()"/>
     <xsl:param name="simpleSchema_dir" required="yes"/>
 
+
+    <xsl:include href="default_db/enter_to_ph.xsl"/>
+    <xsl:include href="escaped_html_to_xml.xsl"/>
+
     <!-- template do zlaczenia wszystkich xmli z danymi z dita 
     description="z plikow temp/$uuid.* buduje $out_task.dita " -->
     
@@ -794,6 +798,28 @@
         <xsl:param name="dita.map"/>
         <xsl:choose>
             <xsl:when test="$dita.map"/>
+            <xsl:when test="../@format">
+                <xsl:message>#802 we use format <xsl:value-of select="../@format"/>; </xsl:message>
+                <xsl:choose>
+                    <xsl:when test="../@format='enter_to_ph'">
+                        <xsl:variable name="node">
+                            <xsl:element name="{../name()}">
+                                <xsl:copy-of select="."/>
+                            </xsl:element>
+                        </xsl:variable>
+                        <xsl:variable name="enter_to_ph">
+                            <xsl:apply-templates mode="enter_to_ph" select="$node">
+                                <xsl:with-param name="count" select="count(.)"/>
+                                <xsl:with-param name="element" select="../name()"/>
+                                <!--<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>--><!-- mozliwosc wybrania pierwszego wyrazu np ' ' -->
+                                <!--<xsl:with-param name="xpath_token" select="@xpath_token"/>--><!-- mozliwosc wybrania pierwszego wyrazu np 1 -->
+                            </xsl:apply-templates>
+                        </xsl:variable>
+                        111 <xsl:copy-of select="$enter_to_ph"/> 222
+                    </xsl:when>
+                    <xsl:otherwise><xsl:message terminate="yes">#810 unknown format <xsl:value-of select="../@format"/>; </xsl:message></xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
             <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
         </xsl:choose>
     </xsl:template>
@@ -801,10 +827,34 @@
         <xsl:param name="dita.map"/>
         <xsl:choose>
             <xsl:when test="$dita.map"/>
-            <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
+            <xsl:when test="../@format">
+                <xsl:message>#826 we use format <xsl:value-of select="../@format"/> for element: <xsl:value-of select="../name()"/> </xsl:message>
+                <xsl:choose>
+                    <xsl:when test="../@format='enter_to_ph'">
+                        <xsl:variable name="node">
+                            <xsl:element name="{../name()}">
+                                <xsl:copy-of select="."/>
+                            </xsl:element>
+                        </xsl:variable>
+                        <xsl:variable name="enter_to_ph">
+                            <xsl:apply-templates mode="enter_to_ph" select="$node">
+                                <xsl:with-param name="count" select="count(.)"/>
+                                <xsl:with-param name="element" select="../name()"/>
+                                <!--<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>--><!-- mozliwosc wybrania pierwszego wyrazu np ' ' -->
+                                <!--<xsl:with-param name="xpath_token" select="@xpath_token"/>--><!-- mozliwosc wybrania pierwszego wyrazu np 1 -->
+                            </xsl:apply-templates>
+                        </xsl:variable>
+                        AAA <xsl:copy-of select="$enter_to_ph"/> BBB
+                    </xsl:when>
+                    <xsl:otherwise><xsl:message terminate="yes">#810 unknown format <xsl:value-of select="../@format"/>; </xsl:message></xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message>#843 dont we use format @xml_id <xsl:value-of select="../@xml_id"/>; </xsl:message>
+                <xsl:copy-of select="."/></xsl:otherwise>
         </xsl:choose>
     </xsl:template>
     
-    <xsl:template match="@xml_id|@xpath_token_filter|@xpath_token"/>
+    <xsl:template match="@xml_id|@xpath_token_filter|@xpath_token|@format"/>
         
 </xsl:stylesheet>

+ 29 - 3
SE/schema/default_db_xml_cache.public/build_recurse_ant_xsl_xpath_filter.xsl

@@ -1,14 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
                 exclude-result-prefixes="xs"
                 version="2.0">
    <xsl:output indent="yes"/>
    <xsl:strip-space elements="*"/>
  
+   <xsl:include href="get_all_xsd.xsl"/>
+ 
    <xsl:param name="xpath_query" required="yes"/>
    <xsl:param name="default_db_xml_cache.public" required="yes"/>
- 
+   <xsl:param name="simpleSchema_dir" required="yes"/>
+   <xsl:param name="typeName" required="yes"/> <!-- like p5_default_db:CRM_PROCES to retrieve from simpleSchema_dir correct dir object/map -->
+   <xsl:param name="namespace_prefix_p5_tr_map" select="'default_db'"/>
+
+
+   <xsl:variable name="simpleSchema" select="doc( concat($simpleSchema_dir,'/',$namespace_prefix_p5_tr_map,'/', system_cache__appinfo:clean_object_prefix($typeName),'.xml' ))"/>
+
+
    <xsl:template match="xsl:stylesheet">
       <xsl:element name="{name()}">
          <xsl:copy-of select="namespace::node()"/>
@@ -142,7 +152,9 @@
                or (  contains(@match,'RelatedFeature') and @mode='after_first_ant_assing_vars' )
                            ">
             <xsl:element name="{name()}">
-               <xsl:apply-templates select="@*" mode="apply_xpath_filter"/>
+               <xsl:apply-templates select="@*" mode="apply_xpath_filter">
+                  <xsl:with-param name="mode" select="@mode"/>
+               </xsl:apply-templates>
                <xsl:comment>#60 generated xpath filter</xsl:comment>
                <xsl:copy-of select="*" copy-namespaces="no"/>
             </xsl:element>
@@ -152,6 +164,7 @@
    </xsl:template>
    
    <xsl:template mode="apply_xpath_filter" match="@match">
+      <xsl:param name="mode" required="yes"/>
       <!--<xsl:choose>
          <xsl:when test=" contains(.,'[')">
             <xsl:variable name="no_brackets_match" select=" substring-before(.,'[')"/>
@@ -164,7 +177,20 @@
             <xsl:attribute name="match" select="concat(.,'[child::node()',$xpath_query,']')"/>
          </xsl:otherwise>
       </xsl:choose>-->
-      <xsl:attribute name="match" select="concat(.,'[child::node()',$xpath_query,']')"/>
+      <xsl:variable name="EmptyRelatedLimit">
+         <xsl:choose>
+            <xsl:when test="$mode='after_first_ant_assing_vars'"/>
+            <!--<xsl:when test="$mode='after_first_ant_assing_vars_childs'"/>-->
+            <xsl:when test="1=2"/>
+            <xsl:otherwise>
+               <xsl:for-each-group select="$simpleSchema//(RelatedFeature|RelatedFeatureLoop)" group-by="@xpath_value">
+                  <xsl:value-of select='concat(" and ( not(@xpath_value=&apos;",@xpath_value,"&apos; ) or  ( ",@xpath_value,"/text()  and not(",@xpath_value,"/text()=&apos;0&apos;) ) or ",@xpath_value,"/@xpath )  ")'/>
+               </xsl:for-each-group>
+            </xsl:otherwise>
+         </xsl:choose>
+      </xsl:variable>
+      <xsl:attribute name="match" select="concat(.,'[child::node()',$xpath_query,' ',$EmptyRelatedLimit,']')"/>
+      
    </xsl:template>
    
    <xsl:template mode="apply_xpath_filter" match="@*">

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

@@ -65,7 +65,7 @@
             <property name="build_check_java_process_count.xml"  value="{$build_check_java_process_count.xml}"/>
             <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
             
-            <tempfile prefix=".builds_to_ant_set_parallel_java_process_max" suffix=".xml" destdir="{$temp}" >
+            <tempfile prefix=".builds_to_ant_set_parallel_java_process_max" suffix=".xml" destdir="{$temp}" deleteonexit="true" >
                 <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max',$loop_path_recurs,$loop_xpath_real)"/>
             </tempfile>
             
@@ -187,9 +187,9 @@
                     </xsl:otherwise>
                 </xsl:choose>
             </xsl:element>
-            <delete verbose="false">
+            <!--<delete verbose="false">
                 <xsl:attribute name="file" select="concat('${builds_to_ant_set_parallel_java_process_max',$loop_path_recurs,$loop_xpath_real,'}')"/>
-            </delete>
+            </delete>-->
         </project>
     </xsl:template>
     
@@ -210,7 +210,7 @@
             <property name="build_check_java_process_count.xml"  value="{$build_check_java_process_count.xml}"/>
             <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
             
-            <tempfile prefix=".builds_to_ant_set_parallel_java_process_max" suffix=".xml" destdir="{$temp}" >
+            <tempfile prefix=".builds_to_ant_set_parallel_java_process_max" suffix=".xml" destdir="{$temp}" deleteonexit="true" >
                 <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max',$loop_path_recurs,$loop_xpath_real)"/>
             </tempfile>
             
@@ -390,9 +390,9 @@
                 </target>
             </xsl:for-each>
             
-            <delete>
+            <!--<delete>
                 <xsl:attribute name="file" select="concat('${builds_to_ant_set_parallel_java_process_max',$loop_path_recurs,$loop_xpath_real,'}')"/>
-            </delete>
+            </delete>-->
         </project>
     </xsl:template>
     

+ 4 - 3
SE/schema/default_db_xml_cache.public/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl

@@ -59,13 +59,14 @@
         <xsl:apply-templates mode="#current"/>
     </xsl:template>-->
     
-    <xsl:template match="PROCES_TREE">
+    <xsl:template match="PROCES_TREE|PROCES_INIT" mode="ditamap_root">
         <map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:map.xsd">
             <title>
+                <xsl:if test="not(ID='0')">{ <xsl:value-of select="ID"/> } </xsl:if>
                 <xsl:value-of select="DESC"/>
             </title>
-            <xsl:apply-templates mode="ditamap"/>
+            <xsl:apply-templates mode="ditamap" select="."/>
         </map>
         <!--<xsl:result-document href="{$temp}/{$uuid}/build_image.xml" omit-xml-declaration="yes">
             
@@ -118,7 +119,7 @@
         <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>
         <xsl:choose>
             <xsl:when test="number(WIDTH) &gt; 600">
-                <image href="{ID}_image.{$ext}" width="600"></image>
+                <image href="{ID}_image.{$ext}" width="500"></image>
             </xsl:when>
             <xsl:otherwise>
                 <image href="{ID}_image.{$ext}" width="{WIDTH}"></image>

+ 215 - 45
SE/schema/default_db_xml_cache.public/default_db/IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI_tree_to_dita.xsl

@@ -19,32 +19,82 @@
     
     
     
-    <xsl:template mode="postprocess_root_IN7_MK_BAZA_DYSTRYBUCJI" match="RelatedFeatureRoot">
-        <xsl:comment>postprocess_root_IN7_MK_BAZA_DYSTRYBUCJI</xsl:comment>
+    <xsl:template mode="preprocess_root_IN7_MK_BAZA_DYSTRYBUCJI" match="RelatedFeatureRoot">
+        <xsl:comment>preprocess_root_IN7_MK_BAZA_DYSTRYBUCJI</xsl:comment>
             <xsl:for-each-group select="//(INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI)" group-by="ID">
                 <xsl:comment>#24 mam <xsl:value-of select="ID"/></xsl:comment>
-                <xsl:apply-templates mode="postprocess_gml_geometry_image_unique" select="."/>
-                <xsl:apply-templates mode="postprocess_gml_geometry_image" select="."/>
+                <xsl:apply-templates mode="preprocess_gml_geometry_image_unique" select="."/>
+                <xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>
             </xsl:for-each-group>
-            <xsl:for-each-group select="//(Rozdzielcza_rurociag_wsg84)" group-by="ID">
+            <!--<xsl:for-each-group select="//*[ contains( name(),'Rozdzielcza_')]" group-by="ID">
+                <xsl:message>#28 mam <xsl:value-of select="name()"/>/<xsl:value-of select="ID"/></xsl:message>
                 <xsl:comment>#28 mam <xsl:value-of select="ID"/></xsl:comment>
-                <xsl:apply-templates mode="postprocess_gml_geometry_image_unique" select="."/>
-                <xsl:apply-templates mode="postprocess_gml_geometry_image" select="."/>
+                <xsl:apply-templates mode="preprocess_gml_geometry_image_unique" select="."/>
+                <xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>
+            </xsl:for-each-group>-->
+            <!-- podsumowania typow laczone -->
+        <xsl:for-each-group select="//*[ contains( name(),'Rozdzielcza_')]" group-by="concat(ID_ZASOB,the_geom/node()/name())">
+            <xsl:variable name="fileindex" select="concat('Rozdzielcza_ID_ZASOB_',ID_ZASOB,'_',the_geom/node()/name())"/>
+                <xsl:apply-templates mode="system_cache__appinfo:images__write" select=".">
+                    <xsl:with-param name="fileindex" select="$fileindex"/>
+                </xsl:apply-templates>
+                <xsl:result-document href="{$ditadir}/{$fileindex}.gml">
+                    <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" 
+                        xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" 
+                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                        xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
+                        <xsl:attribute name="local-name" select="local-name()"/>
+                            <xsl:apply-templates mode="preprocess_gml_geometry_image_unique_group" select="current-group()/*"/>
+                    </wfs:FeatureCollection>
+                <!--<xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>-->
+                </xsl:result-document>
             </xsl:for-each-group>
+        
+        <!-- podsumwoania po stanach -->
+        
+        <xsl:for-each-group select="//*[ contains( name(),'Rozdzielcza_')]" group-by="concat( tokenize( name(),'_')[ count(tokenize( current()/name(),'_'))],the_geom/node()/name())">
+            <xsl:variable name="fileindex" select="concat('Rozdzielcza_STAN_', tokenize( name(),'_')[ count(tokenize( current()/name(),'_'))],'_',the_geom/node()/name())"/>
+            <xsl:apply-templates mode="system_cache__appinfo:images__write" select=".">
+                <xsl:with-param name="fileindex" select="$fileindex"/>
+            </xsl:apply-templates>
+            <xsl:result-document href="{$ditadir}/{$fileindex}.gml">
+                <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" 
+                    xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" 
+                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
+                    <xsl:attribute name="local-name" select="local-name()"/>
+                    <xsl:apply-templates mode="preprocess_gml_geometry_image_unique_group" select="current-group()/*"/>
+                </wfs:FeatureCollection>
+                <!--<xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>-->
+            </xsl:result-document>
+        </xsl:for-each-group>
+        
+    </xsl:template>
+    
+    <xsl:template match="*[contains(@system_cache__appinfo:type,'gml:')][ descendant::node()/name()='coordinates']" mode="preprocess_gml_geometry_image_unique_group">
+            <gml:featureMember>
+                <xsl:copy-of select="." copy-namespaces="no"/>
+            </gml:featureMember>
     </xsl:template>
     
     
-    <xsl:template match="INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI" mode="postprocess_gml_geometry_image">
-        <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>
-        <gml_to_image srcfile="{$temp}/{$uuid}/{ID}_{local-name()}.gml" dstfile="{$temp}/{$uuid}/{ID}_{local-name()}.png" />
+    
+    <xsl:template match="*|text()|comment()" mode="preprocess_gml_geometry_image_unique_group">
+        <xsl:message>#59 match <xsl:value-of select="name()"/></xsl:message>
+    </xsl:template>
+    
+    
+    <xsl:template match="INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI" mode="preprocess_gml_geometry_image">
+        <!--<gml_to_image srcfile="{$temp}/{$uuid}/{ID}_{local-name()}.gml" dstfile="{$temp}/{$uuid}/{ID}_{local-name()}.png.xml" fileindex="{ID}_{local-name()}" ditadir="{$temp}/{$uuid}"/>-->
+        <xsl:apply-templates mode="system_cache__appinfo:images__write" select="."/>
     </xsl:template>
     
-    <xsl:template match="Rozdzielcza_rurociag_wsg84" mode="postprocess_gml_geometry_image">
-        <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>
-        <gml_to_image srcfile="{$temp}/{$uuid}/{ID}_{local-name()}.gml" dstfile="{$temp}/{$uuid}/{ID}_{local-name()}.png" />
+    <xsl:template match="*[ contains( name(),'Rozdzielcza_')][ node()[contains(@system_cache__appinfo:type,'gml:')]//coordinates ]" mode="preprocess_gml_geometry_image">
+        <xsl:apply-templates mode="system_cache__appinfo:images__write" select="."/>
+        <!--<gml_to_image srcfile="{$temp}/{$uuid}/{ID}_{local-name()}.gml" dstfile="{$temp}/{$uuid}/{ID}_{local-name()}.png.xml" fileindex="{ID}_{local-name()}" ditadir="{$temp}/{$uuid}" />-->
     </xsl:template>
     
-    <xsl:template match="*" mode="postprocess_gml_geometry_image">
+    <xsl:template match="*" mode="preprocess_gml_geometry_image">
         <!--<xsl:apply-templates mode="postprocess_gml_geometry_image"/>-->
     </xsl:template>
     
@@ -109,14 +159,15 @@
             </prolog>
             <body><!--<xsl:value-of select="OPIS"/>-->
                 <!--<xsl:variable name="system_cache__appinfo:escaped_html_to_xml">-->
-                  <p> <xsl:call-template name="system_cache__appinfo:escaped_html_to_xml">
+                  <p>
+                    <xsl:call-template name="system_cache__appinfo:escaped_html_to_xml">
                         <xsl:with-param name="html" select="M_DIST_DESC"/>
                     </xsl:call-template>
                   </p> 
                 <!--</xsl:variable>-->
                 <!--<xsl:apply-templates select="$system_cache__appinfo:escaped_html_to_xml" mode="system_cache__appinfo:extract_text"/>-->
                 <xsl:apply-templates mode="gml_geometry_image" select="."/>
-                <xsl:apply-templates mode="gml_geometry_image" />
+                <!--<xsl:apply-templates mode="gml_geometry_image" />-->
                 <xsl:apply-templates mode="infrastructure_raport"  select="."/>
             </body>
         </topic>
@@ -242,22 +293,114 @@
         </topic>
     </xsl:template>
     
-    <xsl:template mode="infrastructure_raport" match="*"></xsl:template>
+    <xsl:template mode="infrastructure_raport" match="*"/>
     
     <xsl:template mode="infrastructure_raport" match="IN7_MK_BAZA_DYSTRYBUCJI">
-        <xsl:for-each-group select="*[Dlugosc]" group-by="local-name()">
+        <xsl:for-each-group select="*[ contains( name(),'Rozdzielcza_') ][descendant::node()/coordinates]" group-by="local-name()">
             <p>Dla warstwy <xsl:value-of select="local-name()"/>
-                Długość: <xsl:value-of select="sum(Dlugosc)"/>
-                Wg oferty nr 0  z dnia 0 cena Y 
-                wykonano X + rysunek
-                do wykonania Y + rysunek
-                do odbioru Z + rysunek
-                do wytyczenia ... + rysunek
-                do obmiaru powykonawczego ... + rysunek
-                
+                Długość: <xsl:value-of select="sum( current-group()/number(Dlugosc/text()))"/>
             </p>
         </xsl:for-each-group>
         
+        <!-- kosztorys -->
+        <xsl:for-each-group select="*[ contains( name(),'Rozdzielcza_') ][descendant::node()/coordinates ]" group-by="concat(ID_ZASOB,the_geom/node()/name())">
+            <xsl:choose>
+                <xsl:when test="ID_ZASOB/text()">
+                    <p>Rodzaj prac (ID_ZASOB)<xsl:value-of select="ID_ZASOB"/>; <xsl:value-of select="CRM_LISTA_ZASOBOW/DESC"/> ;
+                        <xsl:variable name="price" select="ID_KORESP_OFFER/CRM_LISTA_ZASOBOW_OFFERS[CRM_LISTA_ZASOBOW_ID/text()=current()/ID_ZASOB]/OFFER_PRICE_PER_RESOURCE_UNIT"/>
+                      <codeblock> 
+                        Ilosc: <xsl:value-of select="sum( current-group()/ number(Dlugosc))"/>
+                        Cena: <xsl:value-of select="$price"/>
+                        Wartość: <xsl:value-of select="( number(ID_KORESP_OFFER/CRM_LISTA_ZASOBOW_OFFERS[CRM_LISTA_ZASOBOW_ID/text()=current()/ID_ZASOB]/OFFER_PRICE_PER_RESOURCE_UNIT) * sum(current-group()/number(Dlugosc)))"/>
+                        Wykonawca z oferty: <xsl:value-of select="ID_KORESP_OFFER/K_ZAWARTOS"/> nasz znak: <xsl:value-of select="concat(ID_KORESP_OFFER/ID_PROJECT,'-',ID_KORESP_OFFER/ID)"/> <xsl:value-of select="ID_KORESP_OFFER/K_OD_KOGO"/> z dnia <xsl:value-of select="ID_KORESP_OFFER/K_DATA_OTRZYM_KORESP"/>
+                      </codeblock>
+                    </p>
+                    <xsl:if test="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]"><p>  Uzgodnienia ZUD: </p></xsl:if>
+                    <xsl:for-each select="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]">
+                        <p>
+                            <codeblock>
+                            <xsl:value-of select="name()"/>
+                            id: <xsl:copy-of select="ID_PROJECT/text()"/>-<xsl:copy-of select="ID/text()"/>
+                            Z kim: <xsl:copy-of select="K_OD_KOGO/text()"/>
+                            data : <xsl:copy-of select="K_DATA_OTRZYMANEJ_KORESP/text()"/>
+                            zawartość: <xsl:copy-of select="K_ZAWARTOS/text()"/>
+                            </codeblock>
+                        </p>
+                    </xsl:for-each>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:for-each-group select="current-group()" group-by="name()">
+                    <p>
+                        Nieustalony typ kosztorysu: Dlugosc: <xsl:value-of select="sum(current-group()/number(Dlugosc))"/> ilosc: <xsl:value-of select="count( current-group())"/>
+                    </p>
+                        <xsl:if test="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]"><p>  Uzgodnienia ZUD: </p></xsl:if>
+                        <xsl:for-each select="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]">
+                                <p>
+                                    <codeblock>
+                                         <xsl:value-of select="name()"/>
+                                         id: <xsl:copy-of select="ID_PROJECT/text()"/>-<xsl:copy-of select="ID/text()"/>
+                                         Z kim: <xsl:copy-of select="K_OD_KOGO/text()"/>
+                                         data : <xsl:copy-of select="K_DATA_OTRZYMANEJ_KORESP/text()"/>
+                                         zawartość: <xsl:copy-of select="K_ZAWARTOS/text()"/>
+                                    </codeblock>
+                                </p>
+                            </xsl:for-each>
+                    </xsl:for-each-group>
+                </xsl:otherwise>
+            </xsl:choose>
+            <!--<p> rysunek grupy obiektow o tym stanie</p>
+            <xsl:apply-templates select="current-group()" mode="gml_geometry_image_group">
+                <xsl:with-param name="fileindex" select="ID_ZASOB"/>
+            </xsl:apply-templates>-->
+            <p> raport graficzny</p>
+            <xsl:apply-templates mode="gml_geometry_image_group" select=".">
+                <xsl:with-param name="fileindex" select="concat('Rozdzielcza_ID_ZASOB_',ID_ZASOB,'_',the_geom/node()/name())"/>
+            </xsl:apply-templates>
+            
+        </xsl:for-each-group>
+        
+        <!-- Raport po stanach typow inwestycji -->
+        
+        <xsl:for-each-group select="*[ contains( name(),'Rozdzielcza_') ][descendant::node()/coordinates ]" group-by="concat( tokenize( name(),'_')[ count(tokenize( current()/name(),'_'))],the_geom/node()/name())">
+
+                    <p>Rodzaj stan <xsl:value-of select="tokenize( name(),'_')[ count(tokenize( current()/name(),'_'))]"/>;  </p>
+                        <xsl:variable name="price" select="ID_KORESP_OFFER/CRM_LISTA_ZASOBOW_OFFERS[CRM_LISTA_ZASOBOW_ID/text()=current()/ID_ZASOB]/OFFER_PRICE_PER_RESOURCE_UNIT"/>
+                     <p>   Długość: <xsl:value-of select="sum( current-group()/number(Dlugosc))"/> </p>
+                     <p>  Cena: <xsl:value-of select="$price"/> </p>
+                     <p>   Wartość: <xsl:value-of select="( number(ID_KORESP_OFFER/CRM_LISTA_ZASOBOW_OFFERS[CRM_LISTA_ZASOBOW_ID/text()=current()/ID_ZASOB]/OFFER_PRICE_PER_RESOURCE_UNIT) * sum( current-group()/number(Dlugosc)))"/> </p>
+                    
+            <xsl:if test="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]"><p>  Uzgodnienia ZUD: </p></xsl:if>
+            <xsl:for-each select="current-group()/ID_KORESP_DO_UZG_ZUD[child::*]">
+                              <p>
+                                  <codeblock>
+                                    <xsl:value-of select="name()"/>
+                                    id: <xsl:copy-of select="ID_PROJECT/text()"/>-<xsl:copy-of select="ID/text()"/>
+                                     Z kim: <xsl:copy-of select="K_OD_KOGO/text()"/>
+                                    data : <xsl:copy-of select="K_DATA_OTRZYMANEJ_KORESP/text()"/>
+                                    zawartość: <xsl:copy-of select="K_ZAWARTOS/text()"/>
+                                </codeblock>
+                              </p>
+                        </xsl:for-each>
+                    
+                
+            <!--<p> rysunek grupy obiektow o tym stanie</p>
+            <xsl:apply-templates select="current-group()" mode="gml_geometry_image_group">
+                <xsl:with-param name="fileindex" select="ID_ZASOB"/>
+            </xsl:apply-templates>-->
+            <p> raport graficzny</p>
+            <xsl:apply-templates mode="gml_geometry_image_group" select=".">
+                <xsl:with-param name="fileindex" select="concat('Rozdzielcza_STAN_',tokenize( name(),'_')[ count(tokenize( current()/name(),'_'))],'_',the_geom/node()/name())"/>
+            </xsl:apply-templates>
+            
+        </xsl:for-each-group>
+        
+        <!--<p>
+            Podobiekty
+            <xsl:for-each select="*[ contains( name(),'Rozdzielcza_')]">
+                Obiekt <xsl:value-of select="name()"/> ; 
+            </xsl:for-each>
+        </p>-->
+        
     </xsl:template>    
     
     
@@ -274,24 +417,45 @@
     <xsl:template mode="gml_geometry_image" match="*|text()|comment()"/>
     
     
-    <xsl:template mode="gml_geometry_image" match="Rozdzielcza_rurociag_wsg84">
+    <xsl:template mode="gml_geometry_image_group" match="*[ contains( name(),'Rozdzielcza_')]">
+        <xsl:param name="fileindex" required="yes"/>
         <xsl:choose>
-            <xsl:when test="the_geom/text()">
-                <xsl:comment>Tu bedzie image z <xsl:value-of select="local-name()"/> <xsl:value-of select="the_geom"/></xsl:comment>
-                <p> wspolrzedne do przetworzenia <codeblock><xsl:value-of select="the_geom/text()"/></codeblock></p>
+            <xsl:when test=".//coordinates">
+                <xsl:comment>gml_geometry_image_group Tu bedzie image (uzyc preprocess info) z <xsl:value-of select="local-name()"/> <xsl:value-of select=".//coordinates/text()"/></xsl:comment>
+                <!--<p> gml_geometry_image_group (preprocess) ID:<xsl:value-of select="ID"/>; 
+                    wspolrzedne do przetworzenia z <xsl:value-of select="local-name()"/>; <codeblock><xsl:value-of select=".//coordinates/text()"/></codeblock>
+                </p>-->
+                <xsl:apply-templates mode="system_cache__appinfo:images__read" select=".">
+                    <xsl:with-param name="fileindex" select="$fileindex"/>
+                </xsl:apply-templates>
             </xsl:when>
         </xsl:choose>
     </xsl:template>
     
-    <xsl:template match="Rozdzielcza_rurociag_wsg84" mode="postprocess_gml_geometry_image_unique">
+    <xsl:template mode="gml_geometry_image" match="*[ contains( name(),'Rozdzielcza_')]">
         <xsl:choose>
-            <xsl:when test="the_geom/text()">
-                <xsl:result-document href="{$temp}/{$uuid}/{ID}_{local-name()}.gml" >
-                    <the_geom>
-                        <xsl:attribute name="local-name" select="local-name()"/>
-                        <xsl:value-of select="the_geom"/>
-                    </the_geom>
-                </xsl:result-document>
+            <xsl:when test=".//coordinates">
+                <xsl:comment>Tu bedzie image (preprocess info) z <xsl:value-of select="local-name()"/> <xsl:value-of select=".//coordinates/text()"/></xsl:comment>
+                <!--<p> (uzyc preprocess) ID:<xsl:value-of select="ID"/>; wspolrzedne do przetworzenia z <xsl:value-of select="local-name()"/>; <codeblock><xsl:value-of select=".//coordinates/text()"/></codeblock></p>-->
+                <xsl:apply-templates mode="system_cache__appinfo:images__read" select="."/>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+    
+    <xsl:template match="*[ contains( name(),'Rozdzielcza_')]" mode="preprocess_gml_geometry_image_unique">
+        <xsl:choose>
+            <xsl:when test=".//coordinates">
+                    <xsl:result-document href="{$temp}/{$uuid}/{ID}_{local-name()}.gml" >
+                        <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" 
+                            xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" 
+                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                            xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
+                            <xsl:attribute name="local-name" select="local-name()"/>
+                            <gml:featureMember>
+                                <xsl:copy-of select="the_geom" copy-namespaces="no"/>
+                            </gml:featureMember>
+                        </wfs:FeatureCollection>
+                    </xsl:result-document>
             </xsl:when>
         </xsl:choose>
     </xsl:template>
@@ -300,21 +464,27 @@
     
     <xsl:template mode="gml_geometry_image" match="INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI">
         <xsl:choose>
-            <xsl:when test="the_geom/text()">
+            <xsl:when test="the_geom//coordinates">
                 <xsl:comment>Tu bedzie image z <xsl:value-of select="the_geom"/></xsl:comment>
-                <p> wspolrzedne do przetworzenia <codeblock><xsl:value-of select="the_geom/text()"/></codeblock></p>
+                <!--<p> (preprocess) ID:<xsl:value-of select="ID"/>; wspolrzedne <codeblock><xsl:value-of select="the_geom//text()"/></codeblock></p>-->
+                <xsl:apply-templates mode="system_cache__appinfo:images__read" select="."/>
             </xsl:when>
         </xsl:choose>
     </xsl:template>
     
-    <xsl:template match="INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI" mode="postprocess_gml_geometry_image_unique">
+    <xsl:template match="INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI" mode="preprocess_gml_geometry_image_unique">
         <xsl:choose>
-            <xsl:when test="the_geom/text()">
+            <xsl:when test="the_geom//coordinates">
                 <xsl:result-document href="{$temp}/{$uuid}/{ID}_{local-name()}.gml" >
-                    <the_geom>
+                    <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" 
+                        xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" 
+                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                        xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
                         <xsl:attribute name="local-name" select="local-name()"/>
-                        <xsl:value-of select="the_geom"/>
-                    </the_geom>
+                        <gml:featureMember>
+                            <xsl:copy-of select="the_geom" copy-namespaces="no"/>
+                        </gml:featureMember>
+                    </wfs:FeatureCollection>
                 </xsl:result-document>
             </xsl:when>
         </xsl:choose>

+ 122 - 0
SE/schema/default_db_xml_cache.public/default_db/enter_to_ph.xsl

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:gml="http://www.opengis.net/gml" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
+    xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
+    xmlns:wfs="http://www.opengis.net/wfs"
+    xmlns:ogc="http://www.opengis.net/ogc"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    
+    <xsl:template match="*" mode="enter_to_ph">
+        <xsl:param name="count"/>
+        <xsl:param name="element"/>
+        <xsl:variable name="current" select="."/>
+        <xsl:variable name="surround_with">
+            <xsl:choose>
+                <xsl:when test="$element='p'"><xsl:value-of select="'codeblock'"/></xsl:when>
+                <xsl:when test="$element='bodydiv'"><xsl:value-of select="'p'"/></xsl:when>
+                <xsl:otherwise><xsl:value-of select="'codeblock'"/></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test=" contains(  text(),'&#13;')">
+                <xsl:for-each select="tokenize(  text(),'&#13;')">
+                    <xsl:element name="{$surround_with}"><!-- to jest przetwarzane jak jest tekst lamany -->
+                        <xsl:value-of select="."/>
+                    </xsl:element>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:when test=" contains(  text(),'&#xD;')">
+                <xsl:for-each select="tokenize(  text(),'&#xD;')">
+                    <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:choose>
+                    <xsl:when test="$count &gt;1">
+                        <codeblock>
+                            <!--<xsl:attribute name="DDxpath" select="@xpath"/>-->
+                            <!--DN(<xsl:value-of select="$element"/>)-->
+                            <!--count:<xsl:value-of select="$count"/>-->
+                            <xsl:copy-of select=" text()"/>
+                        </codeblock>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:apply-templates mode="enter_to_ph_text">
+                            <xsl:with-param name="element" select="$element"/>
+                        </xsl:apply-templates>
+                        <!--<xsl:copy-of select=" text()"/>-->
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    <!-- dodanie enterow dla tabel w ktorych wyrazy sa dluzsze niz 10 znakow  -->
+    <xsl:template match="text()" mode="enter_to_ph_text">
+        <xsl:param name="element" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="$element='entry'">
+                <xsl:for-each select="tokenize(.,' ')">
+                    <xsl:value-of select="' '"/>
+                    <xsl:variable name="phrase" select="."/>
+                    <xsl:for-each select="1 to string-length(.)">
+                        <xsl:if test="position() mod 12 = 0"><xsl:value-of select="' -'"/></xsl:if>
+                        <xsl:value-of select="substring($phrase,position(),1)"/>
+                    </xsl:for-each>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    
+    
+    
+    <!--<xsl:template name="test">
+        <xsl:variable name="test">
+            <test>
+            AAA W ramach niniejszego porozumienia Strony zobowiązują się do:&#xD;
+            &#xD;
+            §1 ZOBOWIĄZANIA BIALL-NET SP. Z O.O.&#xD;
+            &#xD;
+            1. BIALL-NET Sp. z o.o. zobowiązuje się do wystawienia faktury korygującej do dokumentu nr FS 16/RFV/07/2016 z dnia 2016-07-14 na kwotę -15 559,94 zł brutto (słownie: - piętnaście tysięcy pięćset pięćdziesiąt dziewięć złotych 94/100) oraz anulowania naliczonych odsetek ustawowych z tytułu opóźnienia za płatności w kwocie 862,62 zł brutto (słownie: osiemset sześćdziesiąt dwa złote 62/100) wskazanych w przedsądowym wezwaniu do zapłaty o numerze 0-499-3136-3141-3493-59911/17 z dnia 2017-03-14, pomniejszając w ten sposób zobowiązanie firmy Vectra S.A. z tytułu płatności za fakturę nr FS 16/RFV/07/2016 do kwoty 0,00 zł (słownie: zero złotych 00/100).  Faktura korygująca zostanie wystawiona po dokonaniu płatności z tytułu §2.&#xD;
+            &#xD;
+            2. BIALL-NET Sp. z o.o. zobowiązuje się do wystawienia faktury korygującej do dokumentu nr FS 18/RFV/08/2016 z dnia 2016-08-02 na kwotę -38 184,53 zł brutto (słownie: - trzydzieści osiem tysięcy sto osiemdziesiąt cztery złote 53/100) oraz anulowania naliczonych odsetek ustawowych z tytułu opóźnienia za płatności w kwocie 2087,07 zł brutto (słownie: dwa tysiące osiemdziesiąt siedem złotych 07/100) wskazanych w przedsądowym wezwaniu do zapłaty o numerze 0-499-3136-3141-3493-59911/17 z dnia 2017-03-14, pomniejszając w ten sposób zobowiązanie firmy Vectra S.A. z tytułu płatności za fakturę nr FS 18/RFV/08/2016 do kwoty 0,00 zł (słownie: zero złotych 00/100). Faktura korygująca zostanie wystawiona po dokonaniu płatności z tytułu §2.&#xD;
+            &#xD;
+            §2 ZOBOWIĄZANIA VECTRA S.A. &#xD;
+            &#xD;
+            1. VECTRA S.A. zobowiązuje się do uiszczenia opłaty w kwocie 60 tys. zł netto (słownie: sześćdziesiąt tysięcy złotych 00/100) w terminie 7 dni od dnia podpisania niniejszego porozumienia na poczet udzielenia licencji systemu Procesy5 i przeprowadzenia wdrożenia przez firmę BIALL-NET Sp. z o.o. , dokładniej określonego w §3 niniejszego porozumienia. &#xD;
+            &#xD;
+            §3 ZOBOWIĄZANIA STRON&#xD;
+            &#xD;
+            1. STRONY zobowiązują się do podpisania umowy na udzielenie licencji systemu Procesy5 wraz z wdrożeniem, gdzie Zleceniobiorcą będzie firma BIALL-NET Sp. z o.o., a Zleceniodawcą firma VECTRA S.A. &#xD;
+            &#xD;
+            2. Wynagrodzenie należne z tytułu umowy określonej w §3 pkt. 1 wynosić będzie 60 tys. złotych netto (słownie: sześćdziesiąt tysięcy złotych 00/100), z czego 50 tys. złotych zostanie przeznaczone na udzielenie licencji systemu Procesy5, a 10 tys. na jego wdrożenie.&#xD;
+            &#xD;
+            3. Według wstępnych ustaleń z spotkania w siedzibie firmy Limes Sp. z o.o. z panem Tomaszem Łukiańczykiem z firmy VECTRA S.A. z dnia 2017-03-29 w Gdańsku zakres przedmiotu zobowiązania określonego w §3 pkt.1 powinien obejmować zakres licencji:&#xD;
+            &#xD;
+            a) Wersja Procesy5 dla jednej domeny użytkowania systemu dla Klienta dla nieograniczonej liczby serwerów oraz baz danych&#xD;
+            b) konfiguracja oraz uruchomienie / względnie dostarczenie wersji instalacyjnej systemu / współpraca podczas uruchomienia&#xD;
+            c) dostosowanie wersji systemu Procesy5 do działania na wirtualizowanym środowisku określonym przez wymagania Zleceniodawcy  (obecnie jest przetestowany do działania na systemach BSD oraz prekonfigurowanych pakietach open-source, zoptymalizowanych przez Apple w ramach popularnego pakietu OSX Server.)&#xD;
+            d) wykonanie kustomizacji systemu Procesy5 dla przedstawionych potrzeb wykonywania wycen przez sprzedawców firmy LIMES Sp. z o.o. (proces od wyceny do oferty)&#xD;
+            e) zostanie dostarczone towarzyszące oprogramowanie dla Android umożliwiające pracę mobilną dla jednostek wykonujących wyceny.&#xD;
+            </test>
+        </xsl:variable>
+        <xsl:apply-templates mode="enter_to_ph" select="$test"/>
+    </xsl:template>-->
+    
+    
+    
+    
+</xsl:stylesheet>

+ 90 - 0
SE/schema/default_db_xml_cache.public/default_db/images/images.xsl

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <!-- Do parsowania <images>
+<image x="1" y="1">
+  <xmin>6525000.91100983333333333345</xmin>
+  <ymin>6012859.46859783333333333345</ymin>
+  <xmax>6525085.57767650000000000000</xmax>
+  <ymax>6012944.13526450000000000000</ymax>
+  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
+</image>
+<image x="2" y="1">
+  <xmin>6525080.57767650000000000000</xmin>
+  <ymin>6012859.46859783333333333345</ymin>
+  <xmax>6525165.24434316666666666655</xmax>
+  <ymax>6012944.13526450000000000000</ymax>
+  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-2.png</file>
+</image>
+<image x="1" y="2">
+  <xmin>6525000.91100983333333333345</xmin>
+  <ymin>6012939.13526450000000000000</ymin>
+  <xmax>6525085.57767650000000000000</xmax>
+  <ymax>6013023.80193116666666666655</ymax>
+  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-1.png</file>
+</image>
+<image x="2" y="2">
+  <xmin>6525080.57767650000000000000</xmin>
+  <ymin>6012939.13526450000000000000</ymin>
+  <xmax>6525165.24434316666666666655</xmax>
+  <ymax>6013023.80193116666666666655</ymax>
+  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-2.png</file>
+</image>
+</images>  -->
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:template mode="system_cache__appinfo:images" match="images">
+        <xsl:param name="fileindex" required="yes"/> <!-- ex. 3161_IN7_MK_BAZA_DYSTRYBUCJI - is related dir in dita dir with images -->
+        <xsl:apply-templates mode="system_cache__appinfo:images">
+            <xsl:with-param name="fileindex" select="$fileindex"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    
+    <xsl:template mode="system_cache__appinfo:images" match="image[@x and @y]">
+        <xsl:param name="fileindex" required="yes"/>
+        <image href="{$fileindex}/image-{@x}-{@y}.png" width="300"/>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__appinfo:images" match="*">
+        <xsl:message terminate="yes">#56 not expected data - needed @x and @y to be in xml image element: correct is: 
+            <image x="1" y="1">
+                <xmin>6525000.91100983333333333345</xmin>
+                <ymin>6012859.46859783333333333345</ymin>
+                <xmax>6525085.57767650000000000000</xmax>
+                <ymax>6012944.13526450000000000000</ymax>
+                <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
+            </image>
+        </xsl:message>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__appinfo:images__write" match="*">
+        <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
+        <gml_to_image srcfile="{$ditadir}/{$fileindex}.gml" dstfile="{$ditadir}/{$fileindex}.png.xml" fileindex="{$fileindex}" ditadir="{$ditadir}"/> 
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__appinfo:images__read" match="*">
+        <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
+        <!-- to read and parse system_cache__appinfo:images -->
+        <!--<xsl:variable name="fileindex" select="concat(ID,'_',local-name())"/>-->
+        <xsl:choose>
+            <xsl:when test="doc-available(concat($ditadir,'/',$fileindex,'.png.xml'))">
+                <xsl:apply-templates mode="system_cache__appinfo:images" select="doc(concat($ditadir,'/',$fileindex,'.png.xml'))">
+                    <xsl:with-param name="fileindex" select="$fileindex"/>
+                </xsl:apply-templates>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:comment>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:comment>
+                <xsl:message>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:message>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:template>
+    
+</xsl:stylesheet>

+ 14 - 0
SE/schema/default_db_xml_cache.public/default_db/tree_to_dita.xsl

@@ -11,17 +11,29 @@
     <xsl:import href="../escaped_html_to_xml.xsl"/>
     <xsl:import href="../dita_enter_to_ph.xsl"/>
     <xsl:include href="extract_text.xsl"/>
+    <xsl:include href="images/images.xsl"/>
     
     <xsl:include href="CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>
     <xsl:include href="IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI_tree_to_dita.xsl"/>
     
     
+    
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
     <xsl:param name="temp" required="yes"/>
     <xsl:param name="uuid" required="yes"/>
     
+    <xsl:variable name="ditadir" select="concat($temp,'/',$uuid)"/>
+    
+    <xsl:template mode="preprocess" match="RelatedFeatureRoot">
+        <preprocess_dita>
+            <xsl:comment>#27 match RelatedFeatureRoot</xsl:comment>
+            <xsl:apply-templates select="." mode="preprocess_root_IN7_MK_BAZA_DYSTRYBUCJI"/>
+            <!--<xsl:apply-templates select="." mode="postprocess_root_PROCES_INIT"/>-->
+        </preprocess_dita>
+    </xsl:template>
+    
     <xsl:template mode="postprocess" match="RelatedFeatureRoot">
         <postprocess_dita>
             <xsl:comment>#25 match RelatedFeatureRoot</xsl:comment>
@@ -30,6 +42,8 @@
         </postprocess_dita>
     </xsl:template>
     
+    <xsl:template mode="postprocess_root_IN7_MK_BAZA_DYSTRYBUCJI" match="*"/>
+    
     <xsl:template match="RelatedFeatureRoot">
         <xsl:comment>#29 match RelatedFeatureRoot</xsl:comment>
         <xsl:apply-templates mode="ditamap_root"/>

+ 104 - 11
SE/schema/default_db_xml_cache.public/main_build_recurse_ant.dita_with_id.xsl

@@ -8,11 +8,10 @@
     xmlns:default_db="http://biuro.biall-net.pl/xmlschema_procesy5/default_db"
     xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
     xmlns:ogc="http://www.opengis.net/ogc"
-    
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
     exclude-result-prefixes="xs"
     version="2.0">
     
-    
     <xsl:include href="get_all_xsd.xsl"/>
     
     <xsl:param name="namespace_prefix"  required="yes"/>
@@ -20,12 +19,14 @@
     <xsl:param name="build_complexType_dir" required="yes"/><!-- do okreslenia filtrow wymaganych typow na bazie simpletype -->
     <xsl:param name="p5_tr_map_dir" select="'../default_db.instance.xml/p5_tr_map'"/>
     <xsl:param name="simpleSchema_dir" select="'../default_db.instance.xml/simpleSchema'"/>
+    <xsl:param name="NamespaceBinding.xml" select="'../config/NamespaceBinding.xml'"/> <!-- binding config  -->
+    
     <!--<xsl:param name="typeName" required="yes"/> - nie dziala to przekazanie tedy - trzeba czekac na _434 --> <!-- do przekazania glownego elementu do wykrycia glownie buildComplexType dla filtrow, w kolejnych zaglebieniach jada po @ref -->
     <xsl:output indent="yes" />
     <xsl:strip-space elements="*"/>
     
     <xsl:function name="p5_tr_map:force_local_typeName">
-        <xsl:param name="typeName" required="yes"/>
+        <xsl:param name="typeName"/>
         <xsl:choose>
             <xsl:when test=" substring-before($typeName,':')">
                 <xsl:value-of select="concat($namespace_prefix,':',substring-after($typeName,':'))"/>
@@ -38,7 +39,7 @@
     
     
     <xsl:function name="system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type_from_cache">
-        <xsl:param name="system_cache__appinfo:ref" required="yes"/>
+        <xsl:param name="system_cache__appinfo:ref" />
         <!--<xsl:param name="detect_resource_type_dir"  select="$detect_resource_type_dir"/>-->
         <!--<xsl:variable name="prefixed_object_info">
             <xsl:call-template name="system_cache__appinfo:prefixed_object_info">
@@ -50,7 +51,7 @@
     
     
     <xsl:function name="system_cache__appinfo:build_complexType_from_cache"><!-- do pobrania właściwego elementu zbudowanego complexType TODO problem wielu prefixow lub unikalnosci elementow -->
-        <xsl:param name="parent_type" required="yes"/> <!-- parent_type="default_db__x3A__CRM_PROCES:CRM_PROCES"  -->
+        <xsl:param name="parent_type" /> <!-- parent_type="default_db__x3A__CRM_PROCES:CRM_PROCES"  -->
     </xsl:function>
     
     
@@ -82,7 +83,7 @@
     </xsl:template>
     
     <xsl:template match="p5_tr_map:go_recurse_from_root_by_build_element">
-        <!--<xsl:variable name="detect_resource_type" select=" system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type_from_cache(@system_cache__appinfo:ref)"/>-->
+        <!--<xsl:variable name="detect_resource_type" select=" (@system_cache__appinfo:ref)"/>-->
         <RelatedFeature>
             <!--<xsl:attribute name="xpath" select="@flat_relation_cache_name"/>-->
             <!--<xsl:attribute name="typeName" select="@flat_relation_cache_xpath"/>-->
@@ -96,6 +97,9 @@
                 </xsl:call-template>
             </xsl:variable>
             
+            
+            
+            
             <xsl:variable name="build_complexType" select="doc(concat($build_complexType_dir,'/',$prefixed_object_info/system_cache__appinfo:prefixed_object_info/@prefix,'/',$prefixed_object_info/system_cache__appinfo:prefixed_object_info/@element,'.xml'))"/>
                 <xsl:choose>
                     <xsl:when test="1=2"/>
@@ -106,6 +110,7 @@
                         <xsl:attribute name="xml_id" select="generate-id()"/>
                     </xsl:otherwise>
                 </xsl:choose>
+            <!--<xsl:variable name="detect_resource_type" select=" system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type_from_cache(@parent_type)"/>-->
             <xsl:call-template name="p5_tr_map:simpleTypeMakeOgcFilter">
                 <xsl:with-param name="build_complexType" select="$build_complexType"/>
             </xsl:call-template>
@@ -173,13 +178,17 @@
             <!--<xsl:if test="string-length($detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name) = 0">
                 <xsl:message terminate="yes">#174 Bad not found expected for <xsl:value-of select="@system_cache__appinfo:ref"/>; @system_cache__appinfo:get_default_db_obj_url_table_name ! </xsl:message>
             </xsl:if>-->
-                 <xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />
-            <xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/> 
+            <!--<xsl:if test="string-length($detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name) &lt;1"><xsl:message terminate="no">#176 ERROR - not required @system_cache__appinfo:get_default_db_obj_url_table_name - to probably fix system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type</xsl:message></xsl:if>-->
+                 <!--<xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />-->
+            <!--<xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/>-->
+            <xsl:apply-templates mode="detect_typeName_tr_map_ref" select=".">
+                <xsl:with-param name="detect_resource_type" select="$detect_resource_type"/>
+            </xsl:apply-templates>
                 <!--<xsl:attribute name="xpath" select="@flat_relation_cache_name"/>-->
                  <!-- wykrycie pierwszego @local-name-name -->
                  <xsl:attribute name="flat_relation_cache_xpath" select="@flat_relation_cache_xpath"/>
                  <xsl:attribute name="flat_relation_cache_name" select="@flat_relation_cache_name"/>            
-                 <xsl:attribute name="system_cache__appinfo:get_default_db_obj_url_table_name" select="$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name"/>
+                 <!--<xsl:attribute name="system_cache__appinfo:get_default_db_obj_url_table_name" select="$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name"/>-->
                 <xsl:choose>
                     <xsl:when test="@system_cache__appinfo:maxOccurs='0' and @system_cache__appinfo:minOccurs='0'">
                         <xsl:message>#90 node=<xsl:value-of select="@system_cache__appinfo:ref"/>; to BYPASS! TODO @system_cache__appinfo:maxOccurs=0 and @system_cache__appinfo:minOccurs  </xsl:message>
@@ -196,6 +205,11 @@
                                      <!--<prefixed_object_info>
                                          <xsl:copy-of select="$detect_resource_type"/>
                                      </prefixed_object_info>-->
+                <!--<debug208>
+                    <xsl:copy-of select="$detect_resource_type"/>
+                </debug208>-->
+            
+            
                 <xsl:call-template name="p5_tr_map:simpleTypeMakeOgcFilter">
                     <xsl:with-param name="build_complexType" select="$build_complexType"/>
                 </xsl:call-template>
@@ -226,8 +240,11 @@
             <!-- tymczasowe wymuszenie relacji do obiektu glownego na podstawie $detect_resource_type -->
             <!--<xsl:attribute name="typeName" select="p5_tr_map:force_local_typeName(@system_cache__appinfo:ref)"/>-->
             
-            <xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />
-            <xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/>
+            <!--<xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />-->
+            <!--<xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/>-->
+            <xsl:apply-templates mode="detect_typeName_tr_map_ref" select=".">
+                <xsl:with-param name="detect_resource_type" select="$detect_resource_type"/>
+            </xsl:apply-templates>
             <!--<xsl:attribute name="xpath" select="@flat_relation_cache_name"/>-->
             <!-- wykrycie pierwszego @local-name-name -->
             <xsl:attribute name="flat_relation_cache_xpath" select="@flat_relation_cache_xpath"/>
@@ -327,6 +344,7 @@
                 <xsl:with-param name="element" select="name()"/>
                 <xsl:with-param name="node" select="."/>
             </xsl:apply-templates>
+            <!--<xsl:apply-templates mode="after_477b"/>-->
             <!--<xsl:copy-of select="@*"/>-->
             <xsl:choose>
                 <!-- <xsl:when test="@system_cache__appinfo:id">
@@ -337,11 +355,23 @@
                     <xsl:attribute name="xml_id" select="generate-id()"/>
                 </xsl:otherwise>
             </xsl:choose>
+
             <!--<xsl:attribute name="xml_id" select="generate-id()"/>-->
             <!--<xsl:apply-templates/>-->
         </xsl:element>
     </xsl:template>
     
+    
+    <!--<xsl:template match="p5_tr_map:go_recurse_from_root_by_build_element_481" mode="after_477b">
+        <!-\- do innego opisania elementu do pobrania @Type zwlaszcza dla 
+            <default_db:the_geom>
+                <gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" xmlns:gml="http://www.opengis.net/gml">
+                 <gml:coordinates decimal="." cs=" " ts=",">18.481500476076643 54.25193810224176,18.481520124984414 54.25180296397699,18.481961511892923 54.25180042065462</gml:coordinates>
+                </gml:LineString>
+            </default_db:the_geom> -\->
+        <xsl:copy-of select="@p5_tr_map:parent_type"/>
+    </xsl:template>-->
+    
     <xsl:template match="*">
         <xsl:variable name="element-name">
             <xsl:value-of select="name()"/>
@@ -447,7 +477,9 @@
             <xsl:with-param name="name" select="$name"/>
         </xsl:apply-templates>
     </xsl:template>
+
     
+
     <xsl:template mode="p5_tr_map:simpleTypeMakeOgcFilter_restriction" match="enumeration" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="name" required="yes"/>
         <!--c:Filter&gt;&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:Propert -->
@@ -459,6 +491,17 @@
         </ogc:Or>
     </xsl:template>
     
+    <xsl:template mode="p5_tr_map:simpleTypeMakeOgcFilter_restriction" match="minInclusive" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="name" required="yes"/>
+        <!--c:Filter&gt;&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:Propert -->
+        <ogc:Or>
+            <ogc:PropertyIsGreaterThanOrEqualTo>
+                <ogc:PropertyName><xsl:value-of select="$name"/></ogc:PropertyName>
+                <ogc:Literal><xsl:value-of select="@value"/></ogc:Literal>
+            </ogc:PropertyIsGreaterThanOrEqualTo>
+        </ogc:Or>
+    </xsl:template>
+    
     
     <xsl:template mode="p5_tr_map:simpleTypeMakeOgcFilter" match="*|text()|@*|comment()"/>
     <xsl:template mode="p5_tr_map:simpleTypeMakeOgcFilter_restriction" match="*|text()|@*|comment()"/>
@@ -466,6 +509,9 @@
     <xsl:template match="@*">
         <xsl:param name="element"/>
         <xsl:param name="node"/>
+        <xsl:variable name="namespace-uri">
+            <xsl:element name="{name()}" />
+        </xsl:variable>
         <xsl:choose>
             <xsl:when test="$element='p5_tr_map:go_recurse_from_root_by_build_element_loop'">
                 <xsl:copy-of select="."/>
@@ -473,6 +519,7 @@
             <xsl:when test="not(namespace-uri($node)='http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd')">
                 <xsl:copy-of select="."/>
             </xsl:when>
+            <xsl:when test="name()='system_cache__appinfo:type' and not( substring-before(.,':')='xs')"><xsl:attribute name="{name()}" select="."/></xsl:when>
         </xsl:choose>
     </xsl:template>
     
@@ -481,9 +528,55 @@
     </xsl:template>-->
     
     
+    <xsl:template mode="detect_typeName_tr_map_ref" match="*">
+        <xsl:param name="detect_resource_type" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="string-length($detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name) &gt; 0 ">
+                <xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />
+                <xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:apply-templates mode="detect_typeName_tr_map_ref_value">
+                    <xsl:with-param name="ref_node" select="."/>
+                </xsl:apply-templates><!-- usually is after 434c etc refered object is there -->        
+            </xsl:otherwise>
+        </xsl:choose>
+        <!--<xsl:variable name="NamespaceBinding" select="doc($NamespaceBinding.xml)/system_cache__appinfo:NamespaceBinding/system_cache__appinfo:binding[@targetNamespace=current()/@system_cache__appinfo:namespace_uri]"/>-->
+        <!--<xsl:attribute name="typeNameRealResource_test" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />-->
+        <!--<xsl:attribute name="typeName_test" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/>-->
+        
+    </xsl:template>
+    
+    <xsl:template mode="detect_typeName_tr_map_ref_value" match="*">
+        <xsl:param name="ref_node" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="@system_cache__appinfo:name">
+                <xsl:variable name="NamespaceBinding" select="doc($NamespaceBinding.xml)/system_cache__appinfo:NamespaceBinding/system_cache__appinfo:binding[@targetNamespace=current()/../@system_cache__appinfo:namespace_uri]"/>
+                <xsl:choose>
+                    <xsl:when test="$NamespaceBinding/system_cache__appinfo:prefix">
+                        <xsl:attribute name="typeName" select="concat($NamespaceBinding/system_cache__appinfo:prefix,':', system_cache__appinfo:clean_object_prefix($ref_node/@local-name-name))"/>
+                        <xsl:attribute name="typeNameRealResource" select="concat($NamespaceBinding/system_cache__appinfo:prefix,':',system_cache__appinfo:clean_object_prefix($ref_node/@local-name-name))"/>
+                        <xsl:attribute name="system_cache__appinfo:api" select="$NamespaceBinding/system_cache__appinfo:api"/>
+                    </xsl:when>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:apply-templates mode="detect_typeName_tr_map_ref_value">
+                    <xsl:with-param name="ref_node" select="$ref_node"/>
+                </xsl:apply-templates>
+            </xsl:otherwise>
+        </xsl:choose>
+
+    </xsl:template>
    
     <xsl:template mode="detect_typeName_tr_map" match="*">
+        <xsl:variable name="NamespaceBinding" select="doc($NamespaceBinding.xml)/system_cache__appinfo:NamespaceBinding/system_cache__appinfo:binding[@targetNamespace=current()/@system_cache__appinfo:namespace_uri]"/>
         <xsl:choose>
+            <xsl:when test="$NamespaceBinding/system_cache__appinfo:prefix">
+                <xsl:attribute name="typeName" select="concat($NamespaceBinding/system_cache__appinfo:prefix,':',system_cache__appinfo:clean_object_prefix(@parent_type))"/>
+                <xsl:attribute name="typeNameRealResource" select="concat($NamespaceBinding/system_cache__appinfo:prefix,':',system_cache__appinfo:clean_object_prefix(@parent_type))"/>
+                <xsl:attribute name="system_cache__appinfo:api" select="$NamespaceBinding/system_cache__appinfo:api"/>
+            </xsl:when>
             <xsl:when test="@local-name-name">
                 <xsl:attribute name="typeName" select="p5_tr_map:force_local_typeName(@local-name-name)"/>
                 <xsl:variable name="prefixed_object_info">

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

@@ -155,7 +155,7 @@
         </xsl:element>
     </xsl:template>
     
-    <xsl:template match="element|complexContent|restriction" mode="system_cache__appinfo:new_object_by_prototype_schema_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="element|complexContent|restriction|enumeration|minInclusive" mode="system_cache__appinfo:new_object_by_prototype_schema_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <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"/>

+ 47 - 1
SE/schema/default_db_xml_cache.public/system_cache__appinfo/TargetNamespaceBindings.xsl

@@ -7,6 +7,10 @@
     
     <xsl:include href="../get_all_xsd.xsl"/>
     
+    <xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/>
+    <xsl:param name="targetNamespace_DEFAULTS_prefix_objects" select="'default_objects'"/>
+    <xsl:param name="TargetNamespaceBindingsApiUrl" select="'https://biuro.biall-net.pl/SE/version-git/wfs-data.php'"/>
+    
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
@@ -48,8 +52,50 @@
         <system_cache__appinfo:TargetNamespaceBindings_to_Namespace>
             <xsl:attribute name="TargetNamespace" select="concat($TargetNamespace,'/',$NamespaceDatabaseStorageDefinitionPrefix,'/',$NamespaceObjectInstanceTable,'.xsd')"/>
         </system_cache__appinfo:TargetNamespaceBindings_to_Namespace>
-        
     </xsl:template>
     
     
+    <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:NamespaceBinding.xml">
+        <!-- to generate NamespaceBinding.xml file - need to be upgraded for parse xs:appinfo binding informations from schema -->
+        <system_cache__appinfo:NamespaceBinding>
+            <xsl:apply-templates mode="system_cache__appinfo:NamespaceBinding.xml"/>
+        </system_cache__appinfo:NamespaceBinding>
+    </xsl:template>
+
+    <xsl:template match="system_cache__appinfo:get_all_xsd" mode="system_cache__appinfo:NamespaceBinding.xml">
+        <xsl:apply-templates mode="system_cache__appinfo:NamespaceBinding.xml"/>
+    </xsl:template>
+    
+    <xsl:template mode="system_cache__appinfo:NamespaceBinding.xml" match="*|text()|comment()"/>
+    
+    <xsl:template match="schema" mode="system_cache__appinfo:NamespaceBinding.xml" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+            <xsl:choose>
+                <xsl:when test="annotation/system_cache__appinfo:binding" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                    <xsl:copy-of select="annotation/system_cache__appinfo:binding" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" copy-namespaces="no"/>
+                </xsl:when>
+                <xsl:when test="contains(@targetNamespace,'default_db/SystemObjects')">
+                    <system_cache__appinfo:binding targetNamespace="{@targetNamespace}" bindPolicy="single">
+                        <system_cache__appinfo:api type="wfs"><xsl:value-of select="$TargetNamespaceBindingsApiUrl"/></system_cache__appinfo:api>
+                        <system_cache__appinfo:prefix><xsl:value-of select="$targetNamespace_DEFAULTS_prefix_objects"/></system_cache__appinfo:prefix>
+                    </system_cache__appinfo:binding>
+                </xsl:when>
+                <xsl:when test="contains(@targetNamespace,'default_db/table')">
+                    <system_cache__appinfo:binding targetNamespace="{@targetNamespace}" bindPolicy="single">
+                        <system_cache__appinfo:api type="wfs"><xsl:value-of select="$TargetNamespaceBindingsApiUrl"/></system_cache__appinfo:api>
+                        <system_cache__appinfo:prefix><xsl:value-of select="$targetNamespace_DEFAULTS_prefix"/></system_cache__appinfo:prefix>
+                    </system_cache__appinfo:binding>
+                </xsl:when>
+                <xsl:when test="contains(@targetNamespace,'default_db/Types')"></xsl:when>
+                <xsl:otherwise>
+                    <xsl:comment>#71 unknown type schema? maybe some fixing or external schema?</xsl:comment>
+                    <system_cache__appinfo:binding targetNamespace="{@targetNamespace}" bindPolicy="single">
+                        <system_cache__appinfo:api type="wfs"><xsl:value-of select="$TargetNamespaceBindingsApiUrl"/></system_cache__appinfo:api>
+                        <system_cache__appinfo:prefix>unknown</system_cache__appinfo:prefix>
+                    </system_cache__appinfo:binding>
+                </xsl:otherwise>
+            </xsl:choose>
+            
+        
+    </xsl:template>
+    
 </xsl:stylesheet>

+ 34 - 4
SE/schema/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl

@@ -9,9 +9,23 @@
     
     <xsl:param name="temp"  required="yes"/>
     <xsl:param name="uuid" required="yes"/>
+    <xsl:param name="postprocess_modules.xml" required="yes"/>
+    <xsl:param name="basedir" required="yes"/>
+    
+    <xsl:template mode="system_cache__appinfo:preprocess" match="preprocess_dita">
+        <project basedir="{$temp}" name="project_for_{local-name()}" default="default">
+            <property name="uuid" value="{$uuid}"/>
+            <property name="temp" value="{$temp}"/>
+            <target name="default">
+                <xsl:apply-templates mode="system_cache__appinfo:preprocess"/>
+            </target>
+        </project>
+    </xsl:template>
     
     <xsl:template mode="system_cache__appinfo:postprocess" match="postprocess_dita">
         <project basedir="{$temp}" name="project_for_{local-name()}" default="default">
+            <property name="uuid" value="{$uuid}"/>
+            <property name="temp" value="{$temp}"/>
             <target name="default">
                 <xsl:apply-templates mode="system_cache__appinfo:postprocess"/>
             </target>
@@ -19,7 +33,6 @@
     </xsl:template>
     
     
-    
     <xsl:template mode="system_cache__appinfo:postprocess" match="base64_to_image">
         <xsl:choose>
             <xsl:when test="@srcfile and @dstfile">
@@ -35,10 +48,27 @@
         </xsl:choose>
     </xsl:template>
     
-    <xsl:template mode="system_cache__appinfo:postprocess" match="gml_to_image">
+    <xsl:template mode="system_cache__appinfo:preprocess" match="gml_to_image">
         <xsl:choose>
-            <xsl:when test="@srcfile and @dstfile">
-                <echo>TODO convert gml 2 png for <xsl:value-of select="@srcfile"/> to <xsl:value-of select="@dstfile"/> </echo>
+            <xsl:when test="@srcfile and @dstfile and @fileindex">
+                <echo>TODO convert gml 2 png for <xsl:value-of select="@srcfile"/> to <xsl:value-of select="@dstfile"/> , @fileindex=<xsl:value-of select="@fileindex"/>; - tymczasowy sposob mapowania do konfigu</echo>
+                <xsl:variable name="current_node" select="."/>
+                <xsl:variable name="postprocess_modules" select="doc($postprocess_modules.xml)"/>
+                <xsl:for-each select="$postprocess_modules/postprocess_modules/node()[name()= current()/name()]">
+                    <xsl:for-each select="*">
+                        <xsl:element name="{name()}">
+                            <xsl:copy-of select="@*"/>
+                            <property name="basedir" value="{$basedir}"/>
+                            <xsl:for-each select="property">
+                                <xsl:element name="{name()}">
+                                    <xsl:attribute name="name" select="@name"/>
+                                    <xsl:attribute name="value" select="$current_node/@*[name()= current()/@name]"/>
+                                    <!--<xsl:copy-of select="@*"/>-->
+                                </xsl:element>
+                            </xsl:for-each>
+                        </xsl:element>
+                    </xsl:for-each>
+                </xsl:for-each>
             </xsl:when>
             <xsl:otherwise>
                 <xsl:message terminate="yes">#29 Not set @srcfile or @dstfile</xsl:message>

Неке датотеке нису приказане због велике количине промена