a.binder 8 роки тому
батько
коміт
fdc216a74d
61 змінених файлів з 4110 додано та 783 видалено
  1. 8 7
      SE/schema/WPS_Functions/BI_audit/build_BI_audit.xml
  2. 5 0
      SE/schema/WPS_Functions/WPS_Functions.SYSTEM.PROCES.IS-ALIVE.sh
  3. 2 0
      SE/schema/WPS_Functions/WPS_Functions.SYSTEM.PROCES.sh
  4. 27 0
      SE/schema/WPS_Functions/build.WPS_Functions.PRODUCT.xml
  5. 43 0
      SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.PROCES.IS-ALIVE.xml
  6. 22 0
      SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.PROCES.xml
  7. 14 0
      SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.xml
  8. 92 0
      SE/schema/WPS_Functions/build_WPS_Function_basedir.xml
  9. 90 0
      SE/schema/WPS_Functions/build_WPS_Function_properties.xml
  10. 60 27
      SE/schema/WPS_Functions/build_WPS_Functions.xml
  11. 24 3
      SE/schema/WPS_Functions/build_WPS_Functions.xsl
  12. 157 0
      SE/schema/WPS_Functions/csv2xml/build_csv2xml.xml
  13. 10 8
      SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml
  14. 5 4
      SE/schema/WPS_Functions/default_db/check_java_process_count/build_check_java_process_count.xml
  15. 10 9
      SE/schema/WPS_Functions/default_db/qgis_make_user_style/build_qgis_make_user_style.xml
  16. 26 0
      SE/schema/WPS_Functions/default_db/qgis_make_user_style/ogc.xsd
  17. 311 0
      SE/schema/WPS_Functions/default_db/qgis_make_user_style/warstwy.xml
  18. 69 0
      SE/schema/WPS_Functions/default_db/qgis_make_user_style/warstwy.xsd
  19. 18 0
      SE/schema/WPS_Functions/get_wfs/build.get_wfs.OBSOLETE-FIXME.xml
  20. 42 0
      SE/schema/WPS_Functions/get_wfs/build.get_wfs.PRODUCT.xml
  21. 13 0
      SE/schema/WPS_Functions/get_wfs/build.get_wfs.SYSTEM.xml
  22. 28 26
      SE/schema/WPS_Functions/get_wfs/build_get_wfs.xml
  23. 20 0
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/bgwrx.RelatedFeatureRoot.xsl
  24. 25 0
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.INSTALL.xml
  25. 22 0
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.OBSOLETE-FIXME.xml
  26. 42 0
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.PRODUCT.xml
  27. 14 0
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.SYSTEM.xml
  28. 117 40
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml
  29. 360 64
      SE/schema/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsl
  30. 7 5
      SE/schema/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml
  31. 10 5
      SE/schema/WPS_Functions/mapserver_gml_to_png/build_mapserver_gml_to_png.xml
  32. 180 18
      SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xml
  33. 233 34
      SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xsl
  34. 23 8
      SE/schema/WPS_Functions/object_modeling/build_object_modeling.xml
  35. 27 0
      SE/schema/WPS_Functions/object_modeling/object_modeling.xsd
  36. 9 5
      SE/schema/WPS_Functions/object_modeling_build_infrastructure/build_object_modeling_build_infrastructure.xml
  37. 8 7
      SE/schema/WPS_Functions/object_modeling_by_default_db_xml_schema/build_object_modeling_by_default_db_xml_schema.xml
  38. 49 0
      SE/schema/WPS_Functions/object_modeling_new/build_object_modeling_new.child.xsl
  39. 89 288
      SE/schema/WPS_Functions/object_modeling_new/build_object_modeling_new.xml
  40. 32 0
      SE/schema/WPS_Functions/object_modeling_new/object_modeling_new.xsd
  41. 12 5
      SE/schema/WPS_Functions/stock_optimize_calculations_raszczyk/build_stock_optimize_calculations_raszczyk.xml
  42. 31 0
      SE/schema/WPS_Functions/system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml
  43. 312 42
      SE/schema/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml
  44. 2 0
      SE/schema/WPS_Functions/system_ui_info_speech/psuis.addToLaunchctl.header.plist.xml
  45. 44 5
      SE/schema/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsl
  46. 1 0
      SE/schema/ant-url_action/build.WPS_Functions.PRODUCT.xml
  47. 1 0
      SE/schema/ant-url_action/build.WPS_Functions.SYSTEM.xml
  48. 1 0
      SE/schema/ant-url_action/build_WPS_Function_basedir.xml
  49. 1 0
      SE/schema/ant-url_action/build_WPS_Function_properties.xml
  50. 10 0
      SE/schema/build.p5build.GLOBALS.xml
  51. 21 0
      SE/schema/build.p5build.PRODUCT.xml
  52. 24 0
      SE/schema/build.p5build.SYSTEM.transformed.xml
  53. 14 0
      SE/schema/build.p5build.SYSTEM.xml
  54. 1119 170
      SE/schema/build.xml
  55. 14 0
      SE/schema/build_SE_basedir/build.p5build_SE.PRODUCT.xml
  56. 77 0
      SE/schema/build_SE_basedir/build.p5build_SE.SYSTEM.xml
  57. 41 0
      SE/schema/build_SE_basedir/build_SE.check_OS.xml
  58. 31 0
      SE/schema/build_SE_basedir/build_SE.fail_if_user_is_not_root.xml
  59. 9 0
      SE/schema/build_SE_basedir/build_SE.properties.xml.xsl
  60. 1 0
      SE/schema/build_SE_basedir/procesy5_config.default_db.xsl
  61. 1 3
      SE/schema/build_SE_basedir/procesy5_config.folders.xsl

+ 8 - 7
SE/schema/WPS_Functions/BI_audit/build_BI_audit.xml

@@ -2,16 +2,17 @@
 <project basedir="../../." name="BI_audit" default="BI_audit">
     <description>to execute Business inteligence corelations analysis TODO</description>
     
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
     <!-- 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"/>
+    <!--<property name="WPS_Functions" value="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" value="${WPS_Functions}/build_WPS_Functions.xml"/> <!-\- call it to get properties -\->
+    <property name="build_WPS_Functions.xml.properties" value="${build_WPS_Functions.xml}.properties"/>-->
     <!-- eof modules WPS_Functions  -->
     
     
     <!-- local shared module individual properties should contain ${project.name} basedir ant its .temp -->
-    <property name="BI_audit" location="${basedir}/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml"/>
-    <property name="BI_audit_basedir" location="${basedir}/WPS_Functions/BI_audit"  />                         
+    <property name="BI_audit" location="${WPS_Functions.basedir}/graph_gnuplot/build_graph_gnuplot.xml"/>
+    <property name="BI_audit_basedir" location="${WPS_Functions.basedir}//BI_audit"  />                         
     <property name="BI_audit_basedir.temp" location="${BI_audit_basedir}/temp"  />
     <!-- eof shared local module individual properties -->
     
@@ -45,8 +46,8 @@
     </target>
     
     <target name="read_build_properties" depends="BI_audit:create_tempdir">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
     

+ 5 - 0
SE/schema/WPS_Functions/WPS_Functions.SYSTEM.PROCES.IS-ALIVE.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+ps ax |grep -w $1 |grep -v grep |grep -v "WPS_Functions.SYSTEM.PROCES.IS-ALIVE.sh" >/dev/null && echo "ALIVE" || {
+echo "DEAD"
+exit 1
+}

+ 2 - 0
SE/schema/WPS_Functions/WPS_Functions.SYSTEM.PROCES.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+echo $$

+ 27 - 0
SE/schema/WPS_Functions/build.WPS_Functions.PRODUCT.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../" name="WPS_Functions.PRODUCT" default="WPS_Functions.parent.PRODUCT.ifdef">
+  
+  <include file="../build.p5build.PRODUCT.xml"/>
+  <include file="build_WPS_Function_basedir.xml" as="basedir"/>
+    <condition property="WPS_Functions.PRODUCT.ifdef.parent" taskname="WPS_Functions.parent.PRODUCT.ifdef">
+        <isset property="p5build_SE.PRODUCT.name"/>
+    </condition>
+  
+    <property name="WPS_Functions.PRODUCT.name" value="${p5build_SE.PRODUCT.name}.WPS_Functions"/>
+    <property name="WPS_Functions.PRODUCT.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}"/>
+    <property name="WPS_Functions.basedir" location="${basedir}/WPS_Functions"/>
+    <property name="WPS_Functions.build" location="${WPS_Functions.basedir}/build_WPS_Functions.xml"/>
+    <property name="WPS_Functions.xsl" location="${WPS_Functions.basedir}/build_WPS_Functions.xsl"/>
+    <property name="WPS_Functions.temp" location="${WPS_Functions.basedir}/temp"/>
+    <property name="WPS_Functions.properties" location="${WPS_Functions.basedir}/.build_WPS_Functions.xml.properties" />
+    <property name="WPS_Functions.childproperties" value="${WPS_Functions.basedir}/.build_WPS_Functions.childproperties"/>
+    <!--<property name="WPS_Functions.properties.xml" value="" />-->
+  
+    <target name="WPS_Functions.parent.PRODUCT.ifdef" unless="WPS_Functions.PRODUCT.ifdef.parent">
+        <fail>There is not set correct parent PRODUCT from expected file="../build.p5build.PRODUCT.xml" </fail>
+    </target>
+    
+    
+    
+  
+</project>

+ 43 - 0
SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.PROCES.IS-ALIVE.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../" name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE" default="WPS_Functions.SYSTEM.PROCES.IS-ALIVE">
+  
+    <include file="build.WPS_Functions.PRODUCT.xml" optional="true"/>
+  
+    
+    <property name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.build"        location="${WPS_Functions.basedir}/build.WPS_Functions.SYSTEM.PROCES.IS-ALIVE.xml"/>
+    <property name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.bash-script"           location="${WPS_Functions.basedir}/WPS_Functions.SYSTEM.PROCES.IS-ALIVE.sh"/>
+    
+    <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
+    <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process"/>
+    <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"/>
+    <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
+    
+    
+    <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE" description="To if typed process is alive">
+        <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process"/>
+        <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"/>
+        <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond"/>
+        <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
+        
+        <input addproperty="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process" message="Type process Process ID to check if it is alive"/>
+        <exec executable="${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.bash-script}" 
+            outputproperty="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"
+        />
+        <condition taskname="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond" property="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
+            <contains string="${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result}"
+                substring="ALIVE" />
+        </condition>
+    </target>
+     
+    <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond" depends="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.ALIVE,WPS_Functions.SYSTEM.PROCES.IS-ALIVE.DEAD"/>
+        
+    
+    <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.ALIVE" if="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
+        <echo>Process ${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive} is ALIVE</echo>
+    </target>
+    
+    <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.DEAD" unless="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
+        <echo>Process ${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive} is DEAD</echo>
+    </target>
+  
+</project>

+ 22 - 0
SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.PROCES.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../" name="WPS_Functions.SYSTEM.PROCES" default="WPS_Functions.SYSTEM.PROCES">
+  
+    <include file="${WPS_Functions.basedir}/build.WPS_Functions.PRODUCT.xml" optional="true"/>
+    <include file="${WPS_Functions.basedir}/build.WPS_Functions.SYSTEM.PROCES.IS-ALIVE.xml" optional="true"/>
+    
+    <property name="WPS_Functions.SYSTEM.PROCES.build"        location="${WPS_Functions.basedir}/build.WPS_Functions.SYSTEM.PROCES.xml"/>
+    <property name="WPS_Functions.SYSTEM.PROCES.bash-script"  location="${WPS_Functions.basedir}/WPS_Functions.SYSTEM.PROCES.sh"/>
+    <property name="WPS_Functions.SYSTEM.PROCES.last-id.xml"  location="${WPS_Functions.basedir}/WPS_Functions.SYSTEM.PROCES.last-id.xml"/>
+    
+    
+    <target name="WPS_Functions.SYSTEM.PROCES" description="To detect current process ID by using bash">
+        <exec executable="${WPS_Functions.SYSTEM.PROCES.bash-script}" outputproperty="WPS_Functions.SYSTEM.PROCES.ID"/>
+        <echoxml file="${WPS_Functions.SYSTEM.PROCES.last-id.xml}">
+            <WPS_Functions.SYSTEM.PROCES.last-id.xml xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd">
+                ${WPS_Functions.SYSTEM.PROCES.ID}
+            </WPS_Functions.SYSTEM.PROCES.last-id.xml>
+        </echoxml>
+    </target>
+      
+  
+</project>

+ 14 - 0
SE/schema/WPS_Functions/build.WPS_Functions.SYSTEM.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../" name="WPS_Functions.SYSTEM">
+  
+    <include file="${basedir}/WPS_Functions/build.WPS_Functions.PRODUCT.xml" optional="true"/>
+    <include file="${WPS_Functions.basedir}/build.WPS_Functions.PRODUCT.xml" optional="true"/>
+    <include file="${WPS_Functions.basedir}/build.WPS_Functions.SYSTEM.PROCES.xml" optional="true"/>
+    
+   
+    <property name="WPS_Functions.SYSTEM.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${WPS_Functions.PRODUCT.name}.log"/>
+    <property name="WPS_Functions.SYSTEM.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${WPS_Functions.PRODUCT.name}.log"/>
+    
+    
+  
+</project>

+ 92 - 0
SE/schema/WPS_Functions/build_WPS_Function_basedir.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../." name="build_WPS_Functions_basedir"
+    xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
+    >
+    <description>This script should be included to all builds to be called for managing tempdir and basedir and/or its repository </description>
+    
+    <!--
+        example project structure
+        
+        <project basedir="../../." name="p5_TPP:template_p5_project" default="p5_TPP:default_template_p5_project"
+            xmlns:p5_TPP="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/template_p5_project/template_p5_project.xsd">
+    
+            <description>This is template example project to show how to handle properties</description>
+               
+                 <include file="${basedir}/WPS_Functions/build_WPS_Function_basedir.xml" as="p5bws"/>
+               
+               
+               
+                  <target name="p5_TPP:default_template_p5_project" depends="p5bws.p5bws:create_tempdir" description="Project example default action with reading properties">
+                      <echo> We have important properties like ${public_html} </echo>
+                  </target>
+              
+                
+              
+        </project>
+   
+    -->
+    <!--<include file="build.WPS_Functions.PRODUCT.xml" optional="true"/>-->
+    
+    <!-- globbal properties -->
+    <property name="public_html" value="${basedir}"/>
+    <property name="build_properties" value="${p5build.properties}" />
+    <property name="build_properties.xml" value="${p5build.properties.xml}" />
+    
+    <property name="WPS_Functions" value="${WPS_Functions.basedir}"/>
+    <property name="WPS_Functions.temp" value="${WPS_Functions.temp}"/>
+    <property name="build_WPS_Functions.xml" value="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" value="${WPS_Functions.properties}"/>
+    
+    
+    
+    
+    <target name="p5bws:dirs" depends="p5bws:dirs.cond,p5bws:dirs.temp.create,p5bws:dirs.repository.create,p5bws:dirs.repository.dita.create">
+        <echo> {local.temp} = ${local.temp}
+            {local.repository}  = ${local.repository}
+        </echo>
+    </target>
+        
+    <target name="p5bws:dirs.test">
+        <echo> testing if set ${local.temp}?</echo>
+        <condition taskname="p5bws:dirs.cond" property="local.temp.true">
+            <isset property="local.temp" />
+        </condition>
+        <condition taskname="p5bws:dirs.cond" property="local.repository.true">
+            <isset property="local.repository"/>
+        </condition>
+        <condition taskname="p5bws:dirs.cond" property="local.repository.dita.true">
+            <isset property="local.repository.dita"/>
+        </condition>
+    </target>
+    
+    <target name="p5bws:dirs.cond" depends="p5bws:dirs.test">
+        <echo> cond result for ${local.temp} = ${local.temp.true}</echo>
+    </target>    
+    
+    
+    <target name="p5bws:dirs.temp.create" if="${local.temp.true}" >
+        <mkdir dir="${local.temp}"/>
+    </target>
+    <target name="p5bws:dirs.repository.create" if="${local.repository.true}" >
+        <mkdir dir="${local.repository}"/>
+    </target>
+    <target name="p5bws:dirs.repository.dita.create" if="${local.repository.dita.true}" >
+        <mkdir dir="${local.repository.dita}"/>
+    </target>
+    
+    
+    <target name="p5bws:dirs.clean" depends="p5bws:dirs.cond,p5bws:dirs.temp.clean,p5bws:dirs.repository.clean,p5bws:dirs.repository.dita.clean" description="Clean all output and temp files"/>
+        
+    
+    <target name="p5bws:dirs.temp.clean" depends="p5bws:dirs.cond" if="${local.temp.true}" >
+        <delete dir="${local.temp}" failonerror="false"/>
+    </target>
+    <target name="p5bws:dirs.repository.clean" if="${local.repository.true}" >
+        <delete dir="${local.repository}" failonerror="false"/>
+    </target>
+    <target name="p5bws:dirs.repository.dita.clean" if="${local.repository.dita.true}" >
+        <delete dir="${local.repository.dita}" failonerror="false"/>
+    </target>
+    
+    
+</project>

+ 90 - 0
SE/schema/WPS_Functions/build_WPS_Function_properties.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../." name="build_WPS_Functions_properties"
+    xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
+    >
+    <description>This script should be included to all builds to be called for properties </description>
+  
+    <!--
+        example project structure
+        
+        <project basedir="../../." name="p5_TPP:template_p5_project" default="p5_TPP:default_template_p5_project"
+            xmlns:p5_TPP="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/template_p5_project/template_p5_project.xsd">
+    
+            <description>This is template example project to show how to handle properties</description>
+               
+                 <include file="${basedir}/WPS_Functions/build_WPS_Function_properties.xml" as="p5bws"/>
+               
+                <target name="p5_TPP.properties" depends="p5bws.p5bws.read_build_properties">
+                        <property name="p5dg.basedir" value="${WPS_Functions}/template_p5_project"/>
+                </target>
+               
+                  <target name="p5_TPP:default_template_p5_project" depends="p5bws.p5bws.read_build_properties" description="Project example default action with reading properties">
+                      <echo> We have important properties like ${public_html} </echo>
+                  </target>
+              
+                
+              
+        </project>
+   
+    -->
+    <include file="build.WPS_Functions.PRODUCT.xml"/>
+    
+    <!-- globbal properties -->
+    <property name="public_html" value="${basedir}"/>
+    <property name="build_properties" value="${public_html}/.build_properties" />
+    <property name="build_properties.xml" value="${public_html}/.build_properties.xml" />
+    
+    <property name="WPS_Functions" value="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" value="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="WPS_Functions.temp" value="${WPS_Functions.temp}"/>
+    <property name="build_WPS_Functions.xml.properties" value="${WPS_Functions.properties}"/>
+    
+    
+    <property name="p5bws.build_WPS_Function_properties.xml" value="${WPS_Functions}/build_WPS_Function_properties.xml"/>
+    <property name="p5bws.build_WPS_Function_basedir.xml" value="${WPS_Functions}/build_WPS_Function_basedir.xml"/>
+    
+        
+        
+    <target name="p5bws:build_WPS_Functions.xml.properties.test" >
+        <property name="build_WPS_Functions.xml.properties" value="${WPS_Functions.build}.properties"/>
+        
+        <tstamp>
+            <format property="p5bws.last.minute" pattern="MM/dd/yyyy hh:mm a"  offset="-5" unit="minute"/>
+        </tstamp>
+        <tempfile property="p5bws.read.info.about.file.changes.current.timestamp" deleteonexit="yes" destdir="${WPS_Functions}" prefix="p5bws.read.info.about.file.changes.current.timestamp" suffix=".touch"/>
+        <touch file="${p5bws.read.info.about.file.changes.current.timestamp}" datetime="${p5bws.last.minute}" verbose="true"/>
+        <uptodate property="p5bws.build_WPS_Functions.xml.properties.test.too_old"  targetfile="${p5bws.read.info.about.file.changes.current.timestamp}" >
+            <srcfiles file="${WPS_Functions.properties}"/>
+        </uptodate>
+        <echo>#58 todo (brak temp tez) uptodate test_timestamp to srcfile build_WPS_Functions.xml.properties = ${p5bws.build_WPS_Functions.xml.properties.test.too_old} </echo>
+        <condition property="p5bws.build_WPS_Functions.xml.properties.cond" taskname="build_WPS_Functions.xml.properties.cond">
+            <and>
+                <available file="${WPS_Functions.properties}"/>
+                <not><contains string="${php_session_id}" substring="'php_session_id'"/></not>
+            </and>
+        </condition>
+    </target>
+    
+    <target name="p5bws:build_WPS_Functions.xml.properties.cond" depends="p5bws:build_WPS_Functions.xml.properties.test,p5bws:build_WPS_Functions.xml.properties.fail,p5bws:build_WPS_Functions.xml.properties.ok"/>
+    
+    <target name="p5bws:build_WPS_Functions.xml.properties.fail"  unless="${p5bws.build_WPS_Functions.xml.properties.cond}">
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <!--<property name="build_WPS_Functions.xml.properties" value="${WPS_Functions.build}.properties"/>-->
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
+    </target>
+    
+    <target name="p5bws:build_WPS_Functions.xml.properties.ok"  if="${p5bws.build_WPS_Functions.xml.properties.cond}">
+        <echo>#66 properties ${WPS_Functions.properties} were ok ${p5bws.build_WPS_Functions.xml.properties.cond} </echo>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
+    </target>
+    
+    <target name="p5bws:read_build_properties" depends="p5bws:build_WPS_Functions.xml.properties.cond"/>
+        
+        
+    
+    
+  
+  
+  
+  
+</project>

+ 60 - 27
SE/schema/WPS_Functions/build_WPS_Functions.xml

@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project basedir="../." name="build_WPS_Functions">
-  
+<project basedir="../." name="WPS_Functions"
+    xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
+    
+    >
   
+  <include file="build.WPS_Functions.PRODUCT.xml"/>
   
   <!-- TODO config/licence/to handle params  - in procesy5 there is SE/schema/WPS_Functions folder - so we need to tell it is in one more root folder ../-->
     <property name="bootstrap.php" location="${basedir}/../se-lib/bootstrap.php"/> 
@@ -11,16 +14,18 @@
     <property name="build_properties" location="${basedir}/.build_properties" />
     <property name="public_html" location="${basedir}" /> <!-- in some modules needed - to be removed -->
 
+
+    
   
     <!-- modules WPS_Functions - to be copied to any module needed -->
     <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
     <property name="WPS_Functions.temp" location="${WPS_Functions}/temp"/>
-    <property name="WPS_Functions.childproperties" location="${WPS_Functions}/.build_WPS_Functions.childproperties"/>
+    
     <property name="WPS_Functions.childproperties.builds.xml" location="${WPS_Functions.childproperties}/WPS_Functions.builds.xml"/>
     <property name="build_WPS_Functions.childproperties.builds.xml" location="${WPS_Functions.temp}/build_WPS_Functions.childproperties.builds.xml"/>
-    <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
-    <property name="build_WPS_Functions.xsl" location="${WPS_Functions}/build_WPS_Functions.xsl"/>
-    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions}/.build_WPS_Functions.xml.properties"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xsl" location="${WPS_Functions.xsl}"/>
+    <property name="build_WPS_Functions.xml.properties" value="${WPS_Functions.properties}"/>
     
     
     
@@ -43,15 +48,15 @@
     <property name="object_modeling_new_basedir" location="${basedir}/WPS_Functions/object_modeling_new"  />
     <property name="object_modeling_by_default_db_xml_schema_basedir" location="${basedir}/WPS_Functions/object_modeling_by_default_db_xml_schema"  />
     
-    <property name="PATH_ADD" value="/opt/local/bin:/usr/bin:/bin"/> <!-- to use in mapserver_gml_to_png ant kw -->
+    
     
     <property name="default_db:recurse_ant_basedir" location="${basedir}/WPS_Functions/default_db/recurse_ant"/>
-    <!--<property name="default_db:recurse_ant_basedir.temp" location="${default_db:recurse_ant_basedir}/temp/${uuid}"/>-->
+    <!--<property name="default_db:recurse_ant_basedir.temp" value="${default_db:recurse_ant_basedir}/temp/${uuid}"/>-->
     <property name="default_db:recurse_ant_basedir.out" location="${default_db:recurse_ant_basedir}/out"/>
     <property name="default_db:recurse_ant_basedir.recurse_cache" location="${default_db:recurse_ant_basedir}/recurse_cache"/><!-- @2017-06-22 cache plan -->
-    <property name="default_db:recurse_ant" location="${default_db:recurse_ant_basedir}/build_recurse_ant.xml"/>
+    <property name="default_db:recurse_ant" value="${default_db:recurse_ant_basedir}/build_recurse_ant.xml"/>
     
-    <property name="build_recurse_ant_cache_control.xsl" value="${basedir}/default_db_xml_cache.public/build_recurse_ant_cache_control.xsl"/>
+    <property name="build_recurse_ant_cache_control.xsl" location="${basedir}/default_db_xml_cache.public/build_recurse_ant_cache_control.xsl"/>
     
     <property name="get_wfs_basedir" location="${basedir}/WPS_Functions/get_wfs"/><!-- to ordinary retrieve wfs data  -->
     <property name="get_wfs_basedir.temp" location="${get_wfs_basedir}/temp"/>
@@ -61,11 +66,11 @@
     <property name="object_modeling_new" location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml"/>
     <property  name="object_modeling_new.xsl" location="${basedir}/default_db_xml_cache.public/object_modeling_new.xsl"/>
     <property  name="object_modeling.xsl" location="${basedir}/default_db_xml_cache.public/object_modeling.xsl"/>
-    <property name="object_modeling_new_by_xml_schema.xsl" value="${basedir}/default_db_xml_cache.public/object_modeling_new_by_xml_schema.xsl"/>
+    <property name="object_modeling_new_by_xml_schema.xsl" location="${basedir}/default_db_xml_cache.public/object_modeling_new_by_xml_schema.xsl"/>
     
     <property name="build_CRM_PROCES_tree" location="${WPS_Functions}/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml"/>
     
-    <property name="build_check_java_process_count.xml"  value="${basedir}/WPS_Functions/default_db/check_java_process_count/build_check_java_process_count.xml"/><!-- will set  output current max process in STDOUT - by using with ps ax|grep ant-launcher |wc -l -->
+    <property name="build_check_java_process_count.xml"  location="${basedir}/WPS_Functions/default_db/check_java_process_count/build_check_java_process_count.xml"/><!-- will set  output current max process in STDOUT - by using with ps ax|grep ant-launcher |wc -l -->
         
     <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"  />                         
@@ -80,12 +85,12 @@
     <property name="postprocess.xsl" location="${basedir}/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl"/>
     
     
-    <property name="build_object_modeling_by_default_db_xml_schema.xml" value="${WPS_Functions}/object_modeling_by_default_db_xml_schema/build_object_modeling_by_default_db_xml_schema.xml"/>
+    <property name="build_object_modeling_by_default_db_xml_schema.xml" location="${WPS_Functions}/object_modeling_by_default_db_xml_schema/build_object_modeling_by_default_db_xml_schema.xml"/>
     
     <property name="get_wfs_recurse_xsl.xsl" location="${basedir}/default_db_xml_cache.public/get_wfs_recurse_xsl.xsl"/>
-    <property name="build_get_wfs_recurse_xsl" value="${WPS_Functions}/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml"/>
+    <property name="build_get_wfs_recurse_xsl" location="${WPS_Functions}/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml"/>
     
-    <property name="build_csv2xml.local_path" value="WPS_Functions/csv2xml"/> <!-- To be implemented in other modules to install xsl stylesheets correctly -->
+    <property name="build_csv2xml.local_path" location="WPS_Functions/csv2xml"/> <!-- To be implemented in other modules to install xsl stylesheets correctly -->
     <property name="build_csv2xml" location="${basedir}/${build_csv2xml.local_path}/build_csv2xml.xml"/>
     
     <property name="csv2xml" location="/opt/local/bin/csv2xml"/>
@@ -95,15 +100,30 @@
     
     <property name="build_username_and_pass_from_passwordBase64Basic.xml" location="${WPS_Functions}/username_and_pass_from_passwordBase64Basic/build_username_and_pass_from_passwordBase64Basic.xml"/>
     
+    <property name="system_ui_info_speech" location="${basedir}/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml"/>
+         <!--<!-\-to say something manager: typical tasks:-\->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+                <property name="p5suis:say_text" value="some text to say" />
+            </ant>
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+            
+            or to Polish 
+            ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue.PL">
+                <property name="p5suis:say_text" value="some text to say" />
+            </ant>
+           <!-\- and after that always-\->
+             
+        -->
+    
     <!-- EOF modules properties copied / controlled references -->
     
     
  
     
-   <!-- <property name="wfs_output.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>
-    <property name="wfs_result.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_result.xml"/>
-    <property name="wfs_error.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_error.xml"/>
-    <property name="wfs_timestamp.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_timestamp.xml"/>
+   <!-- <property name="wfs_output.xml" value="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>
+    <property name="wfs_result.xml" value="${get_wfs_basedir.temp}/${uuid}.wfs_result.xml"/>
+    <property name="wfs_error.xml" value="${get_wfs_basedir.temp}/${uuid}.wfs_error.xml"/>
+    <property name="wfs_timestamp.xml" value="${get_wfs_basedir.temp}/${uuid}.wfs_timestamp.xml"/>
     -->
     
     <target name="create_tempdir">
@@ -112,6 +132,9 @@
     </target>
     
     
+    
+    
+    
     <target name="read_build_properties.childproperties" depends="create_tempdir, save_build_properties,read_WPS_Functions.childproperties.builds" description="To read child modules installed properties">
         <concat destfile="${build_WPS_Functions.xml.properties}" fixlastline="true" overwrite="yes">
             <fileset dir="${WPS_Functions.childproperties}" includes="*.properties"/>
@@ -124,6 +147,7 @@
             <exclude name="**/temp/**"/>
             <exclude name="**/recurse_cache/**"/>
             <exclude name="**/build_WPS_Functions.xml/**"/>
+            <exclude name="**/build_WPS_Functions.xml/**"/>
         </fileset>           
         <property name="prop.dist.contents" refid="dist.contents"/>
         <echoxml file="${WPS_Functions.childproperties.builds.xml}"><WPS_Functions.childproperties.builds>${prop.dist.contents}</WPS_Functions.childproperties.builds></echoxml>
@@ -134,11 +158,18 @@
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
                 <!--<attribute name="http://saxon.sf.net/feature/initialMode" value="RelatedFeatureRoot"/>-->
             </factory>
+            <param name="basedir" expression="${basedir}"/>
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
             <param name="WPS_Functions" expression="${WPS_Functions}"/>
         </xslt>
-        <ant antfile="${build_WPS_Functions.childproperties.builds.xml}" inheritall="yes" inheritrefs="yes"/>
         
+        
+        
+    </target>
+  
+  
+    <target name="read_WPS_Functions.childproperties.builds.read" depends="read_WPS_Functions.childproperties.builds">
+        <ant antfile="${build_WPS_Functions.childproperties.builds.xml}" inheritall="yes" inheritrefs="yes"/>
     </target>
   
     <target name="save_build_properties" > <!-- todo nie wiem czy trzymac properties tu i tam - do optymalziacji-->
@@ -146,16 +177,18 @@
         <ant antfile="${build_root.xml}"  target="save_build_properties"/>
         <loadproperties srcfile="${build_properties}"/>
         
-        <property name="PROCES_INIT_tree_to_dita.xsl" location="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/> <!-- to disable and use tree_to_dita.xsl which includes it  -->
-        <property name="tree_to_dita.xsl" location="${default_db_xml_cache.public}/default_db/tree_to_dita.xsl"/>
+        <property name="PROCES_INIT_tree_to_dita.xsl" value="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/> <!-- to disable and use tree_to_dita.xsl which includes it  -->
+        <property name="tree_to_dita.xsl" value="${default_db_xml_cache.public}/default_db/tree_to_dita.xsl"/>
         <property name="api_url" value="${TargetNamespaceBindings}/SE/version-git/wfs-data.php"/> <!-- TO BE SET FROM LICENCE -->
         <property name="namespace_prefix" value="default_db"/>
         <property name="namespace_prefix_p5_tr_map" value="default_db"/>
-        <property name="p5_tr_map_dir" location="${p5_tr_map.local}"/>
-        <property name="simpleSchema_dir" location="${simpleSchema.local}"/>
-        <property name="detect_resource_type_dir" location="${detect_resource_type.local}"/>
-        <property name="build_complexType_dir" location="${build_complexType.local}"/>
-        <echoproperties destfile="${build_WPS_Functions.xml.properties}" />
+        <property name="p5_tr_map_dir" value="${p5_tr_map.local}"/>
+        <property name="simpleSchema_dir" value="${simpleSchema.local}"/>
+        <property name="detect_resource_type_dir" value="${detect_resource_type.local}"/>
+        <property name="build_complexType_dir" value="${build_complexType.local}"/>
+        <echoproperties destfile="${WPS_Functions.properties}" />
+        <chmod file="${WPS_Functions.properties}" perm="777"/>
+        <chown file="${WPS_Functions.properties}" owner="${p5build_SE.SYSTEM.local-user}"/>
     </target>
   
     <target name="clean" description="to clean modules dependent temporary files and its outputs">

+ 24 - 3
SE/schema/WPS_Functions/build_WPS_Functions.xsl

@@ -7,17 +7,38 @@
     <xsl:strip-space elements="*"/>
     
     <xsl:param name="WPS_Functions" required="yes"/>
-    
+    <xsl:include href="../default_db_xml_cache.public/system_cache__appinfo/basedir.xsl"/>
     
     <xsl:template match="WPS_Functions.childproperties.builds">
-        <project basedir="." name="WPS_Functions.childproperties.builds" default="WPS_Functions.childproperties.builds">
+        <project basedir="{$basedir}" name="WPS_Functions.childproperties.builds" default="WPS_Functions.childproperties.builds">
             <description>
                 Generated ant by xsl from childproperties modules, to be run modules in mode to let they give their properties and dependencies
             </description>
             <target name="WPS_Functions.childproperties.builds">
                 <xsl:for-each select="tokenize(.,';')">
                     <echo>Running <xsl:value-of select="."/></echo>
-                    <ant antfile="{$WPS_Functions}/{.}" inheritall="yes" inheritrefs="yes" target="write_child_props_to_config_dir"/>
+                    <xsl:variable name="antfile" select="doc(concat($WPS_Functions,'/',.))"/>
+                    <xsl:variable name="default_prefix">
+                        <xsl:choose>
+                            <xsl:when test="substring-before($antfile/project/@default,':')">
+                                <xsl:value-of select="substring-before($antfile/project/@default,':')"/>
+                            </xsl:when>
+                            <xsl:otherwise/>
+                        </xsl:choose>
+                    </xsl:variable>
+                    <xsl:choose>
+                        <xsl:when test="$antfile//target[@name='write_child_props_to_config_dir']">
+                            <xsl:message>#23 adding task to read properties for <xsl:value-of select="."/>  - build project default prefix is not used!</xsl:message>
+                            <ant antfile="{$WPS_Functions}/{.}" inheritall="yes" inheritrefs="yes" target="write_child_props_to_config_dir"/>
+                        </xsl:when>
+                        <xsl:when test="$antfile//target[@name=concat($default_prefix,':','write_child_props_to_config_dir')]">
+                            <ant antfile="{$WPS_Functions}/{.}" inheritall="yes" inheritrefs="yes" target="{$default_prefix}:write_child_props_to_config_dir"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:message>#26 WARNING file <xsl:value-of select="."/> doesnt specify task for export properties ( target write_child_props_to_config_dir ) </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                    
                 </xsl:for-each>
             </target>
         </project>

+ 157 - 0
SE/schema/WPS_Functions/csv2xml/build_csv2xml.xml

@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." name="csv2xml_dir">
+    <description> To convert csv file using xlsx2csv and also xls 2 xml</description>
+    
+    
+   <!-- <property name="input" value="${input}"/>
+    <property name="output" value="${output}"/>-->
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <!--<property name="WPS_Functions" value="${WPS_Functions.basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" value="${WPS_Functions.build}"/> <!-\- call it to get properties -\->
+    <property name="build_WPS_Functions.xml.properties" value="${build_WPS_Functions.xml}.properties"/>-->
+    <!-- eof modules WPS_Functions  -->
+    
+    
+    <property name="build_csv2xml.local_path" value="WPS_Functions/csv2xml"/> <!-- To be implemented in other modules to install xsl stylesheets correctly -->
+    <property name="build_csv2xml" value="${basedir}/${build_csv2xml.local_path}/build_csv2xml.xml"/>
+    <property name="build_csv2xml.basedir" value="${basedir}/${build_csv2xml.local_path}"/>
+    <property name="build_csv2xml.basedir.temp" value="${basedir}/${build_csv2xml.local_path}/temp"/>
+    <property name="build_csv2xml.childproperties" value="${WPS_Functions.childproperties}/build_csv2xml.properties"/>
+    
+    
+    <property name="csv2xml.xsl" value="${build_csv2xml.basedir}/csv2xml.xsl"/>
+    <property name="csv2xml" value="${csv2xml}"/>
+    
+    
+    <target name="system_cache__appinfo:build_csv2xml.create_tempdir">
+        <mkdir dir="${build_csv2xml.basedir.temp}"/>
+    </target>
+    
+    
+    <target name="clean" description="Clean all output and temp files">
+        <delete dir="${build_csv2xml.basedir.temp}" failonerror="false"/>
+    </target>
+    
+    
+    
+    <target name="from_xsl_2_xml" depends="clean,system_cache__appinfo:build_csv2xml.create_tempdir" description="TODO to check if is working!!! To convert xls 2 xml">
+        <property name="from_xslx_2_xml.xls_unzipped" value="${build_csv2xml.basedir.temp}/xls_unzipped"/>
+        <mkdir dir="${from_xslx_2_xml.xls_unzipped}"/>
+        
+        <fail> #41 todo </fail>
+        <!--<xslt basedir="${basedir}" style="${xlsx.xsl}" in="${empty.xml}" destdir="${build_csv2xml.basedir.temp}"  out="${out}" 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/initialTemplate" value="{https://biuro.biall-net.pl/wfs/default_db/Types/xlsx.xsd}main"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!-\-<param name="it" expression="Types__x3A__xlsx__x3A__maina"/>-\->
+            <param name="Types__x3A__xlsx__x3A__unzipped_xlsx" expression="${from_xslx_2_xml.xlsx_unzipped}"/>
+            <!-\-<param name="Types__x3A__xlsx__x3A__unzipped_xlsx" expression="${basedir}/${poprawione_obszary_xml_dir}"/>-\->
+        </xslt>-->
+    </target>
+    
+    
+    
+    <target name="from_xslx_2_xml" depends="clean,system_cache__appinfo:build_csv2xml.create_tempdir" description="TODO to check if is working!!! To convert xlsx 2 xml">
+        <property name="from_xslx_2_xml.xlsx_unzipped" value="${build_csv2xml.basedir.temp}/xlsx_unzipped"/>
+        <mkdir dir="${from_xslx_2_xml.xlsx_unzipped}"/>
+        <exec executable="unzip" >
+            <arg value="-q"/>
+            <arg value="${input}"/>
+            <arg value="-d"/>
+            <arg value="${from_xslx_2_xml.xlsx_unzipped}"/>
+        </exec>
+        <xslt basedir="${basedir}" style="${xlsx.xsl}" in="${empty.xml}" destdir="${build_csv2xml.basedir.temp}"  out="${out}" 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/initialTemplate" value="{https://biuro.biall-net.pl/wfs/default_db/Types/xlsx.xsd}main"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="it" expression="Types__x3A__xlsx__x3A__maina"/>-->
+            <param name="Types__x3A__xlsx__x3A__unzipped_xlsx" expression="${from_xslx_2_xml.xlsx_unzipped}"/>
+            <!--<param name="Types__x3A__xlsx__x3A__unzipped_xlsx" expression="${basedir}/${poprawione_obszary_xml_dir}"/>-->
+        </xslt>
+    </target>
+    
+    
+    
+    <target name="any2xml_dir" depends="clean,system_cache__appinfo:build_csv2xml.create_tempdir"  description="convert recieved csv files to xml files to be parseable">
+        
+        <tempfile prefix="to_xml" suffix=".xml" property="csv_files_xml" destdir="${build_csv2xml.basedir.temp}"/>
+        <tempfile prefix="to_ant" suffix=".xml" property="build_2_xml" destdir="${build_csv2xml.basedir.temp}"/>
+        <!--<tempfile prefix="to_ant_build" suffix=".xml" property="to_ant_build" destdir="${build_csv2xml.basedir.temp}"/>-->
+        
+        <echo>Searching $input = ${input}</echo>
+        
+        <fileset dir="${input}" id="input.csv.id"   > 
+            <include name="**/*.*"/>
+            <!--<exclude name="**/*.xml"/>-->
+        </fileset>
+        <property name="csv_list" refid="input.csv.id"/>
+        
+        <echoxml file="${csv_files_xml}" >
+            <any2xml_dir>
+                ${csv_list}
+            </any2xml_dir>
+        </echoxml>
+        
+        
+        
+        
+        <xslt basedir="${build_csv2xml.basedir.temp}" style="${csv2xml.xsl}" in="${csv_files_xml}"  out="${build_2_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}postprocess"/>-->
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="output" expression="${output}"/>
+            <param name="input" expression="${input}"/>
+            <param name="basedir" expression="${build_csv2xml.basedir}"/>
+            <param name="csv2xml" expression="${csv2xml}"/>
+        </xslt>
+        
+        <ant antfile="${build_2_xml}"/>
+    </target>
+    
+    
+    
+    
+    
+    
+    <target name="csv2xml_dir" depends="clean,system_cache__appinfo:build_csv2xml.create_tempdir"  description="convert recieved csv files to xml files to be parseable">
+   
+        <tempfile prefix="to_xml" suffix=".xml" property="csv_files_xml" destdir="${build_csv2xml.basedir.temp}"/>
+        <tempfile prefix="to_ant" suffix=".xml" property="build_2_xml" destdir="${build_csv2xml.basedir.temp}"/>
+        <!--<tempfile prefix="to_ant_build" suffix=".xml" property="to_ant_build" destdir="${build_csv2xml.basedir.temp}"/>-->
+        
+        <echo>Searching $input = ${input}</echo>
+        
+        <fileset dir="${input}" id="input.csv.id"   > 
+            <include name="*.csv"/>
+        </fileset>
+        <property name="csv_list" refid="input.csv.id"/>
+        <echoxml file="${csv_files_xml}" >
+            <csv2xml_dir>
+                    ${csv_list}
+            </csv2xml_dir>
+        </echoxml>
+        
+        
+        <xslt basedir="${build_csv2xml.basedir.temp}" style="${csv2xml.xsl}" in="${csv_files_xml}"  out="${build_2_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}postprocess"/>-->
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="output" expression="${output}"/>
+            <param name="input" expression="${input}"/>
+            <param name="basedir" expression="${build_csv2xml.basedir}"/>
+            <param name="csv2xml" expression="${csv2xml}"/>
+        </xslt>
+        
+        <ant antfile="${build_2_xml}"/>
+    </target>
+  
+</project>

+ 10 - 8
SE/schema/WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml

@@ -5,10 +5,12 @@
         To retrieve process tree - just process menu and structurized processes
     </description>
     
+    
+    <include file="../../build.WPS_Functions.PRODUCT.xml"/>
     <!-- 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"/>
+    <!--<property name="WPS_Functions" value="${basedir}/WPS_Functions"/>-->
+    <!--<property name="build_WPS_Functions.xml" value="${WPS_Functions}/build_WPS_Functions.xml"/>--> <!-- call it to get properties -->
+    <!--<property name="build_WPS_Functions.xml.properties" value="${build_WPS_Functions.xml}.properties"/>-->
     <!-- eof modules WPS_Functions  -->
     
     
@@ -17,7 +19,7 @@
     <property name="CRM_PROCES_tree_basedir" location="${basedir}/WPS_Functions/default_db/CRM_PROCES_tree"  />                         
     <property name="CRM_PROCES_tree_basedir.temp" location="${CRM_PROCES_tree_basedir}/temp"  />
     
-    <property name="build_CRM_PROCES_tree.childproperties" location="${WPS_Functions.childproperties}/build_CRM_PROCES_tree.properties"/>
+    <property name="build_CRM_PROCES_tree.childproperties" location="${WPS_Functions.properties}/build_CRM_PROCES_tree.properties"/>
     
     <property name="set_parallel_java_process_max_aviable" value="40"/> <!-- override property for  -->
     
@@ -26,8 +28,8 @@
     
     <!-- inherited module wfs properties refs -->
  
-    <!--<property name="PROCES_INIT_tree_to_dita.xsl" location="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>-->
-    <!--<property name="tree_to_dita.xsl" location="${default_db_xml_cache.public}/default_db/tree_to_dita.xsl"/>--> <!-- file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db_xml_cache.public/default_db/tree_to_dita.xsl -->
+    <!--<property name="PROCES_INIT_tree_to_dita.xsl" value="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>-->
+    <!--<property name="tree_to_dita.xsl" value="${default_db_xml_cache.public}/default_db/tree_to_dita.xsl"/>--> <!-- file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db_xml_cache.public/default_db/tree_to_dita.xsl -->
     
     
     <!-- WPS_Function standard properties mainaint to be copied to any build module -->
@@ -36,8 +38,8 @@
     </target>
     
     <target name="read_build_properties" depends="default_db:CRM_PROCES:tree:create_tempdir">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     <!-- eof WPS_Function  -->
     

+ 5 - 4
SE/schema/WPS_Functions/default_db/check_java_process_count/build_check_java_process_count.xml

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project basedir="${basedir}" name="check_java_process_count" default="set_parallel_java_process_max">
   <description>To check ammount of working process in java  - use as input/output value </description>
-  
+    
+    <include file="../../build.WPS_Functions.PRODUCT.xml"/>
   
     <!-- 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"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <!--<property name="build_WPS_Functions.xml.properties" value="${build_WPS_Functions.xml}.properties"/>-->
     
     
     <property name="build_check_java_process_count.childproperties" location="${WPS_Functions.childproperties}/build_check_java_process_count.properties"/>

+ 10 - 9
SE/schema/WPS_Functions/default_db/qgis_make_user_style/build_qgis_make_user_style.xml

@@ -11,16 +11,17 @@
        also TODO to Android xml file warstwy.xml
     </description>
     
+    <include file="../../build.WPS_Functions.PRODUCT.xml"/>
     <!-- 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"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
     <!-- eof modules WPS_Functions  -->
     
     
     <!-- local module individual properties should contain ${project.name} basedir ant its .temp -->
                                                              
-    <!--<property name="build_qgis_make_user_style.xsl" location="${basedir}/WPS_Functions/default_db/qgis_make_user_style/build_qgis_make_user_style.xml"/>-->
+    <!--<property name="build_qgis_make_user_style.xsl" value="${basedir}/WPS_Functions/default_db/qgis_make_user_style/build_qgis_make_user_style.xml"/>-->
     <property name="qgis_make_user_style_basedir"   location="${basedir}/WPS_Functions/default_db/qgis_make_user_style"  />                         
     <property name="qgis_make_user_style_basedir.temp" location="${qgis_make_user_style_basedir}/temp"  />
     
@@ -36,7 +37,7 @@
     
     <!-- inherited module wfs properties refs -->
  
-    <!--<property name="PROCES_INIT_tree_to_dita.xsl" location="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>-->
+    <!--<property name="PROCES_INIT_tree_to_dita.xsl" value="${default_db_xml_cache.public}/default_db/CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>-->
     
     <target name="write_child_props_to_config_dir" depends="read_build_properties">
         <echoproperties destfile="${build_build_qgis_make_user_style.childproperties}"/>
@@ -49,8 +50,8 @@
     </target>
     
     <target name="read_build_properties" depends="default_db:qgis_make_user_style:create_tempdir">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     <!-- eof WPS_Function  -->
     
@@ -66,10 +67,10 @@
     
     <!--<target name="default_db:PROCES_INIT:from_recurse" depends="read_build_properties">
         <ant antfile="${default_db:recurse_ant}"  target="clean_temp_dir">
-            <property name="default_db:recurse_ant_basedir.temp" location="${default_db:recurse_ant_basedir}/temp/PROCES_INIT_list"/>
+            <property name="default_db:recurse_ant_basedir.temp" value="${default_db:recurse_ant_basedir}/temp/PROCES_INIT_list"/>
         </ant>
         <ant antfile="${default_db:recurse_ant}"  target="xml_recursed_from_tr_map_with_RelatedFeatureLoop">
-            <property name="default_db:recurse_ant_basedir.temp" location="${default_db:recurse_ant_basedir}/temp/PROCES_INIT_list"/>
+            <property name="default_db:recurse_ant_basedir.temp" value="${default_db:recurse_ant_basedir}/temp/PROCES_INIT_list"/>
             <property name="uuid" value="PROCES_INIT_list"/>
             <property name="typeName" value="default_db:PROCES_INIT"/>
             <property name="xpath" value="TYPE"/>

+ 26 - 0
SE/schema/WPS_Functions/default_db/qgis_make_user_style/ogc.xsd

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:ogc="http://www.opengis.net/ogc"
+           xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+           xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           elementFormDefault="qualified"
+           targetNamespace="http://www.opengis.net/ogc">
+   <xs:import schemaLocation="warstwy.xsd"/>
+   <xs:element name="Filter" id="___d5e117247-1_Filter">
+      <xs:complexType id="___d5e117248-1">
+         <xs:sequence id="___d5e117249-1">
+            <xs:element ref="ogc:PropertyIsEqualTo" id="___d5e117250-1"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+   <xs:element name="PropertyIsEqualTo" id="___d5e117251-1_PropertyIs">
+      <xs:complexType id="___d5e117252-1">
+         <xs:sequence id="___d5e117253-1">
+            <xs:element ref="ogc:PropertyName" id="___d5e117254-1"/>
+            <xs:element ref="ogc:Literal" id="___d5e117255-1"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+   <xs:element name="PropertyName" type="xs:NCName" id="___d5e117256-1_PropertyNa"/>
+   <xs:element name="Literal" type="xs:NCName" id="___d5e117257-1_Literal"/>
+</xs:schema>

+ 311 - 0
SE/schema/WPS_Functions/default_db/qgis_make_user_style/warstwy.xml

@@ -0,0 +1,311 @@
+<Layers xmlns:wfs="http://www.opengis.net/wfs"
+    xmlns:gml="http://www.opengis.net/gml"
+    xmlns:ogc="http://www.opengis.net/ogc"
+    xmlns:get_wfs_recurse_xsl="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/get_wfs_recurse_xsl.xsd"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db">
+    <Layer type="group">
+        <FullName>dane biznes</FullName>
+        <Name>dane biznes</Name>
+        <Title>dane biznes</Title>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:P5Automation1OrangeRaportSimple</FullName>
+            <Name>P5Automation1OrangeRaportSimple</Name>
+            <Title>P5Automation1OrangeRaportSimple</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff0ca06e</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c0ca06e</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:DEALS_TABLE</FullName>
+            <Name>DEALS_TABLE</Name>
+            <Title>Umowy</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff847288</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c847288</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:IN7_MK_BAZA_DYSTRYBUCJI</FullName>
+            <Name>IN7_MK_BAZA_DYSTRYBUCJI</Name>
+            <Title>Projekty</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff4042f2</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c4042f2</FillColor>
+            </Style>
+            <BBOX>18.434885944047313, 54.251962845875966, 18.471909564820827,
+                54.270630982768466</BBOX>
+        </Layer>
+    </Layer>
+    <Layer type="group">
+        <FullName>infrastruktura</FullName>
+        <Name>infrastruktura</Name>
+        <Title>infrastruktura</Title>
+        <Layer type="group" collapsed="1">
+            <FullName>pakiet mikrorurek</FullName>
+            <Name>pakiet mikrorurek</Name>
+            <Title>pakiet mikrorurek</Title>
+            <Layer type="wfs" user="a.binder"
+                url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+                <FullName>p5_default_db:Rozdzielcza_Pakiet5MikrorurekMagistrala_WSG84</FullName>
+                <Name>Rozdzielcza_Pakiet5MikrorurekMagistrala_WSG84</Name>
+                <Title>R pakiet mikrorurk</Title>
+                <RowCount>-1</RowCount>
+                <Style>
+                    <StrokeColor>#ff956fdf</StrokeColor>
+                    <StrokeWidth>3.0</StrokeWidth>
+                    <FillColor>#5c956fdf</FillColor>
+                </Style>
+            </Layer>
+        </Layer>
+        <Layer type="group" collapsed="1">
+            <FullName>rurociag</FullName>
+            <Name>rurociag</Name>
+            <Title>rurociag</Title>
+            <Layer type="wfs" user="a.binder"
+                url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+                <FullName>p5_default_db:Rozdzielcza_rurociag_wsg84</FullName>
+                <Name>Rozdzielcza_rurociag_wsg84</Name>
+                <Title>R Ruroci&#261;g</Title>
+                <RowCount>-1</RowCount>
+                <Style>
+                    <StrokeColor>#ffbcd880</StrokeColor>
+                    <StrokeWidth>3.0</StrokeWidth>
+                    <FillColor>#5cbcd880</FillColor>
+                </Style>
+            </Layer>
+        </Layer>
+        <Layer type="group" collapsed="1">
+            <FullName>kabel swiatl</FullName>
+            <Name>kabel swiatl</Name>
+            <Title>kabel swiatl</Title>
+            <Layer type="wfs" user="a.binder"
+                url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+                <FullName>p5_default_db:Rozdzielcza_Kabel_Swiatlowodowy_wsg84</FullName>
+                <Name>Rozdzielcza_Kabel_Swiatlowodowy_wsg84</Name>
+                <Title>R kab. &#347;w.</Title>
+                <RowCount>-1</RowCount>
+                <Style>
+                    <StrokeColor>#ffdb7a4c</StrokeColor>
+                    <StrokeWidth>3.0</StrokeWidth>
+                    <FillColor>#5cdb7a4c</FillColor>
+                </Style>
+            </Layer>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:Rozdzielcza_Kabel_swiatl_obcy</FullName>
+            <Name>Rozdzielcza_Kabel_swiatl_obcy</Name>
+            <Title>R Kabel &#347;w. obcy</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff637049</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c637049</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:Rozdzielcza_Kabel_swiatl_we_wtornej</FullName>
+            <Name>Rozdzielcza_Kabel_swiatl_we_wtornej</Name>
+            <Title>R Kabel &#347;w.we wt&#243;rn.</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff3c108f</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c3c108f</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:WIZJE_TRASY_KABLOWE</FullName>
+            <Name>WIZJE_TRASY_KABLOWE</Name>
+            <Title>inw. trasy kablowe</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff34dde4</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c34dde4</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:rurociagi_obce_wsg84</FullName>
+            <Name>rurociagi_obce_wsg84</Name>
+            <Title>rurociagi_obce_wsg84</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ffed8826</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5ced8826</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:Rozdzielcza_rura_oslonowa_magistralna</FullName>
+            <Name>Rozdzielcza_rura_oslonowa_magistralna</Name>
+            <Title>R rura os&#322;.</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff3b1f0e</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c3b1f0e</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:WORKER_GPS_LOG</FullName>
+            <Name>WORKER_GPS_LOG</Name>
+            <Title>aut. rej. prac.</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff27dd60</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c27dd60</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:WORKER_GPS_LOG_current_view</FullName>
+            <Name>WORKER_GPS_LOG_current_view</Name>
+            <Title>pozycje gps prac.</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ffb9e38b</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5cb9e38b</FillColor>
+            </Style>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db" visible="0">
+            <FullName>p5_default_db:USERS2_MARKETING_OVERWIEV_REWIR</FullName>
+            <Name>USERS2_MARKETING_OVERWIEV_REWIR</Name>
+            <Title>Marketing podgl&#261;d re...</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff39d2aa</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c39d2aa</FillColor>
+            </Style>
+        </Layer>
+    </Layer>
+    <Layer type="group" collapsed="1">
+        <FullName>klienci</FullName>
+        <Name>klienci</Name>
+        <Title>klienci</Title>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:BADANIA_W_TERENIE</FullName>
+            <Name>BADANIA_W_TERENIE</Name>
+            <Title>badania ter.</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff335f80</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c335f80</FillColor>
+            </Style>
+            <Filter>
+                <ogc:Filter>
+                    <ogc:PropertyIsEqualTo>
+                        <ogc:PropertyName>A_STATUS</ogc:PropertyName>
+                        <ogc:Literal>NORMAL</ogc:Literal>
+                    </ogc:PropertyIsEqualTo>
+                </ogc:Filter>
+            </Filter>
+        </Layer>
+        <Layer type="wfs" user="a.binder"
+            url="https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db">
+            <FullName>p5_default_db:USERS2_MARKETING</FullName>
+            <Name>USERS2_MARKETING</Name>
+            <Title>Marketing</Title>
+            <RowCount>-1</RowCount>
+            <Style>
+                <StrokeColor>#ff04bfa1</StrokeColor>
+                <StrokeWidth>3.0</StrokeWidth>
+                <FillColor>#5c04bfa1</FillColor>
+            </Style>
+            <BBOX>18.434175001656183, 54.2579736048377, 18.448358522926934,
+                54.265556107129896</BBOX>
+        </Layer>
+    </Layer>
+    <Layer type="group">
+        <FullName>podklady</FullName>
+        <Name>podklady</Name>
+        <Title>podklady</Title>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady">
+            <FullName>5142_babidol_po_rozbiciu_richline_lin</FullName>
+            <Name>5142_babidol_po_rozbiciu_richline_lin</Name>
+            <Title>5142_babidol_po_rozbiciu_richline_lin</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady">
+            <FullName>MDCI_Otomin_hotspot_lin</FullName>
+            <Name>MDCI_Otomin_hotspot_lin</Name>
+            <Title>MDCI_Otomin_hotspot_lin</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+    </Layer>
+    <Layer type="group">
+        <FullName>Grupa 2</FullName>
+        <Name>Grupa 2</Name>
+        <Title>Grupa 2</Title>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/rastry">
+            <FullName>Babidol</FullName>
+            <Name>Babidol</Name>
+            <Title>Babidol</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>Gdansk_Ujescisko_Plocka_Premium1_parter</FullName>
+            <Name>Gdansk_Ujescisko_Plocka_Premium1_parter</Name>
+            <Title>Gdansk_Ujescisko_Plocka_Premium1_parter</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>Gdansk_Quando_Kolodzieja</FullName>
+            <Name>Gdansk_Quando_Kolodzieja</Name>
+            <Title>Gdansk_Quando_Kolodzieja</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>Gdansk_nowawiezycka_PB</FullName>
+            <Name>Gdansk_nowawiezycka_PB</Name>
+            <Title>Gdansk_nowawiezycka_PB</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>sw_ducha_68_rurociagi_parter</FullName>
+            <Name>sw_ducha_68_rurociagi_parter</Name>
+            <Title>sw_ducha_68_rurociagi_parter</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>sw_ducha_68_rurociagi_piwnica</FullName>
+            <Name>sw_ducha_68_rurociagi_piwnica</Name>
+            <Title>sw_ducha_68_rurociagi_piwnica</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/podklady_plany_budynkow">
+            <FullName>Sw_Ducha_rzut_parter_lin</FullName>
+            <Name>Sw_Ducha_rzut_parter_lin</Name>
+            <Title>Sw_Ducha_rzut_parter_lin</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+        <Layer type="wms" url="https://biuro.biall-net.pl/wms/rastry">
+            <FullName>Otomin</FullName>
+            <Name>Otomin</Name>
+            <Title>Otomin</Title>
+            <CRS>EPSG:2177</CRS>
+        </Layer>
+    </Layer>
+</Layers>

+ 69 - 0
SE/schema/WPS_Functions/default_db/qgis_make_user_style/warstwy.xsd

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:ogc="http://www.opengis.net/ogc"
+           xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+           xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+           elementFormDefault="qualified">
+   <xs:import namespace="http://www.opengis.net/ogc" schemaLocation="ogc.xsd"/>
+   <xs:element name="Layers" id="___d5e117261-1_Layers">
+      <xs:complexType id="___d5e117262-1">
+         <xs:sequence id="___d5e117263-1">
+            <xs:element maxOccurs="unbounded" ref="Layer" id="___d5e117264-1"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+   <xs:element name="Layer" id="___d5e117265-1_Layer">
+      <xs:complexType id="___d5e117266-1">
+         <xs:sequence id="___d5e117267-1">
+            <xs:choice minOccurs="0" maxOccurs="unbounded" id="___d5e117268-1">
+               <xs:element ref="Layer" id="___d5e117269-1"/>
+               <xs:element ref="FullName" id="___d5e117270-1"/>
+               <xs:element ref="Name" id="___d5e117271-1"/>
+               <xs:element ref="Title" id="___d5e117272-1"/>
+            </xs:choice>
+            <xs:element minOccurs="0" ref="CRS" id="___d5e117273-1"/>
+            <xs:sequence minOccurs="0" id="___d5e117274-1">
+               <xs:element ref="RowCount" id="___d5e117275-1"/>
+               <xs:element ref="Style" id="___d5e117276-1"/>
+            </xs:sequence>
+            <xs:choice minOccurs="0" id="___d5e117277-1">
+               <xs:element ref="BBOX" id="___d5e117278-1"/>
+               <xs:element ref="Filter" id="___d5e117279-1"/>
+            </xs:choice>
+         </xs:sequence>
+         <xs:attribute name="collapsed" type="xs:integer" id="___d5e117280-1_collapsed"/>
+         <xs:attribute name="type"
+                       use="required"
+                       type="xs:NCName"
+                       id="___d5e117281-1_type"/>
+         <xs:attribute name="url" type="xs:anyURI" id="___d5e117282-1_url"/>
+         <xs:attribute name="user" type="xs:NCName" id="___d5e117283-1_user"/>
+         <xs:attribute name="visible" type="xs:integer" id="___d5e117284-1_visible"/>
+      </xs:complexType>
+   </xs:element>
+   <xs:element name="FullName" type="xs:string" id="___d5e117285-1_FullName"/>
+   <xs:element name="Name" type="xs:string" id="___d5e117286-1_Name"/>
+   <xs:element name="Title" type="xs:string" id="___d5e117287-1_Title"/>
+   <xs:element name="CRS" type="xs:NMTOKEN" id="___d5e117288-1_CRS"/>
+   <xs:element name="RowCount" type="xs:integer" id="___d5e117289-1_RowCount"/>
+   <xs:element name="Style" id="___d5e117290-1_Style">
+      <xs:complexType id="___d5e117291-1">
+         <xs:sequence id="___d5e117292-1">
+            <xs:element ref="StrokeColor" id="___d5e117293-1"/>
+            <xs:element ref="StrokeWidth" id="___d5e117294-1"/>
+            <xs:element ref="FillColor" id="___d5e117295-1"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+   <xs:element name="StrokeColor" type="xs:string" id="___d5e117296-1_StrokeColo"/>
+   <xs:element name="StrokeWidth" type="xs:decimal" id="___d5e117297-1_StrokeWidt"/>
+   <xs:element name="FillColor" type="xs:string" id="___d5e117299-1_FillColor"/>
+   <xs:element name="BBOX" type="xs:string" id="___d5e117300-1_BBOX"/>
+   <xs:element name="Filter" id="___d5e117301-1_Filter">
+      <xs:complexType id="___d5e117302-1">
+         <xs:sequence id="___d5e117303-1">
+            <xs:element ref="ogc:Filter" id="___d5e117304-1"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+</xs:schema>

+ 18 - 0
SE/schema/WPS_Functions/get_wfs/build.get_wfs.OBSOLETE-FIXME.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." 
+    xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
+    name="get_wfs.SYSTEM" > <!-- default="INSTALL.bgwrx.INSTALL" -->
+    
+    <include file="../build.WPS_Functions.SYSTEM.xml"/>
+    <!--<include file="../../default_db_xml_cache.public/build.system_cache__appinfo.public.PRODUCT.xml"/>-->
+    <!--<include file="build.bgwrx.INSTALL.xml" as="INSTALL"/>-->
+    
+    <property name="get_wfs_basedir" location="${get_wfs.basedir}"/><!-- to ordinary retrieve wfs data  -->
+    <property name="get_wfs_basedir.temp" location="${get_wfs.temp}"/>
+    <property name="get_wfs" location="${get_wfs.basedir}"/><!-- to ordinary retrieve wfs data  -->
+    
+    <property name="build_get_wfs.childproperties" location="${get_wfs.childproperties}"/>
+    
+    
+    
+</project>

+ 42 - 0
SE/schema/WPS_Functions/get_wfs/build.get_wfs.PRODUCT.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." 
+    xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
+    name="get_wfs.PRODUCT" > <!-- default="INSTALL.bgwrx.INSTALL" -->
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml" />
+    <!--<include file="../../default_db_xml_cache.public/build.system_cache__appinfo.public.PRODUCT.xml"/>-->
+    <!--<include file="build.bgwrx.INSTALL.xml" as="INSTALL"/>-->
+    
+    <condition property="get_wfs.PRODUCT.ifdef.parent" taskname="get_wfs.parent.PRODUCT.ifdef">
+        <isset property="WPS_Functions.PRODUCT.name"/>
+    </condition>
+    
+   
+    <property name="get_wfs.PRODUCT.name" value="${WPS_Functions.PRODUCT.name}.get_wfs"/>
+    <property name="get_wfs.PRODUCT.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}.get_wfs"/>
+    
+    <property name="get_wfs.basedir"     value="${WPS_Functions.basedir}/get_wfs"/>
+    <property name="get_wfs.build" location="${get_wfs.basedir}/build_get_wfs.xml"/>
+    <!--<property name="bgwrx.repository"  value="${p5dg.basedir}/repository"/>-->
+
+    <property name="get_wfs.temp" location="${get_wfs.basedir}/temp"/>
+    
+    <property name="get_wfs.childproperties" location="${WPS_Functions.childproperties}/.build_get_wfs.properties"/>
+    
+    <!--<property name="get_wfs.xsl" value="${system_cache__appinfo.public.basedir}/get_wfs_recurse_xsl.xsl"/>-->
+    
+    <!--<property name="bgwrx.RelatedFeatureRoot.xsl" value="${bgwrx.basedir}/bgwrx.RelatedFeatureRoot.xsl"/>-->
+    
+    <!--<property name="p5suis.pid" location="${p5suis.repository}/p5suis.speech.pid"/>-->
+    
+   <!-- 
+    <property name="p5dg.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${p5dg.PRODUCT.name}.log"/>
+    <property name="p5dg.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${p5dg.PRODUCT.name}.log"/>
+    -->
+    
+    
+    <target name="get_wfs.parent.PRODUCT.ifdef" unless="WPS_Functions.PRODUCT.ifdef.parent">
+        <fail>There is not set correct parent PRODUCT from expected file="../build.WPS_Functions.PRODUCT.xml" </fail>
+    </target>
+    
+</project>

+ 13 - 0
SE/schema/WPS_Functions/get_wfs/build.get_wfs.SYSTEM.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." 
+    xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
+    name="get_wfs.SYSTEM" > <!-- default="INSTALL.bgwrx.INSTALL" -->
+    
+    <include file="../build.WPS_Functions.SYSTEM.xml"/>
+    <!--<include file="../../default_db_xml_cache.public/build.system_cache__appinfo.public.PRODUCT.xml"/>-->
+    <!--<include file="build.bgwrx.INSTALL.xml" as="INSTALL"/>-->
+    
+    
+    
+    
+</project>

+ 28 - 26
SE/schema/WPS_Functions/get_wfs/build_get_wfs.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns:ogc="http://www.opengis.net/ogc" 
+    xmlns:get_wfs="http://biuro.biall-net.pl/WPS_Functions/get_wfs/get_wfs.xsd"
     basedir="../../." name="get_wfs" default="http_first_input">
   <description>
     Based on ant-url-action module to ordinary retrieve feature from WMF
@@ -18,28 +19,30 @@
         <property name="DwebRootUrl" value="${$webRootUrl}"/> - this is the place where script is localized to easyli to target user GUI by href to generated output
     />
     -->
+    <include file="build.get_wfs.PRODUCT.xml" as="PRODUCT"/>
+    <include file="build.get_wfs.SYSTEM.xml" as="SYSTEM"/>
+    <include file="build.get_wfs.OBSOLETE-FIXME.xml" as="OBSOLETE-FIXME"/>
     <!-- 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"/>
+    
+   <!-- <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="${WPS_Functions.build}.properties"/>-->
     <!-- eof modules WPS_Functions  -->
     
     <!-- module local properties -->
-    <property name="get_wfs_basedir" location="${basedir}/WPS_Functions/get_wfs"/><!-- to ordinary retrieve wfs data  -->
-    <property name="get_wfs_basedir.temp" location="${get_wfs_basedir}/temp"/>
-    <property name="get_wfs" location="${get_wfs_basedir}/build_get_wfs.xml"/><!-- to ordinary retrieve wfs data  -->
-    
-    <property name="build_get_wfs.childproperties" location="${WPS_Functions.childproperties}/build_get_wfs.properties"/>
+  
+    <condition property="uuid" value="${uuid}">
+        <isset property="uuid"/>
+    </condition>
+    <!--<property name="uuid" value="${uuid}"/>-->
     
-    <property name="uuid" value="${uuid}"/>
-    
-    <property name="wfs_output.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_output.xml"/>
-    <property name="wfs_result.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_result.xml"/>
-    <property name="wfs_error.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_error.xml"/>
-    <property name="wfs_timestamp.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_timestamp.xml"/>
+    <property name="wfs_output.xml" location="${get_wfs.temp}/${uuid}.wfs_output.xml"/>
+    <property name="wfs_result.xml" location="${get_wfs.temp}/${uuid}.wfs_result.xml"/>
+    <property name="wfs_error.xml" location="${get_wfs.temp}/${uuid}.wfs_error.xml"/>
+    <property name="wfs_timestamp.xml" location="${get_wfs.temp}/${uuid}.wfs_timestamp.xml"/>
     
     <!-- for sending xml - param inputs -->
-    <property name="wfs_input.xml" location="${get_wfs_basedir.temp}/${uuid}.wfs_input.xml"/> 
+    <property name="wfs_input.xml" location="${get_wfs.temp}/${uuid}.wfs_input.xml"/> 
     <!-- eof module local properties -->
 
     
@@ -58,7 +61,7 @@
     </target>
 
     <target name="read_build_properties" >
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
         <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
         <echo level="debug">$api_url to ${api_url}  $namespace_prefix ${namespace_prefix} 
             passwordBase64Basic=${passwordBase64Basic}
@@ -66,11 +69,11 @@
     </target>
     
     <target name="clean" description="Clean all output and temp files">
-        <delete dir="${get_wfs_basedir.temp}" failonerror="false"/>
+        <delete dir="${get_wfs.temp}" failonerror="false"/>
     </target>
 
-    <target name="create_tempdir">
-            <mkdir dir="${get_wfs_basedir.temp}"/>
+    <target name="create_tempdir">       
+        <mkdir dir="${get_wfs.temp}"/>
     </target>
 
 
@@ -133,8 +136,8 @@
     <target name="Filter_check" depends="Filter_cond,Filter_fail,Filter_ok"/>
     
     <target name="Filter_ok" unless="${Filter_cond}">
-        <!--<mkdir dir="${get_wfs_basedir.temp}"/>
-        <tempfile destdir="${get_wfs_basedir.temp}" suffix=".xml" prefix="Filter_ok" property="Filter.xml"/>
+        <!--<mkdir dir="${get_wfs.temp}"/>
+        <tempfile destdir="${get_wfs.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: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;"/>
@@ -251,8 +254,7 @@
         <echo>#169 after validated ? not set any?</echo>
     </target>
     
-    
-<target name="GetFeature.WithVerifyUnauthorized" depends="GetFeature"> <!-- GetFeature.VerifyUnauthorized.failed -->
+    <target name="GetFeature.WithVerifyUnauthorized" depends="GetFeature"> <!-- GetFeature.VerifyUnauthorized.failed -->
         <loadfile property="GetFeature.WithVerifyUnauthorized.srcfile" srcfile="${wfs_output.xml}" />
         <condition property="GetFeature.VerifyUnauthorized.condition" taskname="GetFeature.VerifyUnauthorized.failed">
             <contains  string="${GetFeature.WithVerifyUnauthorized.srcfile}" substring="Unauthorized" />
@@ -284,7 +286,7 @@
         <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="read_build_properties,create_tempdir">
-        <tempfile  destdir="${get_wfs_basedir.temp}" prefix="usernameandpass" deleteonexit="yes" property="username_and_pass_from_passwordBase64Basic.properties" />
+        <tempfile  destdir="${get_wfs.temp}" prefix="usernameandpass" deleteonexit="yes" property="username_and_pass_from_passwordBase64Basic.properties" />
         <ant antfile="${build_username_and_pass_from_passwordBase64Basic.xml}" target="username_and_pass_from_passwordBase64Basic.properties"/>
             
         <loadproperties srcfile="${username_and_pass_from_passwordBase64Basic.properties}"/>
@@ -294,8 +296,8 @@
                 $api_url = ${api_url}
         </echo>    
             <!-- retrieve new properties -username , username.pass -->
-        <property name="cookie_file" value="${get_wfs_basedir.temp}/${username}.cookie"/>
-        <!--<property name="cookie_file" value="${get_wfs_basedir.temp}/${username}.cookie"/>-->
+        <property name="cookie_file" value="${get_wfs.temp}/${username}.cookie"/>
+        <!--<property name="cookie_file" value="${get_wfs.temp}/${username}.cookie"/>-->
         <delete file="${cookie_file}" failonerror="no"/>
         <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; -->

+ 20 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/bgwrx.RelatedFeatureRoot.xsl

@@ -0,0 +1,20 @@
+<?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:bgwrx="http://biuro.biall-net.pl/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    
+    <xsl:template match="*" mode="bgwrx:RelatedFeatureRoot">
+        <RelatedFeatureRoot>
+            <xsl:copy-of select="."/>
+        </RelatedFeatureRoot>
+    </xsl:template>
+    
+</xsl:stylesheet>

+ 25 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.INSTALL.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." 
+    xmlns:bgwrx="http://biuro.biall-net.pl/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsd"
+    name="bgwrx.INSTALL">
+    
+    <!--<include file="../build.WPS_Functions.PRODUCT.xml"/>-->
+    <!--<include file="../../default_db_xml_cache.public/build.system_cache__appinfo.PRODUCT.xml"/>-->
+    
+    <include file="build.bgwrx.PRODUCT.xml" />
+    
+    
+    <property name="bgwrx.INSTALL.xsl" value="${bgwrx.basedir}/get_wfs_recurse_xsl.xsl"/>
+    
+    <condition property="bgwrx.INSTALL.xsl.ifdef" taskname="bgwrx.INSTALL.xsl">
+        <not><available file="${bgwrx.xsl}"/></not>
+    </condition>
+   
+    <target name="bgwrx.INSTALL" depends="bgwrx.INSTALL.xsl"/>
+   
+    
+    <target name="bgwrx.INSTALL.xsl" if="bgwrx.INSTALL.xsl.ifdef">
+        <copy file="${bgwrx.INSTALL.xsl}" todir="${system_cache__appinfo.public.basedir}" />
+    </target>
+    
+</project>

+ 22 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.OBSOLETE-FIXME.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../" name="bgwrx.OBSOLETE-FIXME">
+  
+   
+ <!-- To reassign these variables from product and system -->
+  
+    <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_get_wfs_recurse_xsl" value="${bgwrx.build}"/>
+    <property name="build_get_wfs_recurse_xsl_basedir" location="${basedir}/WPS_Functions/${ant.project.name}"  />
+    <property name="build_get_wfs_recurse_xsl_basedir.temp" location="${build_get_wfs_recurse_xsl_basedir}/temp"  />
+    <property name="build_get_wfs_recurse_xsl.childproperties" location="${WPS_Functions.childproperties}/get_wfs_recurse_xsl_basedir.properties"/>
+    
+    <property name="build_get_wfs_recurse_xsl.out.xml" location="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.get_wfs_recurse_xsl.out.xml"/>
+    <property name="out_task.dita.final_with_RelatedFeatureLoop.xml" location="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"/>
+    <property name="build_get_wfs_recurse_xsl.RelatedFeatureRoot.xsl" value="${WPS_Functions}/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.RelatedFeatureRoot.xsl"/>
+    
+  
+</project>

+ 42 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.PRODUCT.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." 
+    xmlns:bgwrx="http://biuro.biall-net.pl/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsd"
+    name="bgwrx.PRODUCT" > <!-- default="INSTALL.bgwrx.INSTALL" -->
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    <include file="../../default_db_xml_cache.public/build.system_cache__appinfo.public.PRODUCT.xml"/>
+    <!--<include file="build.bgwrx.INSTALL.xml" as="INSTALL"/>-->
+    
+    <condition property="bgwrx.PRODUCT.ifdef.parent" taskname="bgwrx.parent.PRODUCT.ifdef">
+        <isset property="WPS_Functions.PRODUCT.name"/>
+    </condition>
+    
+   
+    <property name="bgwrx.PRODUCT.name" value="${WPS_Functions.PRODUCT.name}.get_wfs_recurse_xsl"/>
+    <property name="bgwrx.PRODUCT.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}"/>
+    
+    <property name="bgwrx.basedir"     value="${WPS_Functions.basedir}/get_wfs_recurse_xsl"/>
+    <property name="bgwrx.build" location="${bgwrx.basedir}/build_get_wfs_recurse_xsl.xml"/>
+    <!--<property name="bgwrx.repository"  value="${p5dg.basedir}/repository"/>-->
+
+    <property name="bgwrx.temp" location="${bgwrx.basedir}/temp"/>
+    
+    <property name="bgwrx.childproperties" location="${WPS_Functions.childproperties}/build_get_wfs_recurse_xsl.properties"/>
+    
+    <property name="bgwrx.xsl" value="${system_cache__appinfo.public.basedir}/get_wfs_recurse_xsl.xsl"/>
+    
+    <property name="bgwrx.RelatedFeatureRoot.xsl" value="${bgwrx.basedir}/bgwrx.RelatedFeatureRoot.xsl"/>
+    
+    <!--<property name="p5suis.pid" location="${p5suis.repository}/p5suis.speech.pid"/>-->
+    
+   <!-- 
+    <property name="p5dg.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${p5dg.PRODUCT.name}.log"/>
+    <property name="p5dg.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${p5dg.PRODUCT.name}.log"/>
+    -->
+    
+    
+    <target name="bgwrx.parent.PRODUCT.ifdef" unless="WPS_Functions.PRODUCT.ifdef.parent">
+        <fail>There is not set correct parent PRODUCT from expected file="../build.WPS_Functions.PRODUCT.xml" </fail>
+    </target>
+    
+</project>

+ 14 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build.bgwrx.SYSTEM.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../" name="bgwrx.SYSTEM" > <!-- default="bgwrx.SYSTEM.INIT" -->
+  
+   
+    <include file="../build.WPS_Functions.SYSTEM.xml" optional="true"/>
+    <include file="build.bgwrx.PRODUCT.xml" optional="true" as="PRODUCT"/>
+    
+   
+    <property name="bgwrx.SYSTEM.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${bgwrx.PRODUCT.name}.log"/>
+    <property name="bgwrx.SYSTEM.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${bgwrx.PRODUCT.name}.log"/>
+    
+    
+  
+</project>

+ 117 - 40
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml

@@ -6,20 +6,18 @@
     
     <description> To test file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db_xml_cache.public/get_wfs_recurse_xsl.xsl</description>
     
-    <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"/>
-    
-    <property name="build_get_wfs_recurse_xsl" value="${WPS_Functions}/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml"/>
-    <property name="build_get_wfs_recurse_xsl_basedir" location="${basedir}/WPS_Functions/${ant.project.name}"  />
-    <property name="build_get_wfs_recurse_xsl_basedir.temp" location="${build_get_wfs_recurse_xsl_basedir}/temp"  />
-    <property name="build_get_wfs_recurse_xsl.childproperties" location="${WPS_Functions.childproperties}/get_wfs_recurse_xsl_basedir.properties"/>
+    <tstamp>
+        <!--<format property="bgwrx.last.minute" pattern="MM/dd/yyyy hh:mm a"  offset="-2" unit="minute"/>-->
+        <format property="bgwrx.current.timestamp" pattern="yyyy-dd-MM-hh:mm-a"  />
+    </tstamp>
     
+    <include file="build.bgwrx.PRODUCT.xml" as="PRODUCT"/>
+    <include file="build.bgwrx.SYSTEM.xml" as="SYSTEM"/>
+    <include file="build.bgwrx.OBSOLETE-FIXME.xml" as="OBSOLETE-FIXME"/>
+    <include file="build.bgwrx.INSTALL.xml" as="INSTALL"/>
     
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
     <!--<property name="build_get_wfs_recurse_xsl.xsl" location="${default_db_xml_cache.public}/get_wfs_recurse_xsl.xsl"/>-->
-    <property name="build_get_wfs_recurse_xsl.out.xml" location="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.get_wfs_recurse_xsl.out.xml"/>
-    <property name="out_task.dita.final_with_RelatedFeatureLoop.xml" location="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml"/>
-    <property name="build_get_wfs_recurse_xsl.RelatedFeatureRoot.xsl" value="${WPS_Functions}/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.RelatedFeatureRoot.xsl"/>
     
     <!--<property name="CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml" value="${transformed.local}/CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml"/>-->
     
@@ -29,28 +27,32 @@
     <property name="xpath" value="${xpath}"/>
     <property name="xpath_value" value="${xpath_value}" />-->
     
+    <target name="INIT" depends="INSTALL.bgwrx.INSTALL"/>
     
     <target name="clean" description="Clean all output and temp files">
-        <delete dir="${build_get_wfs_recurse_xsl_basedir.temp}" failonerror="false"/>
+        <delete dir="${bgwrx.temp}" failonerror="false"/>
     </target>
     
     <target name="build_get_wfs_recurse_xsl.create_tempdir">       
-        <mkdir dir="${build_get_wfs_recurse_xsl_basedir.temp}"/>
+        <mkdir dir="${bgwrx.temp}"/>
     </target>
     
     <target name="read_build_properties">
         <!--<ant antfile="${root_build.xml}" target="save_build_properties.xml"/>-->
         <!--<ant antfile="${root_build.xml}" target="read_build_properties.xml"/>-->
         <!--<loadproperties srcfile="${build_properties.xml}"  />-->
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <echo>We try to refresh ${default_db.xml} or ${detect_objects_parent_relations.xsl}</echo>
     </target>
     
     <target name="write_child_props_to_config_dir" depends="read_build_properties">
-        <echoproperties destfile="${build_get_wfs_recurse_xsl.childproperties}"/>
+        <echoproperties destfile="${bgwrx.childproperties}"/>
     </target>    
     
+    
+    
+    
     <target name="xml_recursed_from_tr_map" depends="read_build_properties,build_get_wfs_recurse_xsl.create_tempdir">
         <property name="uuid.local" value="${uuid}" />
         <property name="typeName.local" value="${typeName}"/>
@@ -58,7 +60,7 @@
         <property name="xpath_value.local" value="${xpath_value}"/>
         <property name="build_get_wfs_recurse_xsl.out.xml.local" value="${build_get_wfs_recurse_xsl.out.xml}"/>
         <!--<ant antfile="${build_usnername_and_pass_from_passwordBase64Basic.xml}" target="usnername_and_pass_from_passwordBase64Basic"/>-->
-        <tempfile property="php_session_id_check.properties" destdir="${build_get_wfs_recurse_xsl_basedir.temp}" prefix="php_session_id_check.properties"/>
+        <tempfile property="php_session_id_check.properties" destdir="${bgwrx.temp}" prefix="php_session_id_check.properties" deleteonexit="yes"/>
         <ant antfile="${get_wfs}" target="php_session_id_check.properties" inheritall="yes">
            <!--<property name="php_session_id_ok.string" value="${php_session_id_ok.string}"/>
             <property name="username.pass" value="${username.pass}"/>
@@ -73,16 +75,21 @@
             $xpath_value=${xpath_value.local}
             $xpath=${xpath.local}
             $username = ${username}
-            $username.pass = ${username.pass}
+            $username.pass = *****
             php_session_id_ok.string = ${php_session_id_ok.string} 
         </echo>
         
-        <exec executable="say"  spawn="true" failifexecutionfails="false">
+        <!--<exec executable="say"  spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="Building object from API by Simple Schema for searched: name ${typeName.local} xpath ${xpath.local} value ${xpath_value.local} "/>
-        </exec>
+        </exec>-->
+       <!-- DEBUG <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="Building object from API by Simple Schema for searched: p5:object ${typeName.local} xpath ${xpath.local} value ${xpath_value.local} " />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        -->
         
-        <xslt basedir="${default_db:recurse_ant_basedir}" style="${get_wfs_recurse_xsl.xsl}" in="${empty.xml}"  destdir="${build_get_wfs_recurse_xsl_basedir.temp}" out="${build_get_wfs_recurse_xsl.out.xml.local}" force="yes" > <!-- out_task.dita.final -->
+        <xslt basedir="${bgwrx.basedir}" style="${bgwrx.xsl}" in="${empty.xml}"  destdir="${bgwrx.temp}" out="${build_get_wfs_recurse_xsl.out.xml.local}" force="yes" > <!-- 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/initialTemplate" value="main"/>
@@ -98,7 +105,7 @@
             <param name="xpath" expression="${xpath.local}"/>
             <param name="php_session_id_ok.string" expression="${php_session_id_ok.string}"/>
             <!--<param name="basedir" expression="${basedir}"/>-->
-            <param name="temp" expression="${temp}"/>
+            <param name="temp" expression="${bgwrx.temp}"/>
             <param name="simpleSchema_dir" expression="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/simpleSchema/"/>
         </xslt>
         
@@ -112,11 +119,17 @@
     
     
     <target name="out_task.dita.final_with_RelatedFeatureLoop.xml" description="to add RelatedFeatureRoot to allow be parsable by CRM_Process_tree etc">
-        <exec executable="say"  spawn="true" failifexecutionfails="false">
+        <!--<exec executable="say"  spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="Copying to recurse ant temp and executing ditamap creation by build_CRM_PROCES_tree target PROCES INIT TREE DITA "/>
-        </exec>
-        <xslt basedir="${default_db:recurse_ant_basedir}" style="${build_get_wfs_recurse_xsl.RelatedFeatureRoot.xsl}" in="${build_get_wfs_recurse_xsl.out.xml.local}"  destdir="${build_get_wfs_recurse_xsl_basedir.temp}" out="${out_task.dita.final_with_RelatedFeatureLoop.xml}" force="yes" > <!-- out_task.dita.final -->
+        </exec>-->
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="Copying to recurse ant temp and executing ditamap creation by build_CRM_PROCES_tree target PROCES INIT TREE DITA " />
+        </ant>
+        <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+        
+        
+        <xslt basedir="${bgwrx.basedir}" style="${bgwrx.RelatedFeatureRoot.xsl}" in="${build_get_wfs_recurse_xsl.out.xml.local}"  destdir="${bgwrx.temp}" out="${out_task.dita.final_with_RelatedFeatureLoop.xml}" force="yes" > <!-- 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="{http://biuro.biall-net.pl/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsd}RelatedFeatureRoot"/>
@@ -141,13 +154,19 @@
         <input addproperty="resolveDepth.local" defaultvalue="${resolveDepth}"/>
         <input addproperty="build_get_wfs_recurse_xsl.out.xml.local" defaultvalue="${build_get_wfs_recurse_xsl.out.xml}"/>
         <input addproperty="p5:links.recurse_level.limit.local" defaultvalue="${p5:links.recurse_level.limit}"/>
+        <input addproperty="p5:links.next.recurse_level.limit.local" defaultvalue="${p5:links.next.recurse_level.limit.local}"/>
         <!--<ant antfile="${build_usnername_and_pass_from_passwordBase64Basic.xml}" target="usnername_and_pass_from_passwordBase64Basic"/>-->
-        <tempfile property="php_session_id_check.properties" destdir="${build_get_wfs_recurse_xsl_basedir.temp}" prefix="php_session_id_check.properties"/>
+        <tempfile property="php_session_id_check.properties" destdir="${bgwrx.temp}" prefix="php_session_id_check.properties"/>
         
-        <exec executable="say"  spawn="true" failifexecutionfails="false">
+        <!--<exec executable="say"  spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
-            <arg line="Retrieving structurized object from API for searched: name ${typeName.local} xpath ${xpath.local} value ${xpath_value.local} "/>
-        </exec>
+            <arg line="Retrieving structurized object from API for searched: p5:object ${typeName.local} xpath ${xpath.local} value ${xpath_value.local} "/>
+        </exec>-->
+        
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="Retrieving structurized object from API for searched: p5:object ${typeName.local} xpath ${xpath.local} value ${xpath_value.local} " />
+        </ant>
+        <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
         
         <ant antfile="${get_wfs}" target="php_session_id_check.properties" inheritall="yes">
             <!--<property name="php_session_id_ok.string" value="${php_session_id_ok.string}"/>
@@ -165,12 +184,12 @@
             $xpath_value=${xpath_value.local}
             $xpath=${xpath.local}
             $username = ${username}
-            $username.pass = ${username.pass}
+            $username.pass = *******
             php_session_id_ok.string = ${php_session_id_ok.string} 
             $p5:links.recurse_level.limit.local = ${p5:links.recurse_level.limit.local}
             
         </echo>
-        <xslt basedir="${default_db:recurse_ant_basedir}" style="${get_wfs_recurse_xsl.xsl}" in="${empty.xml}"  destdir="${build_get_wfs_recurse_xsl_basedir.temp}" out="${build_get_wfs_recurse_xsl.out.xml.local}" force="yes" > <!-- out_task.dita.final -->
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="${get_wfs_recurse_xsl.xsl}" in="${empty.xml}"  destdir="${bgwrx.temp}" out="${build_get_wfs_recurse_xsl.out.xml.local}" force="yes" > <!-- 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/initialTemplate" value="main"/>
@@ -187,11 +206,12 @@
             <param name="xpath" expression="${xpath.local}"/>
             <param name="php_session_id_ok.string" expression="${php_session_id_ok.string}"/>
             <!--<param name="basedir" expression="${basedir}"/>-->
-            <param name="temp" expression="${temp}"/>
+            <param name="temp" expression="${bgwrx.temp}"/>
             <param name="simpleSchema_dir" expression="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/simpleSchema/"/>
             <param name="api_recurse" expression="true"/>
             <param name="resolveDepth" expression="${resolveDepth.local}"/>
             <param name="{https://biuro.biall-net.pl/wfs}links.recurse_level.limit" expression="${p5:links.recurse_level.limit.local}"/>
+            <param name="{https://biuro.biall-net.pl/wfs}links.recurse_level.limit" expression="${p5:links.recurse_level.limit.local}"/>
         </xslt>
         
         <exec executable="say"  spawn="true" failifexecutionfails="false">
@@ -201,18 +221,20 @@
         
     </target>
     
-    <!--not working !<target name="build_get_wfs_recurse_xsl.out.xml.local" description="to set variable build_get_wfs_recurse_xsl.out.xml.local to format ${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml">
+    <!--not working !<target name="build_get_wfs_recurse_xsl.out.xml.local" description="to set variable build_get_wfs_recurse_xsl.out.xml.local to format ${bgwrx.temp}/${uuid}.out_task.dita.final_with_RelatedFeatureLoop.xml">
         <input addproperty="uuid.local" defaultvalue="${uuid}"/>
-        <property name="build_get_wfs_recurse_xsl.out.xml.local" value="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid.local}.get_wfs_recurse_xsl.out.xml"/>
+        <property name="build_get_wfs_recurse_xsl.out.xml.local" value="${bgwrx.temp}/${uuid.local}.get_wfs_recurse_xsl.out.xml"/>
     </target>-->
     
-    <target name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.55.get_wfs_recurse_xsl.xml.api_recurse" depends="read_build_properties,build_get_wfs_recurse_xsl.create_tempdir">
+    <target name="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.6.get_wfs_recurse_xsl.xml.api_recurse" depends="read_build_properties,build_get_wfs_recurse_xsl.create_tempdir">
         <property name="typeName" value="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA"/>
-        <property name="uuid" value="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.55.api_recurse"/>
+        <property name="uuid" value="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA.6.api_recurse.looptest"/>
         <property name="xpath" value="ID"/>
-        <property name="xpath_value" value="55"/>
-        <property name="resolveDepth" value="3"/>
-        <property name="p5:links.recurse_level.limit" value="3"/>
+        <property name="xpath_value" value="6"/>
+        <property name="resolveDepth" value="1"/>
+        <property name="p5:links.recurse_level.limit" value="8"/>
+        <property name="p5:links.next.recurse_level.limit" value="20"/>
+        
         <!--<antcall target="build_get_wfs_recurse_xsl.out.xml.local" inheritall="true">
             <param name="uuid.local" value="${uuid}"/>
         </antcall>-->
@@ -224,8 +246,9 @@
             <param name="xpath.local" value="ID"/>
             <param name="xpath_value.local" value="${xpath_value}"/>
             <param name="resolveDepth.local" value="${resolveDepth}"/>
-            <param name="build_get_wfs_recurse_xsl.out.xml.local" value="${build_get_wfs_recurse_xsl_basedir.temp}/${uuid}.get_wfs_recurse_xsl.out.xml"/>
+            <param name="build_get_wfs_recurse_xsl.out.xml.local" value="${bgwrx.temp}/${uuid}.get_wfs_recurse_xsl.out.xml"/>
             <param name="p5:links.recurse_level.limit.local" value="${p5:links.recurse_level.limit}"/>
+            <param name="p5:links.next.recurse_level.limit.local" value="${p5:links.next.recurse_level.limit}"/>
             <!--<param name="build_get_wfs_recurse_xsl.out.xml.local" value="${CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml}.api_recurse.xml"/>-->
         </antcall> 
     </target>
@@ -261,4 +284,58 @@
         </antcall> 
     </target>
 
+
+
+    <target name="bgwrx:check_if_file_older_than_minutes_and_call_action" description="To call action if target not exists or is older than x minutes">
+        <input addproperty="bgwrx.check_if_file_older.max_minutes" message="type maximum minutes that file should be treated as OK"/>
+        <input addproperty="bgwrx.check_if_file_older.call_action" message="Wchich local action should we call if file is older or not exists"/>
+        <input addproperty="bgwrx.check_if_file_older.file_to_check" message="Wchich file should be checked against max minutes"/>
+        
+        <tstamp>
+            <format property="bgwrx.last.minute" pattern="MM/dd/yyyy hh:mm a"  offset="-${bgwrx.check_if_file_older.max_minutes}" unit="minute"/>
+            <format property="bgwrx.current.timestamp" pattern="yyyy-dd-MM-hh:mm-a"  />
+        </tstamp>
+        
+        <echo>#291 creating file with bgwrx.last.minute = ${bgwrx.last.minute}</echo>
+        <tempfile property="bgwrx.read.info.about.file.changes.current.timestamp" deleteonexit="yes" destdir="${bgwrx.temp}" prefix="bgwrx.read.info.about.file.changes.current.timestamp" suffix=".touch"/>
+        <touch file="${bgwrx.read.info.about.file.changes.current.timestamp}" datetime="${bgwrx.last.minute}" verbose="true"/>
+        <uptodate property="bgwrx:write_pid.delete_old_stuck.cond"  targetfile="${bgwrx.read.info.about.file.changes.current.timestamp}" >
+            <srcfiles file="${bgwrx.check_if_file_older.file_to_check}"/>
+        </uptodate>
+        <antcall target="bgwrx:check_if_file_older_than_minutes_and_call_action.ok"/>
+        <antcall target="bgwrx:check_if_file_older_than_minutes_and_call_action.fail"/>
+        
+    </target>
+    
+    <target name="bgwrx:check_if_file_older_than_minutes_and_call_action.ok" if="${bgwrx:write_pid.delete_old_stuck.cond}" description="when ${bgwrx.check_if_file_older.file_to_check} is not older than ${bgwrx.check_if_file_older.max_minutes} than we not call ${bgwrx.check_if_file_older.call_action} ">
+        <echo> file ${bgwrx.check_if_file_older.file_to_check} is not older than ${bgwrx.check_if_file_older.max_minutes} minutes - we will NOT call ${bgwrx.check_if_file_older.call_action}</echo>
+    </target>
+    
+    <target name="bgwrx:check_if_file_older_than_minutes_and_call_action.fail" unless="${bgwrx:write_pid.delete_old_stuck.cond}" description="when ${bgwrx.check_if_file_older.file_to_check} is older than ${bgwrx.check_if_file_older.max_minutes} than we call ${bgwrx.check_if_file_older.call_action} ">
+        <echo> file ${bgwrx.check_if_file_older.file_to_check} is older than ${bgwrx.check_if_file_older.max_minutes} minutes - we will call ${bgwrx.check_if_file_older.call_action}</echo>
+        <file.mdate
+            file="${bgwrx.check_if_file_older.file_to_check}"
+            property="file.modified.date"/>
+        <echo>The file "${bgwrx.check_if_file_older.file_to_check}" was modified on ${file.modified.date}</echo>
+
+        <antcall target="${bgwrx.check_if_file_older.call_action}"/>
+    </target>
+
+
+    <scriptdef name="file.mdate" language="javascript"> 
+        <attribute name="file"/> 
+        <attribute name="property"/> 
+        file_name = attributes.get("file"); 
+        property_to_set = attributes.get("property");
+        
+        file = new java.io.File(file_name); 
+        file_date = file.lastModified();
+        
+        date_format = new java.text.SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss zzz");
+        formated_date = date_format.format(new java.util.Date(file_date));
+        project.setNewProperty(property_to_set, formated_date);
+    </scriptdef> 
+    
+    
+
 </project>

+ 360 - 64
SE/schema/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsl

@@ -55,9 +55,10 @@
     <xsl:param name="ignore_maxOccurs_0" select="'1'"/>
     
     <xsl:param name="api_recurse"/> <!-- to use api resolveDepth -->
-    <xsl:param name="resolveDepth" select="10"/>
-    <xsl:param name="p5:links.recurse_level.limit" select="5"/>
-    
+    <xsl:param name="resolveDepth" select="5"/>
+    <xsl:param name="p5:links.recurse_level.limit" select="8"/>
+    <xsl:param name="p5:links.next.recurse_level.limit" select="10"/>
+    <xsl:param name="p5:links.loop.context.nodes.min.distance" select="4"/> <!-- when detected in @xlink or @next   <get_wfs_recurse_xsl:context.nodes//@fid , we calculate when it is to be treated as loop, if above $p5:links.recurse_level.limit - to be optimized   -->
     
     
     
@@ -85,7 +86,7 @@
                 <xsl:otherwise><xsl:value-of select="concat($simpleSchema_dir,'/',$targetNamespace_DEFAULTS_prefix,'/',$featureID_name_dita,'.xml')"/></xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
-        <xsl:message>#57 get_wfs_recurse_xsl:GetsimpleSchema: from $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>; <xsl:value-of select="$simpleSchemaFile"/></xsl:message>
+        <xsl:message>#57 get_wfs_recurse_xsl:GetsimpleSchema: from $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>; <xsl:value-of select="$simpleSchemaFile"/>  for featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>;</xsl:message>
         
         
         <xsl:if test="not( substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':'))">
@@ -156,6 +157,43 @@
     </xsl:template>
     
     
+    
+    
+    <xsl:template match="*" mode="get_wfs_recurse_xsl:context.nodes">
+        <xsl:for-each select=".//*[@fid]">
+            <get_wfs_recurse_xsl:nodes fid="{@fid}" root.distance="{count( ancestor::node())}"/>
+        </xsl:for-each>
+    </xsl:template>
+    
+    
+    <xsl:function name="get_wfs_recurse_xsl:context.PRIMARYKEY.merge">
+        <xsl:param name="get_wfs_recurse_xsl:PRIMARYKEY.nodes"/>
+        <xsl:param name="p5:fid"/>
+        <xsl:choose>
+            <xsl:when test=" string-length($p5:fid) &gt;0">
+                <get_wfs_recurse_xsl:context.nodes>
+                    <xsl:copy-of select="$get_wfs_recurse_xsl:PRIMARYKEY.nodes/get_wfs_recurse_xsl:PRIMARYKEY.nodes/*"/>
+                    <get_wfs_recurse_xsl:nodes fid="{$p5:fid}"/>
+                </get_wfs_recurse_xsl:context.nodes>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy-of select="$get_wfs_recurse_xsl:PRIMARYKEY.nodes"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:function>
+    
+    
+    <xsl:function name="get_wfs_recurse_xsl:context.nodes.merge">
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes"/>
+        <xsl:param name="current.node"/>
+        <get_wfs_recurse_xsl:context.nodes>
+            <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes/get_wfs_recurse_xsl:context.nodes/*"/>
+            <xsl:for-each select="$current.node//*[@fid]">
+                <get_wfs_recurse_xsl:nodes fid="{@fid}" root.distance="{count( ancestor::node())}" added="by_merge"/>
+            </xsl:for-each>
+        </get_wfs_recurse_xsl:context.nodes>
+    </xsl:function>
         
     <xsl:function name="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter">
         <xsl:param name="get_wfs_recurse_xsl:GetsimpleSchema"/>
@@ -230,6 +268,66 @@
         <xsl:value-of select="."/>
     </xsl:template>
     
+    <xsl:function name="p5:get_get_from_url">
+        <xsl:param name="p5:url"/> <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=d -->
+        <xsl:param name="get"/><!-- which param from get - maybe REQUEST  -->
+        <xsl:choose>
+            <xsl:when test="contains($p5:url,'?')">
+                <xsl:variable name="result">
+                    <xsl:for-each select="tokenize( substring-after($p5:url,'?'),'&amp;')">
+                        <xsl:if test="substring-before(.,'=') = $get"><xsl:value-of select="substring-after(.,'=')"/></xsl:if>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:choose>
+                    <xsl:when test="string-length($result) &gt; 0">
+                        <xsl:value-of select="$result"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:message terminate="yes">#263 p5:get_get_from_url - cannot get get value=<xsl:value-of select="$get"/> from url string = <xsl:value-of select="$p5:url"/></xsl:message>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message terminate="yes">#268 p5:get_get_from_url url=<xsl:value-of select="$p5:url"/> dont seems correct to extract get</xsl:message>
+            </xsl:otherwise>
+        </xsl:choose>
+        
+    </xsl:function>
+    
+    <xsl:template match="@next" mode="p5:fid">
+        <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=default_db__x3A__BI_audit_MSIG_name%3ABI_audit_MSIG_name&amp;sid=p3s8biqkc8jd4q0ihbqqhr8ueeub7hka9g8nagh3haiqrep37fr6hngspi0m3155v4gl0g2te86dd2hosir0f6l83t7t0j8fsoqq3k2&amp;resolveDepth=4&amp;resolve=all&amp;PRIMARYKEY=7666&amp;SRSNAME=EPSG%3A3003&amp;startIndex=50000&amp;maxFeatures20 -->
+        <xsl:variable name="TYPENAME" select="p5:get_get_from_url(.,'TYPENAME')"/>
+        <xsl:variable name="PRIMARYKEY" select="p5:get_get_from_url(.,'PRIMARYKEY')"/>
+        <xsl:variable name="TYPENAME">
+            <xsl:choose>
+                <xsl:when test="substring-after($TYPENAME,':')">
+                    <xsl:value-of select="substring-after($TYPENAME,':')"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$TYPENAME"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:value-of select="concat($TYPENAME,'.',$PRIMARYKEY)"/>
+    </xsl:template>
+    
+    <xsl:function  name="p5:fid">
+        <xsl:param name="p5:next"/>
+        <xsl:choose>
+            <xsl:when test="contains($p5:next,'PRIMARYKEY=')">
+                <xsl:variable name="TYPENAME" select="p5:get_get_from_url($p5:next,'TYPENAME')"/>
+                <xsl:variable name="PRIMARYKEY" select="p5:get_get_from_url($p5:next,'PRIMARYKEY')"/>
+                <xsl:value-of select="concat($TYPENAME,'.',$PRIMARYKEY)"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message>#312 cannot retrieve PRIMARYKEY from propably backreffed url=<xsl:value-of select="$p5:next"/></xsl:message>
+            </xsl:otherwise>
+            
+        </xsl:choose>
+        <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=default_db__x3A__BI_audit_MSIG_name%3ABI_audit_MSIG_name&amp;sid=p3s8biqkc8jd4q0ihbqqhr8ueeub7hka9g8nagh3haiqrep37fr6hngspi0m3155v4gl0g2te86dd2hosir0f6l83t7t0j8fsoqq3k2&amp;resolveDepth=4&amp;resolve=all&amp;PRIMARYKEY=7666&amp;SRSNAME=EPSG%3A3003&amp;startIndex=50000&amp;maxFeatures20 -->
+        
+    </xsl:function>
+    
     <xsl:template name="simpleTypeMakeOgcFilter_merge"><!-- do zrobienia polaczonego filtru OGC -->
         <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
         <xsl:param name="xpath_dita" required="yes"/> <!-- @value -->
@@ -345,7 +443,12 @@
              </xsl:variable>
              
              <!--<xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>-->
-             <xsl:message>#265 test $php_session_id_ok.string=<xsl:value-of select="$php_session_id_ok.string"/>; $url_string=<xsl:value-of select="$request_string"/> </xsl:message>
+             <xsl:message>#265 test $php_session_id_ok.string=<xsl:value-of select="$php_session_id_ok.string"/>; $url_string=<xsl:value-of select="$request_string"/> 
+                 p5:links.recurse_level.limit = <xsl:value-of select="$p5:links.recurse_level.limit"/>
+                 p5:links.next.recurse_level.limit = <xsl:value-of select="$p5:links.next.recurse_level.limit"/>
+                 resolveDepth = <xsl:value-of select="$resolveDepth"/>
+                 
+             </xsl:message>
              <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
              <xsl:if test="$debug &gt; 5">
                  <wfs_response>
@@ -354,11 +457,27 @@
                      <test>https://a.binder:@biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=p5_default_db:PROCES_INIT&amp;SRSNAME=EPSG:3003&amp;MAXFEATURES=15</test>
                      
                      <!--<xsl:copy-of select="$wfs_response"/>-->
-                     
                      <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>
                  </wfs_response>
              </xsl:if>
-             <xsl:choose>
+            <xsl:variable name="get_wfs_recurse_xsl:context.nodes">
+                <get_wfs_recurse_xsl:context.nodes>
+                    <xsl:apply-templates mode="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:wfs_response"/>
+                </get_wfs_recurse_xsl:context.nodes>
+            </xsl:variable>
+            <xsl:variable name="get_wfs_recurse_xsl:context.PRIMARYKEY">
+                <get_wfs_recurse_xsl:context.PRIMARYKEY>
+                        <xsl:for-each select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*">
+                            <get_wfs_recurse_xsl:nodes>
+                                <xsl:attribute name="fid" select="@fid"/>
+                            </get_wfs_recurse_xsl:nodes>
+                        </xsl:for-each>
+                </get_wfs_recurse_xsl:context.PRIMARYKEY>
+            </xsl:variable>
+            <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+            <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
+            
+            <xsl:choose>
             <xsl:when test="$api_recurse">
                 <xsl:if test="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
                     <xsl:message terminate="yes"> Error with query <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//ServiceException/text()" xpath-default-namespace="http://www.opengis.net/ogc"/></xsl:message>
@@ -370,17 +489,28 @@
                         <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/namespace::node()"/>
                         <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*/namespace::node()"/>
                         <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember//*/namespace::node()"/>-->
-                        <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs"/>
+                        <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs">
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+                            <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
+                        </xsl:apply-templates>
                     </xsl:when>
                     <xsl:otherwise>
                         <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*"/>
-                        <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs"/>
+                        <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs">
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+                            <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
+                        </xsl:apply-templates>
                     </xsl:otherwise>
                 </xsl:choose>
             </xsl:when>
             <xsl:otherwise>
                 <xsl:apply-templates mode="after_first_ant_assing_vars" select="$get_wfs_recurse_xsl:GetsimpleSchema">
                     <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
+                    <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+                    <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+                    <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
                 </xsl:apply-templates>
             </xsl:otherwise>
         </xsl:choose>
@@ -390,39 +520,96 @@
     
     <xsl:template match="*[@xlink:href]" mode="p5:links.evaluate"  xpath-default-namespace="http://www.opengis.net/wfs">
         <xsl:param name="p5:links.recurse_level" select="1"/>
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
+        <xsl:variable name="p5:fid" select="get_wfs_recurse_xsl:REQUEST.fid(@xlink:href)"/>
         <!--<xlink:href.evaluate>-->
-            <xsl:copy>
+           <!-- <xsl:copy>
+                <xsl:copy-of select="@*"/>-->
+            <xlink:href.debug509>
+                <xsl:attribute name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
                 <xsl:copy-of select="@*"/>
+            </xlink:href.debug509>
+                <xsl:message>#516-A  name()<xsl:value-of select="name()"/>; @xlink:href=<xsl:value-of select="@xlink:href"/>;</xsl:message>
+                <xsl:comment>#516-A  name()<xsl:value-of select="name()"/>; @xlink:href=<xsl:value-of select="@xlink:href"/>;</xsl:comment>
                 <xsl:variable name="xlink:request_string">
                     <xsl:apply-templates mode="xlink:request_string" select="."/>
                 </xsl:variable>
-                <xsl:message>#398 p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at @xlink:href xlink:request_string=<xsl:value-of select="$xlink:request_string"/></xsl:message>
+        <xsl:message>#516-A anchestors.count(<xsl:value-of select="count(ancestor::node())"/>); context.PRIMARYKEY count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid])"/>); previous @fid=count(<xsl:value-of select="count(root()//*[@fid])"/>);  get_wfs_recurse_xsl:context.nodes count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.nodes//*[@fid])"/>); debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                <xsl:comment>#516-A anchestors.count(<xsl:value-of select="count(ancestor::node())"/>); context.PRIMARYKEY count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid])"/>); previous @fid=count(<xsl:value-of select="count(root()//*[@fid])"/>);  get_wfs_recurse_xsl:context.nodes count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.nodes//*[@fid])"/>); debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+                <!--<xsl:message>#401 previous @fid
+                    <xsl:for-each select="root()//*[@fid]">
+                        <xsl:value-of select="@fid"/>
+                    </xsl:for-each>
+                </xsl:message>-->
                 <xsl:choose>
-                    <xsl:when test="p5:links.recurse_level.limit($p5:links.recurse_level)"/>
+                    <!--<xsl:when test="$get_wfs_recurse_xsl:context.nodes//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]">
+                        
+                    </xsl:when>-->
+                    <xsl:when test="root()//*[number(@root.distance) &lt; number($p5:links.loop.context.nodes.min.distance) and @fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]">
+                        <xsl:message>#398-A match="*[@xlink:href]" - LOOP DETECTED  for <xsl:value-of select="root()//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]/concat(@fid,' dist:',@root.distance)"/>  at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING  @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                        <xsl:comment>#398-A match="*[@xlink:href]" - LOOP DETECTED  for <xsl:value-of select="root()//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]/concat(@fid,' dist:',@root.distance)"/>  at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/> BYPASSING  @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+                    </xsl:when>
+                    <xsl:when test="p5:links.recurse_level.limit($p5:links.recurse_level)">
+                        <xsl:message>#398-B match="*[@xlink:href]" HIT LIMIT p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING  @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                        <xsl:comment>#398-B match="*[@xlink:href]" HIT LIMIT p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING  @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+                        <xsl:copy-of select="."/>
+                    </xsl:when>
                     <xsl:when test=" string-length($xlink:request_string) = 0">
-                        <xsl:message>#402 stopped recursion due to ERROR in empty $xlink:request_string - DEBUGGING TODO 2018-01-5</xsl:message>
+                        <xsl:message>#402-C match="*[@xlink:href]" stopped recursion due to ERROR in empty $xlink:request_string - DEBUGGING TODO 2018-01-5; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                        <xsl:comment>#402-C match="*[@xlink:href]" stopped recursion due to ERROR in empty $xlink:request_string - DEBUGGING TODO 2018-01-5; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
                     </xsl:when>
                     <xsl:otherwise>
+                        <xsl:message>#398-D  match="*[@xlink:href]"-B count(.)=<xsl:value-of select="count(.)"/>; continuing still digging at @xlink:href xlink:request_string=<xsl:value-of select="$xlink:request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                        <xsl:comment>#398-D  match="*[@xlink:href]"-B count(.)=<xsl:value-of select="count(.)"/>; continuing still digging at @xlink:href xlink:request_string=<xsl:value-of select="$xlink:request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+                        
+                        <!--<xsl:variable name="xlink:request_string">
+                            <xsl:apply-templates mode="xlink:request_string" select="."/>
+                        </xsl:variable>-->
                         <xsl:apply-templates select=" get_wfs_recurse_xsl:wfs_response($xlink:request_string)" mode="p5:links.evaluate">
-                            <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level + 1"/>
+                            <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level) + 1"/>
+                            <xsl:with-param name="p5:links.next.recurse_level" select="1"/> <!-- $p5:links.next.recurse_level TODO researching start from beginning -->
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+                            <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                            <xsl:with-param name="debug.last_wfs_request" select="$xlink:request_string"/>
                         </xsl:apply-templates>
                     </xsl:otherwise>
                     
                 </xsl:choose>
                 
-            </xsl:copy>
+            <!--</xsl:copy>-->
         <!--</xlink:href.evaluate>-->
     </xsl:template>
     
     
     <xsl:template match="*" mode="p5:links.evaluate"  xpath-default-namespace="http://www.opengis.net/wfs">
         <xsl:param name="p5:links.recurse_level" select="1"/>
-        <xsl:copy>
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
+       <!-- <xsl:element name="{name()}" inherit-namespaces="yes">
+            <xsl:copy-of select="namespace::node()"/>-->
+        <xsl:copy><!-- debug -->
             <xsl:copy-of select="@*"/>
-            <xsl:apply-templates mode="xlink:href.evaluate" select="@xlink:href"/>
+            <!--<xsl:attribute name="debug.566"> match=* mode=p5:links.evaluate</xsl:attribute>-->
+            <xsl:apply-templates mode="xlink:href.evaluate" select="@xlink:href">
+                <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
+                <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
+                <xsl:with-param name="get_wfs_recurse_xsl:context.nodes"  select="$get_wfs_recurse_xsl:context.nodes"/>
+                <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+                <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
+            </xsl:apply-templates>
             <xsl:apply-templates mode="p5:links.evaluate">
                 <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
+                <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
+                <xsl:with-param name="get_wfs_recurse_xsl:context.nodes"  select="$get_wfs_recurse_xsl:context.nodes"/>
+                <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+                <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
             </xsl:apply-templates>
+        <!--</xsl:element>-->
         </xsl:copy>
         <!--<xsl:element name="{name()}" inherit-namespaces="yes"  xpath-default-namespace="http://www.opengis.net/wfs">
             
@@ -434,14 +621,24 @@
     <xsl:function name="p5:links.recurse_level.limit">
         <xsl:param name="p5:links.recurse_level"/>
         <xsl:choose>
-            <xsl:when test="$p5:links.recurse_level &gt; $p5:links.recurse_level.limit">
+            <xsl:when test="number($p5:links.recurse_level) &gt; number($p5:links.recurse_level.limit)">
                 <xsl:value-of select="'limit hit'"/>
-                <xsl:message>#431 $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/></xsl:message>
+                <xsl:message>#431-R LIMIT HIT p5:links.recurse_level.limit($p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>);</xsl:message>
+                <xsl:comment>#431-R LIMIT HIT p5:links.recurse_level.limit($p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>)</xsl:comment>
             </xsl:when>
         </xsl:choose>
-        
     </xsl:function>
     
+    <xsl:function name="p5:links.next.recurse_level.limit">
+        <xsl:param name="p5:links.next.recurse_level"/>
+        <xsl:choose>
+            <xsl:when test="number($p5:links.next.recurse_level.limit) &gt; number($p5:links.next.recurse_level.limit)">
+                <xsl:value-of select="'limit hit'"/>
+                <xsl:message>#431-N LIMIT HIT p5:links.next.recurse_level.limit(<xsl:value-of select="$p5:links.next.recurse_level.limit"/>) at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
+                <xsl:comment>#431-N LIMIT HIT p5:links.next.recurse_level.limit(<xsl:value-of select="$p5:links.next.recurse_level.limit"/>) at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:comment>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:function>
     
     <xsl:function name="get_wfs_recurse_xsl:php_session_id_ok.string">
         <xsl:param name="php_session_id_ok.string"/>
@@ -487,7 +684,18 @@
         
         <!--<xsl:value-of select="tokenize($xlink:href,'/')[ 1 to count(tokenize($xlink:href,'.'))]"/>-->
     </xsl:function>
-    
+   
+    <xsl:function name="get_wfs_recurse_xsl:REQUEST.fid">
+        <xsl:param name="xlink:href"/>
+        <xsl:choose>
+            <xsl:when test="substring-after($xlink:href,'#')">
+                <xsl:value-of select=" substring-after($xlink:href,'#')"/>
+            </xsl:when>
+            <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
+        </xsl:choose>
+
+    </xsl:function>
+   
     <xsl:function name="get_wfs_recurse_xsl:REQUEST.TYPE.PRIMARYKEY">
         <xsl:param name="xlink:href"/>
         
@@ -543,6 +751,7 @@
     
     <xsl:function name="get_wfs_recurse_xsl:wfs_response">
         <xsl:param name="request_string"/>
+        <xsl:message>#741 quering wfs for request_string= <xsl:value-of select="$request_string"/> ;</xsl:message>
         <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
             <xsl:if test="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
                 <xsl:message terminate="yes"> Error with query <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//ServiceException/text()" xpath-default-namespace="http://www.opengis.net/ogc"/></xsl:message>
@@ -560,6 +769,10 @@
     
     <xsl:template match="p5:links" mode="p5:links.evaluate">
         <xsl:param name="p5:links.recurse_level" select="1"/>
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes"  required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
         <xsl:variable name="php_session_id_ok.string">
             <xsl:if test=" string-length($php_session_id_ok.string) &gt; 0">
                 <xsl:value-of select="concat('&amp;sid=',normalize-space($php_session_id_ok.string))"/>
@@ -572,12 +785,26 @@
                 </xsl:when>
             </xsl:choose>
         </xsl:variable>
-        <xsl:copy>
-            
+       <!-- <xsl:copy>-->
+            <p5:links><xsl:copy-of select="*"/></p5:links>
             
+            <xsl:variable name="p5:fid" select="p5:fid(p5:next/text())"/>
+            <xsl:message>#684 debug match="p5:links" detected $p5:fid = <xsl:value-of select="$p5:fid"/></xsl:message>
+            <xsl:comment>#684 debug match="p5:links" detected $p5:fid = <xsl:value-of select="$p5:fid"/></xsl:comment>
+            <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/> 
+            <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
               <xsl:choose>
-                  <xsl:when test="$p5:links.recurse_level &gt; $p5:links.recurse_level.limit">
-                      <xsl:message>#430 $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/></xsl:message>
+                  <xsl:when test="number($p5:links.recurse_level) &gt; number($p5:links.recurse_level.limit)">
+                      <xsl:message>#430 STOPPED digging links by HIT $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
+                      <xsl:comment>#430 STOPPED digging links by HIT $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:comment>
+                  </xsl:when>
+                  <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
+                      <xsl:message> #690 STOPPED match="p5:links" DETECTED PRIMARYKEY FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:message>
+                      <xsl:comment> #690 STOPPED match="p5:links" DETECTED PRIMARYKEY FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:comment>
+                  </xsl:when>
+                  <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
+                      <xsl:message> #691 STOPPED match="p5:links" DETECTED FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:message>
+                      <xsl:comment> #691 STOPPED match="p5:links" DETECTED FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:comment>
                   </xsl:when>
                   <xsl:otherwise>
                       <xsl:variable name="MAXFEATURES.request">
@@ -588,8 +815,8 @@
                       </xsl:variable>
                       
                       <xsl:variable name="request_string" select="concat(p5:next/text(),$php_session_id_ok.string,$api_recurse.request,$MAXFEATURES.request)"/> <!-- ,'&amp;maxFeatures=999' -->
-                      <xsl:message>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/> <xsl:copy-of select="p5:next/@*"></xsl:copy-of></xsl:message>
-                      <xsl:comment>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/></xsl:comment>
+                      <xsl:message>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>;  p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/> <xsl:copy-of select="p5:next/@*"></xsl:copy-of></xsl:message>
+                      <xsl:comment>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>;  p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/></xsl:comment>
                       <!--<request_string>
               <xsl:copy-of select="$request_string"/>
               </request_string>-->
@@ -601,29 +828,41 @@
                       <xsl:choose>
                           <xsl:when test="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/@next">
                               <!--<debug.438>-->
-                              <xsl:comment>debug.438</xsl:comment>
-                                  <xsl:message> #360-recurse-A to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
+                                <xsl:comment>360-recurse-A  $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>;  p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
+                              <xsl:message> #360-recurse-A $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
                                   <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
-                                      <xsl:with-param name="p5:links.recurse_level" select="( $p5:links.recurse_level + 1 )"/>
+                                      <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level)"/> <!-- + 1  --><!-- setting to 1 again to research child node -->
+                                      <xsl:with-param name="p5:links.next.recurse_level" select="number($p5:links.next.recurse_level) + 1"/> 
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.nodes"  select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                                      <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
                                   </xsl:apply-templates>
                               <!--</debug.438>-->
                           </xsl:when>
                           <xsl:when test="$get_wfs_recurse_xsl:wfs_response//p5:next">
                               <!--<debug.441>-->
-                              <xsl:comment>debug.441</xsl:comment>
-                                  <xsl:message> #360-recurse-B to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
+                                    <xsl:comment> #360-recurse-B $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
+                              <xsl:message> #360-recurse-B $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
                                   <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
-                                      <xsl:with-param name="p5:links.recurse_level" select="( $p5:links.recurse_level + 1 )"/>
+                                      <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/> <!-- + 1 ) -->
+                                      <xsl:with-param name="p5:links.next.recurse_level" select=" number($p5:links.next.recurse_level) + 1"/>
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                                      <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
                                   </xsl:apply-templates>
                               <!--</debug.441>-->
                           </xsl:when>
                           <xsl:otherwise>
                               <!--<debug.447>-->
-                              <xsl:comment>debug.447</xsl:comment>
-                                  <xsl:message> #360-recurse-C to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
+                                <xsl:comment> #360-recurse-C $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
+                              <xsl:message> #360-recurse-C $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
                                   <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/@*"/>
                                   <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
-                                      <xsl:with-param name="p5:links.recurse_level" select="( $p5:links.recurse_level + 1 )"/>
+                                      <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/> <!-- +1 -->
+                                      <xsl:with-param name="p5:links.next.recurse_level" select=" number($p5:links.next.recurse_level) + 1"/>
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
+                                      <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                                      <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
                                   </xsl:apply-templates>
                               <!--</debug.447>-->
                           </xsl:otherwise>
@@ -631,7 +870,7 @@
                   </xsl:otherwise>
               </xsl:choose>
             
-        </xsl:copy>
+        <!--</xsl:copy>-->
     </xsl:template>
     
     
@@ -643,7 +882,10 @@
     
     <xsl:template match="wfs:FeatureCollection[@next and gml:featureMember/*]" mode="p5:links.evaluate" >
         <xsl:param name="p5:links.recurse_level" select="1"/>
-        
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
         
         <xsl:variable name="php_session_id_ok.string">
             <xsl:if test=" string-length($php_session_id_ok.string) &gt; 0">
@@ -653,13 +895,11 @@
         <xsl:variable name="MAXFEATURES.request">
             <xsl:choose>
                 <xsl:when test="contains(@next,'maxFeatures')"/>
-                <xsl:otherwise><xsl:value-of select="concat('&amp;maxFeatures',$MAXFEATURES)"/></xsl:otherwise>
+                <xsl:otherwise><xsl:value-of select="concat('&amp;maxFeatures=',$MAXFEATURES)"/></xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
         <xsl:variable name="request_string" select="concat(@next,$MAXFEATURES.request)"/>
-        
-        
-        
+       
         <!--<xsl:variable name="api_recurse.request">
             <xsl:choose>
                 <xsl:when test="1=1"></xsl:when>
@@ -670,51 +910,105 @@
         </xsl:variable>-->
         
         
+        <xsl:variable name="p5:fid">
+            <xsl:choose>
+                <xsl:when test="contains(@next,'PRIMARYKEY=')">
+                    <xsl:apply-templates select="@next" mode="p5:fid"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:message>#833 cannot get PRIMARYKEY from Backreffed - check loop in another leaf from <xsl:value-of select="@next"/></xsl:message>
+                    <xsl:comment>#833 cannot get PRIMARYKEY from Backreffed - check loop in another leaf from <xsl:value-of select="@next"/></xsl:comment>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
          <!-- ,'&amp;maxFeatures=999' -->
-        <xsl:message>#511 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/></xsl:message>
-        <xsl:comment>#511 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/></xsl:comment>
+        <xsl:message>#511 p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+        <xsl:comment>#511 p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
         <!--<request_string>
         <xsl:copy-of select="$request_string"/>
         </request_string>-->
-        <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
-        <!--<debug.470>-->
-            <!--<xsl:copy-of select="@*"/>-->
-            <!--<debug_current>-->
-                <xsl:comment>debug.current</xsl:comment>
+        <xsl:choose>
+            
+            <xsl:when test="number($p5:links.recurse_level) &gt; $p5:links.recurse_level.limit">
+                <xsl:message>#692-R stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                <xsl:comment>#692-R stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+            </xsl:when>
+            <xsl:when test="number($p5:links.next.recurse_level) &gt; $p5:links.next.recurse_level.limit">
+                <xsl:message>#692-L stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
+                <xsl:comment>#692-L stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+            </xsl:when>
+            <xsl:otherwise>
+                
+                <xsl:comment>debug.current lower; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
                 <xsl:apply-templates mode="#current">
-                    <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level + 1"/>
+                    <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level) + 1"/>
+                    <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
+                    <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+                    <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                    <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
                 </xsl:apply-templates>
-            <!--</debug_current>-->
-            <!--<debug_reffered>-->
-        <xsl:comment>debug.reffered</xsl:comment>
+                <xsl:comment>debug.current upper / debug.reffered lower; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
+                
                 <xsl:choose>
-                    <xsl:when test="$get_wfs_recurse_xsl:wfs_response//gml:featureMember/*">
-                        <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
-                            <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level + 1"/>
-                        </xsl:apply-templates>
+                    <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
+                        <xsl:message>#797 detected FUTURE LOOP  for fid=<xsl:value-of select="$p5:fid"/>  in match="wfs:FeatureCollection[@next </xsl:message>
                     </xsl:when>
                     <xsl:otherwise>
-                        <xsl:message>#498 not any childs</xsl:message>
+                        <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
+                        <xsl:choose> 
+                            <xsl:when test="$get_wfs_recurse_xsl:wfs_response//gml:featureMember/*">
+                                <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
+                                    <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level)"/> <!--  + 1 -->
+                                    <xsl:with-param name="p5:links.next.recurse_level" select="number($p5:links.next.recurse_level) + 1"/>
+                                    <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
+                                    <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
+                                    <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
+                                </xsl:apply-templates>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                
+                                <xsl:message>#498 not any childs</xsl:message>
+                            </xsl:otherwise>
+                        </xsl:choose>
                     </xsl:otherwise>
                 </xsl:choose>
                 
-            <!--</debug_reffered>-->
-        <!--</debug.470>-->
+                    
+                <!--</debug_reffered>-->
+                <!--</debug.470>-->
+            </xsl:otherwise>
+        </xsl:choose>
         
     </xsl:template>
     
     <xsl:template match="wfs:FeatureCollection" mode="p5:links.evaluate" >
         <xsl:param name="p5:links.recurse_level" select="1"/>
-        <xsl:message>#538 match wfs:FeatureCollection $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>;</xsl:message>
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
+        <xsl:message>#538 match wfs:FeatureCollection $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
         <xsl:apply-templates mode="#current">
-            <xsl:with-param name="p5:links.recurse_level" select="($p5:links.recurse_level + 1)"/>
+            <xsl:with-param name="p5:links.recurse_level" select="(number($p5:links.recurse_level) + 1)"/>
+            <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
+            <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+            <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+            <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
         </xsl:apply-templates>
     </xsl:template>
     
     <xsl:template match="gml:featureMember" mode="p5:links.evaluate">
         <xsl:param name="p5:links.recurse_level" select="1"/>
+        <xsl:param name="p5:links.next.recurse_level" select="1"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
+        <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
+        <xsl:param name="debug.last_wfs_request" required="yes"/>
         <xsl:apply-templates mode="#current">
             <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
+            <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
+            <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
+            <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
+            <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
         </xsl:apply-templates>
     </xsl:template>
     
@@ -977,7 +1271,8 @@
                     </xsl:choose>
                 </xsl:variable>
                 <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
-                <xsl:element name="{name()}" >
+                <!--<xsl:element name="{name()}" >-->
+                <xsl:copy>
                     <xsl:attribute name="xpath" select="$curr_xpath_tmpl"/>
                     <xsl:for-each select="@*">
                         <xsl:choose>
@@ -989,7 +1284,8 @@
                     <xsl:apply-templates mode="after_first_ant_assing_xpath">
                         <xsl:with-param name="curr_xpath" select="$curr_xpath_tmpl"/>
                     </xsl:apply-templates>
-                </xsl:element>
+                </xsl:copy>
+                <!--</xsl:element>-->
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template>

+ 7 - 5
SE/schema/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml

@@ -2,10 +2,12 @@
 <project basedir="../../." name="graph_gnuplot" default="graph_to_image">
   <description>to use from to dita conversion from xsl/ant to generate png graphs</description>
     
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
     <!-- 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"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
     <!-- eof modules WPS_Functions  -->
     
     
@@ -36,8 +38,8 @@
     </target>
     
     <target name="read_build_properties" depends="graph_gnuplot:create_tempdir">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
     

+ 10 - 5
SE/schema/WPS_Functions/mapserver_gml_to_png/build_mapserver_gml_to_png.xml

@@ -2,10 +2,15 @@
 <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>
     
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
     <!-- 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"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
+    
+    
+    
     <!-- eof modules WPS_Functions  -->
     
     
@@ -42,8 +47,8 @@
     </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}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
     

+ 180 - 18
SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xml

@@ -7,10 +7,18 @@
         TO install xsd object in SE/schema/ant_object
     </description>
     
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
+    
+    
     <!-- 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"/>
+  <!--  <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  -->
     
     
@@ -33,12 +41,13 @@
     <property name="build_object_install_se_ant_object.list_schema_elements.xml" location="${build_object_install_se_ant_object_basedir.temp}/list_schema_elements.xml"/>
     <property name="build_object_install_se_ant_object.list_installed_elements.xml" location="${build_object_install_se_ant_object_basedir.temp}/list_installed_elements.xml"/>
     <property name="build_object_install_se_ant_object.generate_tables_from_external.xml" location="${build_object_install_se_ant_object_basedir.temp}/generate_tables_from_external.xml"/>
+    <property name="ant.build_object_install_se_ant_object.generate_tables_from_external.xml" location="${build_object_install_se_ant_object_basedir.temp}/build_generate_tables_from_external.xml"/>
     
     <property name="p5oi:statistics.xsl" value="${build_object_install_se_ant_object_basedir}/p5oi.statistics.xsl"/>
     <property name="p5oi:say.txt" value="${build_object_install_se_ant_object_basedir.temp}/say.txt"/>
     <!--<property name="build_properties.xml" location="${public_html}/build_properties.xml" />-->
     
-    
+    <property name="p5oi:threadCount" value="4"/>
     
    <!-- <property name="table.local" location="${public_html}/table"/>
     
@@ -55,8 +64,8 @@
     </target>
     
     <target name="read_build_properties">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties" inheritall="yes" inheritrefs="yes"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties" inheritall="yes" inheritrefs="yes"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <property name="build_object_install_se_ant_object.xsl" location="${default_db_xml_cache.public}/build_object_install_se_ant_object.xsl"/>
     </target>
     
@@ -73,10 +82,33 @@
         <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
         <!--<ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />-->
         
-        <exec executable="say" spawn="true" failifexecutionfails="false">
+        <!--<exec executable="say" spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="installing objects into external table directory to allow import them to process 5 system"/>
-        </exec>
+        </exec>-->
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="installing objects into external table directory to allow import them to process 5 system" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
+        <antcall target="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd_external_schema_id_namespace_prefix"/>
+        <antcall target="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd"/>
+        <antcall target="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd_default_db"/>
+        
+        
+        
+    </target>
+    
+    
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd_default_db" depends="read_build_properties" description="To generate tables using buildComplexType for objects">
+       
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="transforming imported databases " />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
+        
         <xslt basedir="./" style="${build_object_install_se_ant_object.xsl}"  in="${procesy5_system_schema.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  force="yes">
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -92,37 +124,167 @@
             <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
             <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
             <param name="default_db.dir" expression="${default_db.dir}"/>
-            <param name="debug_level_param" expression="6"/>
+            <param name="debug_level_param" expression="0"/>
             <!--<param name="disable.save.output" expression="true"/>-->
             <param name="targetNamespace_DEFAULTS_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
             <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
             <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
+            <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local" expression="${detect_objects_parent_relations.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_default_db.filter.regex" expression="(.*)|(.*wsbpelxxxx.*)|(.*ksiegi_prefi.*)|(.*17666xxxxx.*)"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd.filter.regex" expression="(XXXXXXXXXXX)"/><!-- (.*)|(.*wsbpelxxxx.*)|(.*TELBOXES.*)|(.*CRM_PROCES.*)|(.*CRM_IMAGE.*)|(.*CRM_WSKAZNIK.*)|(.*COMPANIES.*) -->
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_external_schema_id_namespace_prefix.filter.regex" expression="(XXXXXXXXX)"/> <!-- (.*wsbpelxxxx.*)|(.*ksiegi_prefix.*)|(.*xxxx17666.*) -->
+            <param name="basedir" expression="${basedir}"/>
             <!--<param name="debug_level" expression="6"/>-->
             <!--<param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-->
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>
         <antcall target="p5oi:say"/>
-       
     </target>
     
+    <target name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd" depends="read_build_properties" description="To generate tables using buildComplexType for objects">
+        
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="transforming base schema tables and objects by multithread task" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
+        
+        <xslt basedir="./" style="${build_ant_universal_by_xsl_match.xsl}"  in="${element_complexType.xml}"  destdir="./" out="${ant.build_object_install_se_ant_object.generate_tables_from_external.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="build_object_install_se_ant_object.generate_tables_from_external.get_all_xsd.xml"/>
+            </factory>
+            <param name="match_root_element" expression="wfs:FeatureCollection"/>
+            <param name="match_element" expression=""/><!-- To be set universally to another type of object tree -->
+            <param name="antfile_prefix" expression="build_element_complexType.xml"/>
+            <param name="temp" expression="/tmp"/>
+            <param name="basedir" expression="${basedir}"/>
+            <param name="antfile" expression=""/>
+            <!--<param name="target" expression="xml_recursed_from_tr_map_with_RelatedFeatureLoop"/>-->
+            <param name="match_child_element" expression=""/>
+            <param name="match_child_element_property_name" expression=""/>
+            <param name="properties.xml" expression="${build_properties.xml}"/>
+            <param name="properties_override.xml" expression="${properties_override.xml}"/>
+            <param name="parallel" expression="1"/>
+            <param name="threadCount" expression="${p5oi:threadCount}"/>
+            <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
+            <param name="debug_level_param" expression="${debug_level_param}"/>
+            <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
+            <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
+            <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
+            
+            <!--<param name="external_schema_table.path" expression="${external_schema_table.path}"/>-->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="executing by thread Count ${p5oi:threadCount}" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
+        <ant antfile="${ant.build_object_install_se_ant_object.generate_tables_from_external.xml}"/>
+        
+        
+        <!--<xslt basedir="./" style="${build_object_install_se_ant_object.xsl}"  in="${procesy5_system_schema.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  force="yes">
+            <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}object_install_se_ant_object.generate_tables_from_external"/>
+            </factory>
+            <!-\-<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-\->
+            <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <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="external_schema_table.path" expression="${external_schema_table.path}"/>
+            <param name="default_db.dir" expression="${default_db.dir}"/>
+            <param name="debug_level_param" expression="0"/>
+            <!-\-<param name="disable.save.output" expression="true"/>-\->
+            <param name="targetNamespace_DEFAULTS_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
+            <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
+            <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
+            <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local" expression="${detect_objects_parent_relations.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_default_db.filter.regex" expression="(XXXXXXXXXXX)"/> <!-\- (.*)|(.*wsbpelxxxx.*)|(.*ksiegi_prefi.*)|(.*17666xxxxx.*) -\->
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd.filter.regex" expression="(.*)"/><!-\- (.*)|(.*wsbpelxxxx.*)|(.*TELBOXES.*)|(.*CRM_PROCES.*)|(.*CRM_IMAGE.*)|(.*CRM_WSKAZNIK.*)|(.*COMPANIES.*) -\->
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_external_schema_id_namespace_prefix.filter.regex" expression="(XXXXXXXXX)"/> <!-\- (.*wsbpelxxxx.*)|(.*ksiegi_prefix.*)|(.*xxxx17666.*) -\->
+            <param name="basedir" expression="${basedir}"/>
+            <!-\-<param name="debug_level" expression="6"/>-\->
+            <!-\-<param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-\->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>-->
+        <antcall target="p5oi:say"/>
+    </target>
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd_external_schema_id_namespace_prefix" depends="read_build_properties" description="To generate tables using buildComplexType for objects">
+        
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="transforming external - to - import schemas" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
+        
+        <xslt basedir="./" style="${build_object_install_se_ant_object.xsl}"  in="${procesy5_system_schema.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  force="yes">
+            <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}object_install_se_ant_object.generate_tables_from_external"/>
+            </factory>
+            <!--<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-->
+            <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <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="external_schema_table.path" expression="${external_schema_table.path}"/>
+            <param name="default_db.dir" expression="${default_db.dir}"/>
+            <param name="debug_level_param" expression="0"/>
+            <!--<param name="disable.save.output" expression="true"/>-->
+            <param name="targetNamespace_DEFAULTS_prefix" expression="${targetNamespace_DEFAULTS_prefix}"/>
+            <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
+            <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
+            <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local" expression="${detect_objects_parent_relations.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_default_db.filter.regex" expression="(XXXXXXXXXXX)"/> <!-- (.*)|(.*wsbpelxxxx.*)|(.*ksiegi_prefi.*)|(.*17666xxxxx.*) -->
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd.filter.regex" expression="(XXXXXXXXXXXX)"/><!-- (.*)|(.*wsbpelxxxx.*)|(.*TELBOXES.*)|(.*CRM_PROCES.*)|(.*CRM_IMAGE.*)|(.*CRM_WSKAZNIK.*)|(.*COMPANIES.*) -->
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd_external_schema_id_namespace_prefix.filter.regex" expression="(.*)"/> <!-- (.*wsbpelxxxx.*)|(.*ksiegi_prefix.*)|(.*xxxx17666.*) -->
+            <param name="basedir" expression="${basedir}"/>
+            <!--<param name="debug_level" expression="6"/>-->
+            <!--<param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        <antcall target="p5oi:say"/>
+    </target>
+    
+    
     <target name="p5oi:say" description="to say description what is in file ${build_object_install_se_ant_object_basedir.temp}">
         <sleep seconds="4"/>
-        <xslt basedir="./" style="${p5oi:statistics.xsl}"  in="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${p5oi:say.txt}"  force="yes">
+        <!--TODO NOT AVIALBLE WHEN divided files <xslt basedir="./" style="${p5oi:statistics.xsl}"  in="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${p5oi:say.txt}"  force="yes">
             <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/WPS_Functions/object_install_se_ant_object/object_install_se_ant_object.xsd}say"/>
             </factory>
-            <!--<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-->
+            <!-\-<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-\->
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>
         
-        <loadfile property="say" srcfile="${p5oi:say.txt}"/>
-        
-        
-        <exec executable="say"  failifexecutionfails="false">
+        <loadfile property="say" srcfile="${p5oi:say.txt}"/>-->
+        <!--<exec executable="say"  failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="${say}"/>
-        </exec>
+        </exec>-->
+        <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="${say}" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        -->
+        
+        
+        
+        
         
     </target>
     
@@ -149,7 +311,7 @@
             <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
             <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
             <param name="default_db.dir" expression="${default_db.dir}"/>
-            <param name="debug_level_param" expression="0"/>
+            <param name="debug_level_param" expression="6"/>
             
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>

+ 233 - 34
SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xsl

@@ -4,6 +4,7 @@
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
     xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
     xmlns:p5oi="http://biuro.biall-net.pl/WPS_Functions/object_install_se_ant_object/object_install_se_ant_object.xsd"
+    xmlns:xp5r="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/xinclude_p5_recurse/xinclude_p5_recurse.xsd"
     exclude-result-prefixes="xs"
     version="2.0">
     
@@ -21,9 +22,12 @@
     <!--<xsl:param name="external_schema_table.path" required="yes"/>-->
     <!--<xsl:param name="targetNamespace_DEFAULTS_prefix" required="yes"/>-->
     <xsl:param name="disable.save.output"/> <!-- to debugging when errors set to disable output for errors in Cannot write more than one result document to the same UR -->
-    <xsl:param name="system_cache__appinfo:get_all_xsd_default_db.filter.regex" select="'(.*ksiegi_prefi.*)|(.*17666.*)'"/>
-    <xsl:param name="system_cache__appinfo:get_all_xsd.filter.regex" select="'(zzzzxxx.*)|(.*TELBOXES.*)|(.*CRM_PROCESxxx.*)|(.*CRM_IMAGExxxxx.*)|(.*CRM_WSKAZNIKxxx.*)|(.*xxxxxCOMPANIES.*)'"/>
-    <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix.filter.regex" select="'(.*ksiegi_prefix.*)|(.*17666.*)'"/>
+    <xsl:param name="system_cache__appinfo:get_all_xsd_default_db.filter.regex" select="'(.*wsbpelxxxx.*)|(.*ksiegi_prefi.*)|(.*17666xxxxx.*)'"/>
+    <xsl:param name="system_cache__appinfo:get_all_xsd.filter.regex" select="'(.*wsbpelxxxx.*)|(.*TELBOXESxxxx.*)|(.*CRM_PROCESxxx.*)|(.*CRM_IMAGExxxxx.*)|(.*CRM_WSKAZNIKxxx.*)|(.*xxxxxCOMPANIES.*)'"/>
+    <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix.filter.regex" select="'(.*wsbpelxxxx.*)|(.*ksiegi_prefix.*)|(.*xxxx17666.*)'"/>
+    
+    <xsl:param name="system_cache__appinfo:document-uri-orig"/>
+    <xsl:param name="system_cache__appinfo:document-uri"/>
     
     <xsl:variable name="NamespaceBinding" select="doc($NamespaceBinding.xml)"/>
     
@@ -49,35 +53,49 @@
         <xsl:message>#44 bypassed @targetNamespace <xsl:value-of select="schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:message>
     </xsl:template>
    
-    
+    <xsl:template match="schema[( 
+        @targetNamespace='http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/graph_relation_elements.xsd' or
+        @targetNamespace='http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd' or
+        @targetNamespace='http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/p5_obj_vars.xsd' or
+        @targetNamespace='http://www.w3.org/2001/XMLSchema'
+        or contains(@targetNamespace,'/default_db_xml_cache/')
+        or contains(@targetNamespace,'/system_cache/')
+        or contains(@targetNamespace,'/default_db/SystemObjects/')
+        ) or contains(@system_cache__appinfo:document-uri,'default_db_xml_cache.public/')]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" priority="9">
+        <xsl:message>#65 bypassed @targetNamespace <xsl:value-of select="@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:message>
+    </xsl:template>
    
     <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix[matches(xs:schema/@targetNamespace,$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix.filter.regex)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"> <!-- FILTERING [xs:schema/@targetNamespace='https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd'] -->
         <xsl:message>#53 mached <xsl:value-of select="name()"/></xsl:message>
         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
             <xsl:with-param name="system_cache__appinfo:document-uri-orig" select="@system_cache__appinfo:document-uri-orig"/>
+            <xsl:with-param name="system_cache__appinfo:document-uri" select="@system_cache__appinfo:document-uri"/>
         </xsl:apply-templates>
     </xsl:template>
     
     <xsl:template match="system_cache__appinfo:get_all_xsd[1=1 and   matches(xs:schema/@targetNamespace,$system_cache__appinfo:get_all_xsd.filter.regex) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"> <!-- FILTERING   matches(xs:schema/@targetNamespace,'(.*CRM_PROCES.*)|(.*CRM_IMAGE.*)|(.*CRM_WSKAZNIK.*)') [xs:schema/@targetNamespace='https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd'] -->
         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
             <xsl:with-param name="system_cache__appinfo:document-uri-orig" select="@system_cache__appinfo:document-uri"/>
+            <xsl:with-param name="system_cache__appinfo:document-uri" select="@system_cache__appinfo:document-uri"/>
         </xsl:apply-templates>
     </xsl:template>
     
     <xsl:template match="system_cache__appinfo:get_all_xsd_default_db[matches(xs:schema/@targetNamespace,$system_cache__appinfo:get_all_xsd_default_db.filter.regex)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"> <!-- FILTERING [xs:schema/@targetNamespace='https://biuro.biall-net.pl/wfs/default_db/table/ADMIN_USERS.xsd'] -->
         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
             <xsl:with-param name="system_cache__appinfo:document-uri-orig" select="@system_cache__appinfo:document-uri"/>
+            <xsl:with-param name="system_cache__appinfo:document-uri" select="@system_cache__appinfo:document-uri"/>
         </xsl:apply-templates>
     </xsl:template>
     
     <!-- XXXXXX MAIN XXXX MAIN XXXX  XXXXXX MAIN XXXX MAIN XXXX  XXXXXX MAIN XXXX MAIN XXXX -->
     <!-- XXXXXX MAIN XXXX MAIN XXXX  XXXXXX MAIN XXXX MAIN XXXX  XXXXXX MAIN XXXX MAIN XXXX -->
     <xsl:template match="schema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
-        <xsl:param name="system_cache__appinfo:document-uri-orig" required="yes"/>
+        <xsl:param name="system_cache__appinfo:document-uri-orig" select="$system_cache__appinfo:document-uri-orig"/>
+        <xsl:param name="system_cache__appinfo:document-uri"  select="$system_cache__appinfo:document-uri"/>
         <xsl:variable name="targetNamespace" select="@targetNamespace"/>
-        <xsl:variable name="prefix" select="system_cache__appinfo:prefix_from_targetNamespace($system_cache__appinfo:vrtfNamespaces,@targetNamespace,../@system_cache__appinfo:document-uri)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:prefix_from_targetNamespace($system_cache__appinfo:vrtfNamespaces,@targetNamespace,$system_cache__appinfo:document-uri)"/> <!-- ../@system_cache__appinfo:document-uri -->
         <xsl:if test=" string-length($prefix) &lt; 1">
-            <xsl:message terminate="yes">#70 there is problem @targetNamespace=<xsl:value-of select="@targetNamespace"/>; @system_cache__appinfo:document-uri=<xsl:value-of select="../@system_cache__appinfo:document-uri"/> with system_cache__appinfo:vrtfNamespaces - probably need to fix template to match another than  system_cache__appinfo:get_all_xsd_default_db root/child elements</xsl:message>
+            <xsl:message terminate="yes">#70 there is problem @targetNamespace=<xsl:value-of select="@targetNamespace"/>; @system_cache__appinfo:document-uri=<xsl:value-of select="$system_cache__appinfo:document-uri"/> with system_cache__appinfo:vrtfNamespaces - probably need to fix template to match another than  system_cache__appinfo:get_all_xsd_default_db root/child elements</xsl:message>
         </xsl:if>
         <xsl:if test="number($debug_level) &gt; 3"><xsl:message>#82 matched MAIN schema @targetNamespace=<xsl:value-of select="@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:message></xsl:if>
         <!--<prefix>
@@ -176,7 +194,7 @@
                             <xsl:attribute name="system_cache__appinfo.name" select="@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
                             <xsl:attribute name="system_cache__appinfo.targetNamespace" select="$targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
                             <xsl:attribute name="system_cache__appinfo.id" select="@id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-                            <xsl:if test="number($debug_level) &gt; 3"><xsl:attribute name="debug.159" select="'test loc'"/></xsl:if>
+                            <xsl:if test="number($debug_level) &gt; 3"><xsl:attribute name="debug.159" select="concat('test loc. @prefix:',@prefix)"/></xsl:if>
                         </xsl:element>
                     </xsl:for-each-group>
                     
@@ -200,7 +218,7 @@
                     
                     <xsl:for-each-group select="current-group()" group-by="concat(@targetNamespace,name(),@name)">
                         <!--<xsl:message>#195 grouped to save schema by name()=<xsl:value-of select="name()"/>; and @name=<xsl:value-of select="@name"/>;</xsl:message>-->
-                        <xsl:comment>#136 grouping schema elements count=<xsl:value-of select="count(current-group())"/></xsl:comment>
+                        <xsl:comment>#136 grouping schema elements count=<xsl:value-of select="count(current-group())"/> for @targetNamespace=<xsl:value-of select="@targetNamespace"/>;</xsl:comment>
                         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema" select=".">
                             <xsl:with-param name="prefix" select="$prefix"/>
                             <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
@@ -232,10 +250,11 @@
                         <xsl:copy-of select="$schema_dirty"/>
                     </debug.231.schema_dirty>
                     
-                     <!--<xsl:comment>#123 saving to <xsl:value-of select="concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')"/> ($schema.prefix = <xsl:value-of select="$schema.prefix"/>); ($system_cache__appinfo:document-uri-orig=<xsl:value-of select="$system_cache__appinfo:document-uri-orig"/>) </xsl:comment>
-                             <xsl:message>#123 saving to  ($schema.prefix = <xsl:value-of select="$schema.prefix"/>); ($system_cache__appinfo:document-uri-orig=<xsl:value-of select="$system_cache__appinfo:document-uri-orig"/>) </xsl:message>-->
-                        <xsl:message>#123A saving to <xsl:value-of select="$schema_save_path"/> by @targetNamespace=<xsl:value-of select="@targetNamespace"/></xsl:message>
-                     <!--<xsl:result-document href="{ concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')}">-->
+                     <!--<xsl:comment>#123 saving to <xsl:value-of select="concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')"/> ($schema.prefix = <xsl:value-of select="$schema.prefix"/>); ($system_cache__appinfo:document-uri-orig=<xsl:value-of select="$system_cache__appinfo:document-uri-orig"/>) </xsl:comment>-->
+                        <!--<xsl:message>#123 saving to  ($schema.prefix = <xsl:value-of select="$schema.prefix"/>); ($system_cache__appinfo:document-uri-orig=<xsl:value-of select="$system_cache__appinfo:document-uri-orig"/>) </xsl:message>-->
+                        <xsl:message>#123A saving to <xsl:value-of select=" substring-after($schema_save_path,'public_html/external_schema_table')"/> by @targetNamespace=<xsl:value-of select="@targetNamespace"/></xsl:message>
+                        <xsl:comment>#123A saving to <xsl:value-of select=" substring-after($schema_save_path,'public_html/external_schema_table')"/> by @targetNamespace=<xsl:value-of select="@targetNamespace"/></xsl:comment>
+                        <!--<xsl:result-document href="{ concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')}">-->
                      
                     <xsl:choose>
                         <xsl:when test="$disable.save.output">
@@ -348,6 +367,7 @@
                 <xsl:element name="{name()}">
                     <xsl:copy-of select="@namespace"/>
                     <xsl:copy-of select="@schemaLocation"/>
+                    <xsl:if test="number($debug_level) &gt; 4"><xsl:attribute name="debug.352">Copied @namespace=<xsl:value-of select="@namespace"/>; @schemaLocation=<xsl:value-of select="@schemaLocation"/> </xsl:attribute></xsl:if>
                 </xsl:element>
             </xsl:otherwise>
         </xsl:choose>
@@ -377,12 +397,32 @@
         </xsl:element>
     </xsl:template>
     
+    <xsl:function name="p5oi:object_root_name">
+        <xsl:param name="prefix"/>
+        <xsl:variable name="translate_object_escaped_prefix_from_string" select="system_cache__appinfo:translate_object_escaped_prefix_from_string($prefix)"/>
+        <xsl:value-of select="tokenize($translate_object_escaped_prefix_from_string,':')[count(tokenize($translate_object_escaped_prefix_from_string,':'))]"/>
+    </xsl:function>
+    
     <xsl:template match="@schemaLocation" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.schema.import">
         <xsl:if test="number($debug_level) &gt; 4"><xsl:message>#362 matched  @schemaLocation=<xsl:value-of select="."/>; for params .././@prefix=<xsl:value-of select=".././@prefix"/> ../@system_cache__appinfo.targetNamespace=<xsl:value-of select="../@system_cache__appinfo.targetNamespace"/>; ../@system_cache__appinfo.name=<xsl:value-of select="../@system_cache__appinfo.name"/>; ../@namespace=<xsl:value-of select="../@namespace"/>; </xsl:message></xsl:if>
-        <xsl:variable name="object_root_name" select=" system_cache__appinfo:clean_object_escaped_prefix(.././@prefix)"/>
-        
-        <xsl:attribute name="schemaLocation" select=" concat('../../',replace(system_cache__appinfo:translate_object_escaped_prefix_from_string(.././@prefix),':','.'),'/',$object_root_name,'/',$object_root_name,'.xsd')"/>
-        <xsl:attribute name="system_cache__appinfo:object_install_se_ant_object.save_to_ant-object-path.schemaLocation.reffered" select="system_cache__appinfo:object_install_se_ant_object.save_to_ant-object-path.schemaLocation.reffered(../@system_cache__appinfo.targetNamespace, ../@prefix,../@system_cache__appinfo.name,../@namespace )"/>
+        <xsl:variable name="object_root_name" select="p5oi:object_root_name(.././@prefix)" /> <!-- select=" system_cache__appinfo:clean_object_escaped_prefix_with_db_prefix(.././@prefix)" -->
+        <xsl:message>#384<xsl:copy-of select=".././@*"/></xsl:message>
+        <!--<xsl:choose>
+            <xsl:when test="../@namespace='http://www.w3.org/XML/1998/namespace'">
+                <xsl:attribute name="schemaLocation" select="../@namespace"/>
+            </xsl:when>
+            <xsl:otherwise>-->
+                <xsl:if test="number($debug_level) &gt; 4">
+                    <xsl:attribute name="debug.391" select=" concat('../../',replace(.././@prefix,':','.'),'/',$object_root_name,'/',$object_root_name,'.xsd')"/>
+                    <xsl:attribute name="debug.391.prefix" select=".././@prefix"/>
+                    <xsl:attribute name="debug.391.object_root_name" select="$object_root_name"/>
+                    <xsl:attribute name="debug.391.p5oi.object_root_name" select="p5oi:object_root_name(.././@prefix)"/>
+                </xsl:if>
+                <xsl:attribute name="schemaLocation" select=" concat('../../',replace(system_cache__appinfo:translate_object_escaped_prefix_from_string(.././@prefix),':','.'),'/', system_cache__appinfo:clean_object_prefix($object_root_name),'/',system_cache__appinfo:clean_object_prefix($object_root_name),'.xsd')"/>
+                <xsl:attribute name="system_cache__appinfo:object_install_se_ant_object.save_to_ant-object-path.schemaLocation.reffered" select="system_cache__appinfo:object_install_se_ant_object.save_to_ant-object-path.schemaLocation.reffered(../@system_cache__appinfo.targetNamespace, ../@prefix,../@system_cache__appinfo.name,../@namespace )"/>
+            <!--</xsl:otherwise>
+        </xsl:choose>-->
+      
     </xsl:template>
     
     <xsl:template match="@namespace" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.schema.import">
@@ -1002,7 +1042,7 @@
             <xsl:attribute name="prefix" select="$prefix"/>
             <xsl:attribute name="name" select="@name"/>
             <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
-            <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.135">#135BB root element without @type - ...force_refered_complexType (add path) </xsl:attribute></xsl:if>
+            <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.135BB">#135BB root element without @type - ...force_refered_complexType (add path) </xsl:attribute></xsl:if>
             <xsl:comment>#135BB root element without @type - ...force_refered_complexType (add path) </xsl:comment>
             <xsl:element name="{name()}">
                 <xsl:copy-of select="@*"/>
@@ -1044,6 +1084,7 @@
                     <xsl:with-param name="prefix_root" select="$prefix_root"/>
                     <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
                 </xsl:apply-templates>
+                    <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.135">#135 root element without @type - ...force_refered_complexType (add path) </xsl:attribute></xsl:if>
                 <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType">
                     <xsl:with-param name="name" select="@name"/>
                     <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
@@ -1132,6 +1173,48 @@
     
     
     
+    <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child.320T" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" required="yes"/>
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        
+       <!-- <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,@name)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@name)"/>-->
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:attribute name="name" select="@name"/>
+            <xsl:if test="number($debug_level) &gt; 4"><xsl:attribute name="debug_344A-320T_root_CT" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)"/></xsl:if>
+            <xsl:comment>#344A-320T  model:ksiegi_prefix_http/DANE_DZIALKI  TODO  fi create ? root_child element without @type - ...force_refered_complexType (not add path) </xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+                    <xsl:with-param name="prefix" select="$prefix"/> <!-- system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)) -->
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+                <xsl:comment> #344A-320T mode:ksiegi_prefix_http/DANE_DZIALKI - was but not good - suppresed processing - type should be defined in another leaf</xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A">
+                    <xsl:with-param name="name" select="@name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
     <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
         <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
@@ -1265,7 +1348,8 @@
     </xsl:template>
     <xsl:template match="@type" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type"/>
         
-    
+    <xsl:template match="@minOccurs|@maxOccurs" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type"/>
+        
     <xsl:template match="@name" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
         <xsl:param name="targetNamespace" required="yes"/>
         <xsl:param name="prefix" required="yes"/>
@@ -1467,7 +1551,9 @@
         <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
             <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
             <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
-            <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.319">#319 complextype std from child</xsl:attribute></xsl:if>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.319">#319 complextype std from child. mod@2018-01-07</xsl:attribute></xsl:if>
             <xsl:comment>#319 complextype std from child</xsl:comment>
             <xsl:element name="{name()}">
                 <xsl:copy-of select="@*"/>
@@ -1610,7 +1696,7 @@
             <xsl:element name="{name()}">
                 <xsl:choose>
                     <xsl:when test="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"><!-- jest ref do czegos co ma CT -->
-                        <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug_587_root_complextype" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"/></xsl:if>
+                        <xsl:if test="$debug_level &gt; 4"><xsl:attribute name="debug.749AB_root_complextype" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"/></xsl:if>
                         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root" select="@*">
                             <xsl:with-param name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
                             <xsl:with-param name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
@@ -1625,6 +1711,7 @@
                         </generate_tables_from_external_root.required_by.path_init>
                     </xsl:when>
                     <xsl:otherwise><!-- jest ref tylko do roota -->
+                        <xsl:if test="number($debug_level) &gt; 4"><xsl:attribute name="debug.749AB.else">debug.749AB.else root_complextype=<xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"/>  for @ref=<xsl:value-of select="@ref"/></xsl:attribute></xsl:if>
                         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root" select="@*">
                             <xsl:with-param name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
                             <xsl:with-param name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:clean_object_prefix(@ref))"/>
@@ -1634,9 +1721,9 @@
                         <generate_tables_from_external_root.required_by.path_init>
                             <xsl:attribute name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
                             <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
-                            <xsl:attribute name="debug.749AB">#749AB element[@ref] system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child $default_db_targetNamespace_detect_string=<xsl:value-of select="$default_db_targetNamespace_detect_string"/>; element/@system_cache__appinfo:namespace_uri=<xsl:value-of select="element/@system_cache__appinfo:namespace_uri" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:attribute>
+                            <xsl:attribute name="debug.749AB.else">#749AB.else element[@ref] system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child $default_db_targetNamespace_detect_string=<xsl:value-of select="$default_db_targetNamespace_detect_string"/>; element/@system_cache__appinfo:namespace_uri=<xsl:value-of select="element/@system_cache__appinfo:namespace_uri" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:attribute>
                             <xsl:attribute name="name" select=" system_cache__appinfo:clean_object_prefix(@ref)"/>
-                            <DEBUG.1258><xsl:copy-of select="." xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"/></DEBUG.1258>
+                            <!--<DEBUG.1258><xsl:copy-of select="." xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"/></DEBUG.1258>-->
                             <DEBUG.1258><xsl:copy-of select="." xpath-default-namespace=""/></DEBUG.1258>
                         </generate_tables_from_external_root.required_by.path_init>
                     </xsl:otherwise>
@@ -1848,7 +1935,7 @@
                 <xsl:attribute name="prefix" select="$prefix"/>
                 <xsl:attribute name="name" select="@name"/>
                 <xsl:comment>#320T complexContent in child - force to make Table with name based on current path (copy element with @ref + make CT) </xsl:comment>
-                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" select=".">
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child.320T" select=".">
                     <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path_new,'/',$generate_tables_from_external_root.name)"/>
                     <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
                     <xsl:with-param name="prefix" select="$prefix"/>
@@ -2162,7 +2249,7 @@
         <xsl:attribute name="type" select="concat($prefix,':',system_cache__appinfo:clean_object_prefix(current()))"/>
     </xsl:template>
     
-    <xsl:template match="simpleType[ restriction and restriction[not(@base='xs:anyAtomicType')] and contains(@system_cache__appinfo:namespace_uri,$default_db_targetNamespace_detect_string)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="simpleType[ not(@name=@id) and restriction and restriction[not(@base='xs:anyAtomicType')] and contains(@system_cache__appinfo:namespace_uri,$default_db_targetNamespace_detect_string)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
         <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
         <xsl:param name="targetNamespace" required="yes"/>
@@ -2392,6 +2479,7 @@
             <xsl:attribute name="prefix" select="$prefix"/>
             <xsl:attribute name="name" select="@name"/>
             <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:if test="number($debug_level) &gt; 4"><xsl:attribute name="debug.359A">#359A complexType forced now contintue childs</xsl:attribute></xsl:if>
             <xsl:comment>#359A complexType forced now contintue childs</xsl:comment>
             <xsl:element name="{name()}" >
                 <xsl:copy-of select="@*"/>
@@ -2426,7 +2514,30 @@
         <xsl:copy-of select="."/>
     </xsl:template>
     
-    <xsl:template match="complexType[ sequence and not (@type) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A">
+        <ERROR_matched.2489>
+            <xsl:attribute name="mode" select="'system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A'"/>
+            <xsl:attribute name="name" select="name()"/>
+            <xsl:attribute name="id" select="@id"/>
+            <xsl:attribute name="name.attr" select="@name"/>
+        </ERROR_matched.2489>
+    </xsl:template>
+    <xsl:template match="annotation" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A"/>
+    
+    <xsl:template match="@system_cache__appinfo:sort|@system_cache__appinfo:namespace_uri|@system_cache__appinfo:root_element_in_schema|@system_cache__appinfo:prefix|@system_cache__appinfo:xpath_local" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    
+    <xsl:template match="@id" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A">
+        <xsl:param name="random" select="'_CT'"/>
+        <xsl:attribute name="{name()}" select="concat(.,$random)"/>
+    </xsl:template>
+    
+    <xsl:template match="complexType[ sequence and not (@type) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="name" required="yes"/>
         <xsl:param name="generate_tables_from_external_root.name" select="$name"/>
         <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
@@ -2440,20 +2551,108 @@
             <xsl:attribute name="prefix" select="$prefix"/>
             <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
             <xsl:attribute name="name" select="@name"/>
-            <xsl:comment>#359C complexType forced now contintue childs</xsl:comment>
+            <xsl:comment>#359C-344A complexType forced now contintue childs</xsl:comment>
+            <xs:element name="{@name}" type="{$prefix}:{system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@name)}"/>
             <xsl:element name="{name()}" >
-                <xsl:copy-of select="@*"/>
+                <!--<xsl:copy-of select="@*"/>-->
+                <xsl:copy-of select="@system_cache__appinfo:root_element_in_schema"/>
+                <xsl:copy-of select="@system_cache__appinfo:prefix"/>
                 <xsl:attribute name="name" select="$name"/>
-                <xsl:if test="number($debug_level) &gt; 3"><xsl:attribute name="debug.939" select="'#939'"/></xsl:if>
-                <xsl:if test="number($debug_level) &gt; 3"><xsl:comment>#359C -  parsing - CT is local leaf</xsl:comment></xsl:if>
-                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                <xsl:if test="number($debug_level) &gt; 3"><xsl:attribute name="debug.359C-344A.parent_type" select="'#359C-344A'"/></xsl:if>
+                <xsl:if test="number($debug_level) &gt; 3"><xsl:comment>#359C-344A - this is type like ksiegi_prefix_http/DANE_DZIALKI/DZIALKA - making from this complexContent from parent by system_cache__appinfo:object_install_se_ant_object.root_complextype( current,@name) </xsl:comment></xsl:if>
+                <xs:complexContent>
+                    <xs:extension base="{$prefix}:{system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@name)}"/>
+                </xs:complexContent>
+                <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
                     <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
                     <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
                     <xsl:with-param name="prefix" select="$prefix"/>
                     <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
                     <xsl:with-param name="prefix_root" select="$prefix_root"/>
                     <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
-                </xsl:apply-templates>
+                </xsl:apply-templates>-->
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    <xsl:function name="p5oi:checkIfDerivatedModelled359C">
+        <xsl:param name="generate_tables_from_external_root.path"/>
+        <xsl:if test="contains($generate_tables_from_external_root.path,'/')"><xsl:value-of select="1"/></xsl:if>
+    </xsl:function>
+    
+    <xsl:template match="complexType[ sequence and not (@type) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="name" required="yes"/>
+        <xsl:param name="generate_tables_from_external_root.name" select="$name"/>
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:attribute name="name" select="@name"/>
+            <xsl:comment>#359C- complexType forced now contintue childs</xsl:comment>
+            <xsl:choose>
+                <xsl:when test="p5oi:checkIfDerivatedModelled359C($generate_tables_from_external_root.path) ">
+                    <xs:element name="{$name}" type="{$prefix}:{$name}">
+                        <xsl:if test="number($debug_level) &gt;4"><xsl:attribute name="debug.359C-1_checkIfDerivatedModelled359C">#359C- p5oi:checkIfDerivatedModelled359C - derivated applied extra element -like=ksiegi_prefix__x3A__DANE_BUDYNKU__x3A__DANE_ADRESOWE:ADRES_BUDYNKU; </xsl:attribute></xsl:if>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A" select="@*">
+                            <xsl:with-param name="random" select="1"/>
+                        </xsl:apply-templates>
+                    </xs:element>
+                    <xsl:variable name="object_root_name" select="p5oi:object_root_name($prefix)"/>
+                    <xsl:comment>#359C-2 another object_root_name=<xsl:value-of select="$object_root_name"/>; extra complexType and Element of default types - sometimes when modelled are lost in example: ksiegi_prefix__x3A__DANE_BUDYNKU__x3A__DANE_ADRESOWE:ADRES_BUDYNKU </xsl:comment>
+                    <xs:element name="{$object_root_name}" type="{$prefix}:{$object_root_name}">
+                        <xsl:if test="number($debug_level) &gt;4"><xsl:attribute name="debug.359C-2_checkIfDerivatedModelled359C">#359C- p5oi:checkIfDerivatedModelled359C - derivated applied extra element -like=ksiegi_prefix__x3A__DANE_BUDYNKU__x3A__DANE_ADRESOWE:ADRES_BUDYNKU; </xsl:attribute></xsl:if>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A" select="@*">
+                            <xsl:with-param name="random" select="2"/>
+                        </xsl:apply-templates>
+                    </xs:element>
+                    <!--<xsl:comment>#359C-3 another object_root_name=<xsl:value-of select="$object_root_name"/>; extra complexType</xsl:comment>
+                    <xs:complexType name="{$object_root_name}" >
+                        <xsl:if test="number($debug_level) &gt;4"><xsl:attribute name="debug.359C-3_checkIfDerivatedModelled359C">#359C- p5oi:checkIfDerivatedModelled359C - derivated applied extra element -like=ksiegi_prefix__x3A__DANE_BUDYNKU__x3A__DANE_ADRESOWE:ADRES_BUDYNKU; </xsl:attribute></xsl:if>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root.344A" select="@*">
+                            <xsl:with-param name="random" select="3"/>
+                        </xsl:apply-templates>
+                        <xs:complexContent>
+                            <xs:extension base="{$prefix}:{$object_root_name}"/>
+                        </xs:complexContent>
+                    </xs:complexType>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:element name="{name()}" >
+                <xsl:copy-of select="@*"/>
+                <xsl:attribute name="name" select="$name"/>
+                <xsl:if test="number($debug_level) &gt; 3"><xsl:attribute name="debug.359C" select="'#359C'"/></xsl:if>
+                <xsl:if test="number($debug_level) &gt; 3"><xsl:comment>#359C-exit -  parsing - CT is local leaf</xsl:comment></xsl:if>
+                <xsl:choose>
+                    <xsl:when test="@system_cache__appinfo:extension_base"><!-- todo ? and not(@root-in-schema) -->
+                        <xs:complexContent>
+                            <xs:extension base="{$prefix}:{system_cache__appinfo:clean_object_prefix(@system_cache__appinfo:extension_base)}">
+                                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                                    <xsl:with-param name="prefix" select="$prefix"/>
+                                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                                </xsl:apply-templates> 
+                            </xs:extension>
+                        </xs:complexContent>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                            <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                            <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                            <xsl:with-param name="prefix" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                    </xsl:otherwise>
+                </xsl:choose>
             </xsl:element>
         </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
     </xsl:template>
@@ -2542,11 +2741,11 @@
         <xsl:copy-of select="."/>
     </xsl:template>
     
-    <xsl:template match="@name" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables.sequence"/>
+    <xsl:template match="@name|@base" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables.sequence"/>
         
     
     
-    <xsl:template match="@type|@targetNamespace|@id|@name|@generate_tables_from_external_root.path.last_token|@generate_tables_from_external_root.name|@generate_tables_from_external_root.path|@prefix|@prefix_root" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables_schema"/>
+    <xsl:template match="@type|@targetNamespace|@id|@name|@generate_tables_from_external_root.path.last_token|@generate_tables_from_external_root.name|@generate_tables_from_external_root.path|@prefix|@prefix_root|@minOccurs|@maxOccurs" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables_schema"/>
         
     
     <xsl:template match="annotation" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">

+ 23 - 8
SE/schema/WPS_Functions/object_modeling/build_object_modeling.xml

@@ -1,15 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project basedir="../../." name="object_modeling" default="system_cache__appinfo:new_object_by_prototype"
     xmlns:p5om="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"
+    xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
     <description>
         TO model objects capabilities
     </description>
     
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
+    
+    
     <!-- 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="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  -->
     
     <property name="object_modeling_basedir" location="${basedir}/WPS_Functions/${ant.project.name}"  />
@@ -37,8 +46,8 @@
     <target name="read_build_properties">
        <!-- <ant antfile="${root_build.xml}" target="save_build_properties"/>
         <loadproperties srcfile="${build_properties}"/>-->
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <property name="new_object_by_prototype.xml" value="${transformed.local}/system_cache__appinfo/new_object_by_prototype.xml"/>
         <echo>We try to refresh ${default_db.xml} or ${detect_objects_parent_relations.xsl} or ${procesy5_system_schema.xml}</echo>
     </target>
@@ -120,13 +129,16 @@
         
         <regexp />
         
-        <exec executable="say" spawn="true" failifexecutionfails="false">
+        <!--<exec executable="say" spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="using object modeling "/>
-            <!--<arg line="generating new object by prototype for name ${NamespaceObjectInstanceTable} "/>-->
-        </exec>
-        
+            <!-\-<arg line="generating new object by prototype for name ${NamespaceObjectInstanceTable} "/>-\->
+        </exec>-->
         
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="using object modeling " />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
         
         <ant antfile="${root_build.xml}" target="procesy5_system_schema.xml_if_not_exists" />
        
@@ -166,6 +178,9 @@
             <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
             <param name="merge_priority" expression="${merge_priority}"/>
             <param name="suppres_saving" expression="${suppres_saving}"/>
+            <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local" expression="${detect_objects_parent_relations.local}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>
         <!--<loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>

+ 27 - 0
SE/schema/WPS_Functions/object_modeling/object_modeling.xsd

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+    xmlns:p5om="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"
+    xmlns:p5omn="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd"
+    targetNamespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"
+    vc:minVersion="1.1"
+    xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning">
+    <xs:attribute default="https://biuro.biall-net.pl/wfs"
+        name="TargetNamespaceBindingsApi.typespecial_refs"/>
+    <xs:attribute default="table" name="NamespaceObjectInstanceType.typespecial_refs"/>
+    <xs:attribute default="default_db"
+        name="NamespaceDatabaseStorageDefinitionPrefix.typespecial_refs"/>
+    <xs:attribute name="NamespaceObjectInstanceTable_RegexString.ignore.typespecial_refs"
+        default="(bravecare__sys_users)|(^_.*)|(ITEM_LINK_TYPES)|(F_ID)|(F_GID.*)|(D_P)|(COLUMNS)|(BI_audit_KW_requested_person_copy)|(.*.copy_energa.*)|(BI_audit_ENERGA_RUM_KONTRAHENCI_copy)|(.*energa_copy.*)|(BI_audit_ALL.*)|(BILLING_USERS_OLD)|(BILLING_USERS_ADD_OLD)|(AUTOSHAPE.*)|(ATTACHMENTS)|(ADMIN_USERS__REF__LOCAL_EMAIL)|(.*to_delete.*)|(.*temp.*)|(tmp.*)|(.*test.*)|(.*otomin.*)|(.*kasacja.*)|(.*default_default_objects.*)|(.*arskom.*)|(.*aneksy.*)|(ams.*)|(.*zasob_path_idx.*)|($_.*)|(s2sua)|(seq)|(stats_BILLS_FVAT_POS)|(phone)|(_remote_L1_BILLS_KP)|(_project_path_idx)|(__RAPORT_Rozdzielcza_Raport)|(.*TEMP.*)|(.*_SYNC_.*)|(.*_backup_.*)|(.*__INSTANCE_CLOSURE.*)|(CRM_LISTA_ZASOBOW_tree)|(.*_idx.*)|(.*_prim.*)|(CRM_REF_CONFIG)|(F_AREA.*)|($F_.*)|(ID_OFFERS)|(IN7_CECHY)|(.*_TEST_.*)|(IN7_PRODUKTY_CECHY)|(INDEKS24)|(INVENTORY)|(ITEM_LINKS.*)|(LDAP_GROUPS)|(.*_old.*)|(stats_BILLS_FVAT_POS)"/>
+    <xs:attribute name="NamespaceObjectInstanceTable_RegexString.typespecial_refs"
+        default="USERS2_MARKETING$"/>
+    <!-- ozdzielcza_ (ozdzielcza_)|(TELBOXES) -->
+    <xs:attribute name="targetNamespace.base.typespecial_refs"
+        default="https://biuro.biall-net.pl/api/36"/>
+    <!-- which source schema to use (currently force to ${default_db.xml} )-->
+    <xs:attribute name="build_object_modeling_build_infrastructure_child.xml.typespecial_refs"
+        default="{$object_modeling_new_basedir_temp}/build_object_modeling_build_infrastructure_child.typespecial_refs.xml"/>
+    <xs:attribute name="object_modeling.Error.Handling.typespecial_refs" default="OVERWRITE"/>
+    <xs:attribute name="merge_priority.typespecial_refs" default="prototype"/>
+    <xs:attribute name="suppres_saving.typespecial_refs" default=""/>
+</xs:schema>

+ 9 - 5
SE/schema/WPS_Functions/object_modeling_build_infrastructure/build_object_modeling_build_infrastructure.xml

@@ -6,11 +6,15 @@
         @2017-12-19 to nie dziala - tylko robi puste modele bez prototypes - mozna uzywac, ale bez liczenia na to, ze zmerguje!!! tylko object_modeling.xsl wyzwalane z WPS_Functions/object_modeling_new/build_object_modeling_new.xml z target system_cache__appinfo:object_modeling_new.build_Infrastructure
     </description>
     
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
     
     <!-- 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"/>
+    <!--<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  -->
     
     <property name="object_modeling_build_infrastructure" location="${basedir}/WPS_Functions/object_modeling_build_infrastructure/build_object_modeling_build_infrastructure.xml"/>
@@ -39,8 +43,8 @@
     
     
     <target name="read_build_properties">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <!--<ant antfile="${root_build.xml}" target="save_build_properties"/>
         <loadproperties srcfile="${build_properties}"/>-->
         <property name="new_object_by_prototype.xml" value="${transformed.local}/system_cache__appinfo/new_object_by_prototype.xml"/>

+ 8 - 7
SE/schema/WPS_Functions/object_modeling_by_default_db_xml_schema/build_object_modeling_by_default_db_xml_schema.xml

@@ -5,15 +5,16 @@
                  aviable for other ant as $build_object_modeling_by_default_db_xml_schema.xml
     </description>
     
+    <include file="../build_WPS_Functions.xml"/>
     <!-- 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"/>
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
     <!-- eof modules WPS_Functions  -->
     
     <property name="public_html" location="${basedir}"/>
-    <property name="root_build.xml" location="${public_html}/build.xml"/>
-    <property name="build_properties.xml" location="${public_html}/build_properties.xml" />
+    <property name="root_build.xml" location="${p5build.build}"/>
+    <property name="build_properties.xml" location="${p5build.properties}" />
     
     <property name="object_modeling_by_default_db_xml_schema_basedir" location="${basedir}/WPS_Functions/${ant.project.name}"  />
     <property name="object_modeling_by_default_db_xml_schema_basedir.temp" location="${object_modeling_by_default_db_xml_schema_basedir}/temp"  />
@@ -24,8 +25,8 @@
         <!--<ant antfile="${root_build.xml}" target="save_build_properties.xml"/>-->
         <!--<ant antfile="${root_build.xml}" target="read_build_properties.xml"/>-->
         <!--<loadproperties srcfile="${build_properties.xml}"  />-->
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <echo>We try to refresh ${default_db.xml} or ${detect_objects_parent_relations.xsl}</echo>
     </target>
     

+ 49 - 0
SE/schema/WPS_Functions/object_modeling_new/build_object_modeling_new.child.xsl

@@ -3,6 +3,7 @@
     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"
     xmlns:p5omn="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd"
+    xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
     exclude-result-prefixes="xs"
     version="2.0">
     
@@ -27,6 +28,7 @@
     <xsl:param name="p5omn:match_complexTypes"/>
     <xsl:param name="merge_priority" select="'database'"/>
     <xsl:param name="suppres_saving"/>
+    
     <xsl:include href="../../default_db_xml_cache.public/system_cache__appinfo/TargetNamespaceBindings.xsl"/>
     
     
@@ -60,7 +62,15 @@
     
     <xsl:template match="schema" mode="system_cache__appinfo:build_object_modeling_new.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <target name="build_object_modeling_new.child">
+            <ant  target="p5suis:say_to_queue">
+                <xsl:attribute name="antfile" select="'${system_ui_info_speech}'"/>
+                <property name="p5suis:say_text" value="current schema @targetNamespace {@targetNamespace} has {count(xs:element|xs:complexType[ $p5omn:match_complexTypes ])} objects." />
+            </ant>
+            <ant  target="p5suis:say_from_queue">
+                <xsl:attribute name="antfile" select="'${system_ui_info_speech}'"/>
+            </ant>
             <xsl:apply-templates mode="system_cache__appinfo:build_object_modeling_new.child"/>
+            
         </target>
     </xsl:template>
     
@@ -134,6 +144,27 @@
                             </xsl:variable>
                             <arg line="generating object {@name} {$say.namespace}"/>
                         </exec>-->
+                        <xsl:variable name="say.namespace">
+                            <xsl:choose>
+                                <xsl:when test=" contains($targetNamespace.base,$default_db_targetNamespace_detect_string)"> from default database namespace </xsl:when>
+                                <xsl:when test=" contains($targetNamespace.base, $prototype_object_namespace)"> from default prototype namespace </xsl:when>
+                                <xsl:otherwise>
+                                    from prototype p5:object <xsl:value-of select="@name"/>
+                                </xsl:otherwise>
+                            </xsl:choose>
+                            
+                        </xsl:variable>
+                        
+                        
+                        <ant target="p5suis:say_to_queue">
+                            <xsl:attribute name="antfile" select="'${system_ui_info_speech}'"/>
+                            <property name="p5suis:say_text">
+                                <xsl:attribute name="value" select="$say.namespace"/>
+                            </property>
+                        </ant>
+                        <ant target="p5suis:say_from_queue">
+                            <xsl:attribute name="antfile" select="'${system_ui_info_speech}'"/>
+                        </ant>
                         <ant>
                             <xsl:attribute name="antfile" select="$ant.build"/>
                             <xsl:attribute name="target" select="$ant.target"/>
@@ -177,6 +208,24 @@
                                 <xsl:attribute name="name" select="'suppres_saving'"/>
                                 <xsl:attribute name="value" select="$suppres_saving"/> 
                             </property>
+                            <property>
+                                <xsl:attribute name="name" select="'detect_resource_type.local'"/>
+                                <xsl:attribute name="value" select="$detect_resource_type.local"/> 
+                            </property>
+                            <property>
+                                <xsl:attribute name="name" select="'{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local'"/>
+                                <xsl:attribute name="value" select="$p5opr:detect_objects_parent_relations.local"/> 
+                            </property>
+                            <property>
+                                <xsl:attribute name="name" select="'{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local'"/>
+                                <xsl:attribute name="value" select="$p5opr:detect_objects_parent_relations.local"/> 
+                            </property>
+                            <property>
+                                <xsl:attribute name="name" select="'vrtfNamespaces.xml'"/>
+                                <xsl:attribute name="value" select="$vrtfNamespaces.xml"/> 
+                            </property>
+                            
+                            
                         </ant>
                         <echo>#135 todo copy - nie potrzebne - savuje object_modeling.xsl</echo>
                         <!--<copy>

+ 89 - 288
SE/schema/WPS_Functions/object_modeling_new/build_object_modeling_new.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project basedir="../../." name="object_modeling_new" default="system_cache__appinfo:object_modeling_new"
+<project basedir="../../." name="object_modeling_new" default="p5omn:object_modeling_new"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
     xmlns:p5omn="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd"
     >
@@ -8,10 +8,21 @@
     </description>
     
     
+    <tstamp>
+        <format property="p5omn:last.minute" pattern="MM/dd/yyyy hh:mm a"  offset="-2" unit="minute"/>
+        <format property="p5omn:current.timestamp" pattern="yyyy-dd-MM-hh:mm-a"  />
+    </tstamp>
+    
+    <include file="../build_WPS_Functions.xml"/>
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
+    
     <!-- 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"/>
+   <!-- <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  -->
     
     <property name="object_modeling_new" location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml"/>
@@ -42,13 +53,13 @@
         <echoproperties destfile="${build_object_modeling_new.childproperties}"/>
     </target>
     
-    <target name="system_cache__appinfo:object_modeling_new_create_dirs">
+    <target name="p5omn:object_modeling_new_create_dirs">
         <mkdir dir="${object_modeling_new_basedir_temp}"/>
     </target>
     
-    <target name="read_build_properties" depends="system_cache__appinfo:object_modeling_new_create_dirs">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+    <target name="read_build_properties" depends="p5omn:object_modeling_new_create_dirs">
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
         <tempfile property="new_object_by_prototype_result.xml" prefix="new_object_by_prototype_result" suffix=".xml" destdir="${object_modeling_new_basedir_temp}"/>
         <tempfile property="object_modeling_new_in_schema_check.xml" prefix="object_modeling_new_in_schema_check" suffix=".xml" destdir="${object_modeling_new_basedir_temp}"/>
         
@@ -61,7 +72,7 @@
     </target>
     
     
-    <target  name="system_cache__appinfo:object_modeling_new_check_condition">
+    <target  name="p5omn:object_modeling_new_check_condition">
         <!--<input addproperty="prototype_object_namespace" defaultvalue="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd" />--> <!-- https://biuro.biall-net.pl/wfs/default_db/Types/Infrastructure.xsd -->
         <input addproperty="TargetNamespaceBindingsApi" defaultvalue="https://biuro.biall-net.pl/wfs"/> <!-- root namespace API -->
         <input addproperty="NamespaceDatabaseStorageDefinitionPrefix" defaultvalue="default_db"/>
@@ -69,12 +80,12 @@
         <input addproperty="NamespaceObjectInstanceTable" /> <!-- example CRM_PROCES -->
         <!--<input addproperty="new_object_namespace" defaultvalue="${TargetNamespaceBindingsApi}/${$NamespaceDatabaseStorageDefinitionPrefix}/${$NamespaceObjectInstanceTable}.xsd" />--> <!-- https://biuro.biall-net.pl/wfs/default_db/table/Rozdzielcza_struktura_wewnetrzna_wsg84.xsd -->
         <antcall target="template_object.xml_location.xml"/>
-        <condition taskname="system_cache__appinfo:object_modeling_new_check_ok" property="system_cache__appinfo:object_modeling_new_check">
+        <condition taskname="p5omn:object_modeling_new_check_ok" property="p5omn:object_modeling_new_check">
             <available file="${template_object.xml_location.xml}"/>
         </condition>
         
         <echo>#62 we checked it</echo>
-        <antcall target="system_cache__appinfo:object_modeling_new_check_fail"/>
+        <antcall target="p5omn:object_modeling_new_check_fail"/>
     </target>
     
     
@@ -84,7 +95,7 @@
         <echo> #82 $template_object.xml_location.xml = ${template_object.xml_location.xml}</echo>
     </target>    
     
-    <target name="system_cache__appinfo:object_modeling_new_in_schema_check_condition" depends="read_build_properties,template_object.xml_location.xml" description="To check if such object exists in schema">
+    <target name="p5omn:object_modeling_new_in_schema_check_condition" depends="read_build_properties,template_object.xml_location.xml" description="To check if such object exists in schema">
         <input addproperty="TargetNamespaceBindingsApi" defaultvalue="https://biuro.biall-net.pl/wfs"/> <!-- root namespace API -->
         <input addproperty="NamespaceDatabaseStorageDefinitionPrefix" defaultvalue="default_db"/>
         <input addproperty="NamespaceObjectInstanceType" defaultvalue="table"/>
@@ -122,32 +133,32 @@
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>
         <loadfile property="object_modeling_new_in_schema_check.xml.loadfile" srcfile="${object_modeling_new_in_schema_check.xml}"/>
-        <condition property="system_cache__appinfo:object_modeling_new_in_schema_check" taskname="system_cache__appinfo:object_modeling_new_in_schema_check">
+        <condition property="p5omn:object_modeling_new_in_schema_check" taskname="p5omn:object_modeling_new_in_schema_check">
             <contains string="${object_modeling_new_in_schema_check.xml.loadfile}" substring="ERROR"/>
         </condition>
-        <antcall target="system_cache__appinfo:object_modeling_new_in_schema_check_fail"/>
+        <antcall target="p5omn:object_modeling_new_in_schema_check_fail"/>
     </target>
     
-    <target name="system_cache__appinfo:object_modeling_new_in_schema_check" depends="system_cache__appinfo:object_modeling_new_in_schema_check_condition"/>
-    <target name="system_cache__appinfo:object_modeling_new_in_schema_check_fail" if="${system_cache__appinfo:object_modeling_new_in_schema_check}">
+    <target name="p5omn:object_modeling_new_in_schema_check" depends="p5omn:object_modeling_new_in_schema_check_condition"/>
+    <target name="p5omn:object_modeling_new_in_schema_check_fail" if="${p5omn:object_modeling_new_in_schema_check}">
         <fail message="ERROR ${object_modeling_new_in_schema_check.xml.loadfile}"/>
     </target>
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new_in_xsd_check" depends="system_cache__appinfo:object_modeling_new_in_schema_check_condition" description="To check if such object exists in xsd repository"/>
+    <target name="p5omn:object_modeling_new_in_xsd_check" depends="p5omn:object_modeling_new_in_schema_check_condition" description="To check if such object exists in xsd repository"/>
     
-    <target name="system_cache__appinfo:object_modeling_new_check_fail" if="${system_cache__appinfo:object_modeling_new_check}">
+    <target name="p5omn:object_modeling_new_check_fail" if="${p5omn:object_modeling_new_check}">
         <echo>OUTPUT_START</echo>
         <echo> Modeled object already exists in template directory - use model function instead of create new</echo>
         <echo>OUTPUT_END</echo>
         <fail/>
     </target>
     
-    <target name="system_cache__appinfo:object_modeling_new" depends="read_build_properties,system_cache__appinfo:object_modeling_new_in_schema_check,system_cache__appinfo:object_modeling_new_in_xsd_check" description="ANT_TARGET new object by using prototype from Types to local repository to model it further" >
+    <target name="p5omn:object_modeling_new" depends="read_build_properties,p5omn:object_modeling_new_in_schema_check,p5omn:object_modeling_new_in_xsd_check" description="ANT_TARGET new object by using prototype from Types to local repository to model it further" >
         <input addproperty="prototype_object_namespace" defaultvalue="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd" />
         
-        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema"/> <!-- or system_cache__appinfo:default_db_get_xml_schema_if_not_exists -->
+        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="p5omn:default_db_get_xml_schema"/> <!-- or p5omn:default_db_get_xml_schema_if_not_exists -->
         <ant antfile="${build_root.xml}" target="procesy5_system_schema.xml" />
         
         
@@ -180,8 +191,8 @@
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new.build_Infrastructure" depends="read_build_properties" description="ANT_TARGET @2017-12-19 dobrze zrobilo prototypy z infrastr + brakujace elementy + simpleTYpe z default.db. new object by using prototype from Types with merging using regex select and igronre. Uwaga prototypy infrastruktury raz stworzone moga byc tylko odbudowywane z typespecial refs (TODO do poprawy @2017-12-28)" >
-        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
+    <target name="p5omn:object_modeling_new.build_Infrastructure" depends="read_build_properties" description="ANT_TARGET @2017-12-19 dobrze zrobilo prototypy z infrastr + brakujace elementy + simpleTYpe z default.db. new object by using prototype from Types with merging using regex select and igronre. Uwaga prototypy infrastruktury raz stworzone moga byc tylko odbudowywane z typespecial refs (TODO do poprawy @2017-12-28)" >
+        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="p5omn:default_db_get_xml_schema_if_not_exists"/>
         <ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />
         
         <property name="prototype_object_namespace.Infrastructure" value="https://biuro.biall-net.pl/wfs/default_db/Types/infrastructure.xsd"/>
@@ -210,7 +221,7 @@
             TargetNamespaceBindingsApi = ${TargetNamespaceBindingsApi.Infrastructure}
             NamespaceDatabaseStorageDefinitionPrefix = ${NamespaceDatabaseStorageDefinitionPrefix.Infrastructure}
             NamespaceObjectInstanceType = ${NamespaceObjectInstanceType.Infrastructure}
-            ant.target = system_cache__appinfo:object_modeling_new_by_xml_schema
+            ant.target = p5omn:object_modeling_new_by_xml_schema
             object_modeling.Error.Handling = ${object_modeling.Error.Handling.Infrastructure}
             external_schema_table.path = ${external_schema_table.path}
             procesy5_system_schema_collection_dir = ${basedir}
@@ -237,9 +248,9 @@
             <param name="NamespaceDatabaseStorageDefinitionPrefix" expression="${NamespaceDatabaseStorageDefinitionPrefix.Infrastructure}"/>
             <param name="NamespaceObjectInstanceType" expression="${NamespaceObjectInstanceType.Infrastructure}"/>
             <param name="ant.build" expression="${object_modeling_build}"/>
-            <param name="ant.target" expression="system_cache__appinfo:new_object_by_prototype"/>
+            <param name="ant.target" expression="p5omn:new_object_by_prototype"/>
             <!--<param name="ant.build" expression="${object_modeling_new}"/>--> <!-- location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml" -->
-            <!--<param name="ant.target" expression="system_cache__appinfo:object_modeling_new_by_xml_schema"/>-->
+            <!--<param name="ant.target" expression="p5omn:object_modeling_new_by_xml_schema"/>-->
             
             <param name="object_modeling.Error.Handling" expression="${object_modeling.Error.Handling.Infrastructure}"/>
             <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
@@ -253,14 +264,16 @@
         </xslt>
         <!--<loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>
         <echo message="${new_object_by_prototype.xml_result}"/>-->
-        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.Infrastructure}" inheritall="false"/>
+        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.Infrastructure}" inheritall="false">
+            <property name="system_ui_info_speech" value="${system_ui_info_speech}"/>
+        </ant>
     </target>
     
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new.build_default" depends="read_build_properties" description="ANT_TARGET new object by using prototype from Types with merging using regex select and igronre" >
-        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
+    <target name="p5omn:object_modeling_new.build_default" depends="read_build_properties" description="ANT_TARGET new object by using prototype from Types with merging using regex select and igronre" >
+        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="p5omn:default_db_get_xml_schema_if_not_exists"/>
         <ant antfile="${build_root.xml}" target="procesy5_system_schema.xml" />
         
         <property name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
@@ -298,9 +311,9 @@
             <param name="NamespaceDatabaseStorageDefinitionPrefix" expression="${NamespaceDatabaseStorageDefinitionPrefix}"/>
             <param name="NamespaceObjectInstanceType" expression="${NamespaceObjectInstanceType}"/>
             <param name="ant.build" expression="${object_modeling_build}"/>
-            <param name="ant.target" expression="system_cache__appinfo:new_object_by_prototype"/>
+            <param name="ant.target" expression="p5omn:new_object_by_prototype"/>
             <!--<param name="ant.build" expression="${object_modeling_new}"/>--> <!-- location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml" -->
-            <!--<param name="ant.target" expression="system_cache__appinfo:object_modeling_new_by_xml_schema"/>-->
+            <!--<param name="ant.target" expression="p5omn:object_modeling_new_by_xml_schema"/>-->
             
             <param name="object_modeling.Error.Handling" expression="${object_modeling.Error.Handling}"/>
             <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
@@ -321,8 +334,8 @@
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new.build_Empty" depends="read_build_properties" description="ANT_TARGET @2017-12-19 dobrze zrobilo prototypy z infrastr + brakujace elementy + simpleTYpe z default.db. new object by using prototype from Types with merging using regex select and igronre" >
-        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
+    <target name="p5omn:object_modeling_new.build_Empty" depends="read_build_properties" description="ANT_TARGET @2017-12-19 dobrze zrobilo prototypy z infrastr + brakujace elementy + simpleTYpe z default.db. new object by using prototype from Types with merging using regex select and igronre" >
+        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="p5omn:default_db_get_xml_schema_if_not_exists"/>
         <!--<ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />-->
         
         <property name="prototype_object_namespace.Empty" value="https://biuro.biall-net.pl/wfs/default_db/Types/Empty.xsd"/>
@@ -350,7 +363,7 @@
             TargetNamespaceBindingsApi = ${TargetNamespaceBindingsApi.Empty}
             NamespaceDatabaseStorageDefinitionPrefix = ${NamespaceDatabaseStorageDefinitionPrefix.Empty}
             NamespaceObjectInstanceType = ${NamespaceObjectInstanceType.Empty}
-            ant.target = system_cache__appinfo:object_modeling_new_by_xml_schema
+            ant.target = p5omn:object_modeling_new_by_xml_schema
             object_modeling.Error.Handling = ${object_modeling.Error.Handling.Empty}
             external_schema_table.path = ${external_schema_table.path}
             procesy5_system_schema_collection_dir = ${basedir}
@@ -376,9 +389,9 @@
             <param name="NamespaceDatabaseStorageDefinitionPrefix" expression="${NamespaceDatabaseStorageDefinitionPrefix.Empty}"/>
             <param name="NamespaceObjectInstanceType" expression="${NamespaceObjectInstanceType.Empty}"/>
             <param name="ant.build" expression="${object_modeling_build}"/>
-            <param name="ant.target" expression="system_cache__appinfo:new_object_by_prototype"/>
+            <param name="ant.target" expression="p5omn:new_object_by_prototype"/>
             <!--<param name="ant.build" expression="${object_modeling_new}"/>--> <!-- location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml" -->
-            <!--<param name="ant.target" expression="system_cache__appinfo:object_modeling_new_by_xml_schema"/>-->
+            <!--<param name="ant.target" expression="p5omn:object_modeling_new_by_xml_schema"/>-->
             
             <param name="object_modeling.Error.Handling" expression="${object_modeling.Error.Handling.Empty}"/>
             <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
@@ -398,8 +411,8 @@
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new.build_from_default_db_schema" depends="read_build_properties" description="ANT_TARGET @2017-12-27 do tworzenia z bazy danych default_db.xsd brakujacych struktur (todo tu powinny tez byc refy)" >
-        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
+    <target name="p5omn:object_modeling_new.build_from_default_db_schema" depends="read_build_properties" description="ANT_TARGET @2017-12-27 do tworzenia z bazy danych default_db.xsd brakujacych struktur (todo tu powinny tez byc refy)" >
+        <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="p5omn:default_db_get_xml_schema_if_not_exists"/>
         <ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />
         
         <exec executable="say" spawn="true" failifexecutionfails="false">
@@ -431,7 +444,7 @@
             procesy5_system_schema.xml = ${procesy5_system_schema.xml}; 
             default_db.xml = ${default_db.xml};
             external_schema_table.path = ${external_schema_table.path}
-            ant.target = system_cache__appinfo:object_modeling_new_by_xml_schema
+            ant.target = p5omn:object_modeling_new_by_xml_schema
             basedir = ${basedir} <!-- one level deeper -->
             object_modeling_new = ${object_modeling_new} <!-- location="${basedir}/WPS_Functions/object_modeling_new/build_object_modeling_new.xml" -->
             procesy5_system_schema_collection_dir = ${basedir}
@@ -489,19 +502,28 @@
         </xslt>
         <!--<loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>
         <echo message="${new_object_by_prototype.xml_result}"/>-->
-        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.default_db_schema}" inheritall="false"/>
+        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.default_db_schema}" inheritall="false">
+            <property name="system_ui_info_speech" value="${system_ui_info_speech}"/>
+        </ant>
     </target>
     
     
     
-    <target name="system_cache__appinfo:object_modeling_new.build_from_typespecial_refs" depends="read_build_properties" description="ANT_TARGET @2017-12-27 do tworzenia z typespecial to ref przetworzen zapisanych w default_db/id_zasob_36.xsd etc" >
+    <target name="p5omn:object_modeling_new.build_from_typespecial_refs" depends="read_build_properties" description="ANT_TARGET @2017-12-27 do tworzenia z typespecial to ref przetworzen zapisanych w default_db/id_zasob_36.xsd etc" >
         <ant antfile="${build_object_modeling_by_default_db_xml_schema.xml}" target="system_cache__appinfo:default_db_get_xml_schema_if_not_exists"/>
-        <ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />
+        <!--<ant antfile="${build_root.xml}" target="new-schema-with-ID-to-move-and-rename-to-xsd" />-->
         
-        <exec executable="say" spawn="true" failifexecutionfails="false">
+        <copy file="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/table/USERS2_MARKETING.xsd" tofile="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/table/USERS2_MARKETING.x_s_d.${p5omn:current.timestamp}"/><!-- debut -->
+        <!--<exec executable="say" spawn="true" failifexecutionfails="false">
             <arg line="-v alex"/>
             <arg line="generating new object by prototype by type special references"/>
-        </exec>
+        </exec>-->
+        
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="generating new object by prototype by type special references" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>
+        
         <!-- @2017-12-27 settings to create refs from typespecials 
             -Dprototype_object_namespace=https://biuro.biall-net.pl/wfs/default_db/table/Rozdzielcza_Wykop_przedmiar_na_mikrorurki.xsd 
             -Dnew_object_namespace=https://biuro.biall-net.pl/wfs/default_db/table/Rozdzielcza_Wykop_przedmiar_na_mikrorurki.xsd 
@@ -514,7 +536,7 @@
         <property name="NamespaceDatabaseStorageDefinitionPrefix.typespecial_refs" value="default_db"/>
         <property name="NamespaceObjectInstanceType.typespecial_refs" value="table"/>
         <property name="NamespaceObjectInstanceTable_RegexString.ignore.typespecial_refs" value="(bravecare__sys_users)|(^_.*)|(ITEM_LINK_TYPES)|(F_ID)|(F_GID.*)|(D_P)|(COLUMNS)|(BI_audit_KW_requested_person_copy)|(.*.copy_energa.*)|(BI_audit_ENERGA_RUM_KONTRAHENCI_copy)|(.*energa_copy.*)|(BI_audit_ALL.*)|(BILLING_USERS_OLD)|(BILLING_USERS_ADD_OLD)|(AUTOSHAPE.*)|(ATTACHMENTS)|(ADMIN_USERS__REF__LOCAL_EMAIL)|(.*to_delete.*)|(.*temp.*)|(tmp.*)|(.*test.*)|(.*otomin.*)|(.*kasacja.*)|(.*default_default_objects.*)|(.*arskom.*)|(.*aneksy.*)|(ams.*)|(.*zasob_path_idx.*)|($_.*)|(s2sua)|(seq)|(stats_BILLS_FVAT_POS)|(phone)|(_remote_L1_BILLS_KP)|(_project_path_idx)|(__RAPORT_Rozdzielcza_Raport)|(.*TEMP.*)|(.*_SYNC_.*)|(.*_backup_.*)|(.*__INSTANCE_CLOSURE.*)|(CRM_LISTA_ZASOBOW_tree)|(.*_idx.*)|(.*_prim.*)|(CRM_REF_CONFIG)|(F_AREA.*)|($F_.*)|(ID_OFFERS)|(IN7_CECHY)|(.*_TEST_.*)|(IN7_PRODUKTY_CECHY)|(INDEKS24)|(INVENTORY)|(ITEM_LINKS.*)|(LDAP_GROUPS)|(.*_old.*)|(stats_BILLS_FVAT_POS)"/>
-        <property name="NamespaceObjectInstanceTable_RegexString.typespecial_refs" value="(.*ozdzielcza_Transmisje.*)"/> <!-- ozdzielcza_ (ozdzielcza_)|(TELBOXES) -->
+        <property name="NamespaceObjectInstanceTable_RegexString.typespecial_refs" value="USERS2_MARKETING$"/> <!-- ozdzielcza_ (ozdzielcza_)|(TELBOXES) -->
         <property name="targetNamespace.base.typespecial_refs" value="https://biuro.biall-net.pl/api/36"/> <!-- which source schema to use (currently force to ${default_db.xml} )-->
         <property name="build_object_modeling_build_infrastructure_child.xml.typespecial_refs" value="${object_modeling_new_basedir_temp}/build_object_modeling_build_infrastructure_child.typespecial_refs.xml"/>
         <property name="object_modeling.Error.Handling.typespecial_refs" value="OVERWRITE"/>
@@ -522,6 +544,7 @@
         <property name="suppres_saving.typespecial_refs" value=""/>
         
         
+        
         <echo>#196
             object_modeling_new_basedir= ${object_modeling_new_basedir};
             procesy5_system_schema.xml = ${procesy5_system_schema.xml}; 
@@ -547,7 +570,7 @@
             object_modeling.Error.Handling = ${object_modeling.Error.Handling.typespecial_refs}
             merge_priority = ${merge_priority.typespecial_refs}
             suppres_saving" = ${suppres_saving.typespecial_refs}
-            
+            detect_resource_type.local = ${detect_resource_type.local}
         </echo>
         
         <xslt basedir="./" style="${build_object_modeling_new.child.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${build_object_modeling_build_infrastructure_child.xml.typespecial_refs}" force="yes" >
@@ -581,11 +604,16 @@
             <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd}match_complexTypes" expression="true"/>
             <param name="suppres_saving" expression="${suppres_saving.typespecial_refs}"/>
             <param name="object_modeling.Error.Handling" expression="${object_modeling.Error.Handling.typespecial_refs}"/>
+            <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local" expression="${detect_objects_parent_relations.local}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
             <classpath location="/opt/local/share/java/saxon9he.jar"/>
         </xslt>
         <!--<loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>
         <echo message="${new_object_by_prototype.xml_result}"/>-->
-        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.typespecial_refs}" inheritall="false"/>
+        <ant antfile="${build_object_modeling_build_infrastructure_child.xml.typespecial_refs}" inheritall="false">
+            <property name="system_ui_info_speech" value="${system_ui_info_speech}"/>
+        </ant>
     </target>
     
     
@@ -602,233 +630,6 @@
             <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
             <param name="NamespaceObjectInstanceType" value="table"/>
         </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="CRM_PRZYPADEK"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="CRM_IMAGE"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="SALES_PLAN"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="Rozdzielcza_lokalizacje"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Infrastructure.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="CRM_LISTA_ZASOBOW_OFFERS"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new">
-            <param name="NamespaceObjectInstanceTable" value="DEALS_TABLE"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KW_requested"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BADANIA_W_TERENIE"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_CEIDG"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_CEIDG_pelnomocnicy"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_CEIDG_powiazania"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_PRACOWNICY"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_PRACOWNICY_adresy"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_PRACOWNICY_adresy_copy"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_RUM_KONTRAHENCI"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_RUM_UMOWY"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        -->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS_person"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS_MSIG"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS_MSIG_poz"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_PRACOWNICY_group"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_adres"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS_PKD"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-      <!--  <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG_address"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG_person"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG_company"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>
-        -->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG_name"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_MSIG_PKD"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_KRS_MSIG_poz"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
-        
-        <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
-            <param name="NamespaceObjectInstanceTable" value="BI_audit_ENERGA_FAKTURY"/>
-            <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
-            <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
-            <param name="NamespaceDatabaseStorageDefinitionPrefix" value="default_db"/>
-            <param name="NamespaceObjectInstanceType" value="table"/>
-        </antcall>-->
         <!--<antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
             <param name="NamespaceObjectInstanceTable" value="BI_audit_taxpayer"/>
             <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd"/>
@@ -864,7 +665,7 @@
         <echo>targetNamespace.base to ${targetNamespace.base}</echo>
        
         
-        <antcall target="system_cache__appinfo:object_modeling_new_by_xml_schema">
+        <antcall target="p5omn:object_modeling_new_by_xml_schema">
             <param name="NamespaceObjectInstanceTable" value="Rozdzielcza_Kabel_swiatl_obcy"/>
             <param name="prototype_object_namespace" value="https://biuro.biall-net.pl/wfs/default_db/Types/infrastructure.xsd"/>
             <param name="TargetNamespaceBindingsApi" value="https://biuro.biall-net.pl/wfs"/>
@@ -884,7 +685,7 @@
     
     
     <!--TODO TO TEST FIX ETC-->
-    <target  name="system_cache__appinfo:object_modeling_new_add_new_table"  depends="read_build_properties,system_cache__appinfo:object_modeling_new_in_schema_check,system_cache__appinfo:object_modeling_new_in_xsd_check" description="TODO Create new schema (empty table - not working currently)">
+    <target  name="p5omn:object_modeling_new_add_new_table"  depends="read_build_properties,p5omn:object_modeling_new_in_schema_check,p5omn:object_modeling_new_in_xsd_check" description="TODO Create new schema (empty table - not working currently)">
         <input addproperty="TargetNamespaceBindingsApi" defaultvalue="https://biuro.biall-net.pl/wfs"/> <!-- root namespace API -->
         <input addproperty="NamespaceDatabaseStorageDefinitionPrefix" defaultvalue="default_db"/>
         <input addproperty="NamespaceObjectInstanceType" defaultvalue="table"/>
@@ -917,8 +718,8 @@
         </xslt>
     </target>
     
-    <!-- depends="system_cache__appinfo:object_modeling_new" test off -->
-    <target  name="system_cache__appinfo:object_modeling_new_by_xml_schema" depends="read_build_properties,system_cache__appinfo:object_modeling_new_in_schema_check,system_cache__appinfo:object_modeling_new_in_xsd_check"   description="TESTING Create new schema based on default_db.xml(xsd) + prototype">
+    <!-- depends="p5omn:object_modeling_new" test off -->
+    <target  name="p5omn:object_modeling_new_by_xml_schema" depends="read_build_properties,p5omn:object_modeling_new_in_schema_check,p5omn:object_modeling_new_in_xsd_check"   description="TESTING Create new schema based on default_db.xml(xsd) + prototype">
         <input addproperty="prototype_object_namespace" defaultvalue="https://biuro.biall-net.pl/wfs/default_db/Types/Default.xsd" />
         <input addproperty="NamespaceDatabaseStorageDefinitionPrefix" defaultvalue="default_db" />
         <antcall target="template_object.xml_location.xml" inheritall="yes" inheritrefs="yes"/>
@@ -976,20 +777,20 @@
         <echo message="${new_object_by_prototype_result.xml_loadfile}"/>
     </target>
     
-    <target name="system_cache__appinfo:object_modeling_new_add_child_element" description="TODO add new child element"/>
-    <target name="system_cache__appinfo:object_modeling_new_add_root_element_by_restriction" description="TODO add new instance element based on existient complexType"/>
-    <target name="system_cache__appinfo:object_modeling_new_add_root_element_by_aliasing" description="TODO add new instance element based on existient complexType"/>
+    <target name="p5omn:object_modeling_new_add_child_element" description="TODO add new child element"/>
+    <target name="p5omn:object_modeling_new_add_root_element_by_restriction" description="TODO add new instance element based on existient complexType"/>
+    <target name="p5omn:object_modeling_new_add_root_element_by_aliasing" description="TODO add new instance element based on existient complexType"/>
     
-    <target name="system_cache__appinfo:object_modeling_new_add_child_element_reference" description="TODO add new element to reference"/>
+    <target name="p5omn:object_modeling_new_add_child_element_reference" description="TODO add new element to reference"/>
     
-    <target name="system_cache__appinfo:object_modeling_new_modify_child_element_simpleType" description="TODO set simpleType"/>
-    <target name="system_cache__appinfo:object_modeling_new_add_simpleType" description="TODO add new simpleType"/>
-    <target name="system_cache__appinfo:object_modeling_new_add_simpleType_derived" description="TODO add new simpleType based by existient simpleType adding new type enum to parent and single value to child"/>
+    <target name="p5omn:object_modeling_new_modify_child_element_simpleType" description="TODO set simpleType"/>
+    <target name="p5omn:object_modeling_new_add_simpleType" description="TODO add new simpleType"/>
+    <target name="p5omn:object_modeling_new_add_simpleType_derived" description="TODO add new simpleType based by existient simpleType adding new type enum to parent and single value to child"/>
     
-    <target name="system_cache__appinfo:object_modeling_new_modify_child_element_set_simpleType_to_parent" description="TODO to add simpleType to complexType - first parent complexType of parent simpleType than to all complexType"/>
-    <target name="system_cache__appinfo:object_modeling_new_modify_child_element_set_simpleType_to_derived" description="TODO controlled allow set simpleType to derived complexType by controlling derivation"/>
+    <target name="p5omn:object_modeling_new_modify_child_element_set_simpleType_to_parent" description="TODO to add simpleType to complexType - first parent complexType of parent simpleType than to all complexType"/>
+    <target name="p5omn:object_modeling_new_modify_child_element_set_simpleType_to_derived" description="TODO controlled allow set simpleType to derived complexType by controlling derivation"/>
     <!-- occurs -->
-    <target name="system_cache__appinfo:object_modeling_new_modify_child_element_set_Occurs_to_parent" description="TODO modify max/min Occurs to parent complexType and set all derived"/>
-    <target name="system_cache__appinfo:object_modeling_new_modify_child_element_set_Occurs_to_derived" description="TODO modify max/min Occurs to derived with controlling of derivation tree"/>
+    <target name="p5omn:object_modeling_new_modify_child_element_set_Occurs_to_parent" description="TODO modify max/min Occurs to parent complexType and set all derived"/>
+    <target name="p5omn:object_modeling_new_modify_child_element_set_Occurs_to_derived" description="TODO modify max/min Occurs to derived with controlling of derivation tree"/>
   
 </project>

+ 32 - 0
SE/schema/WPS_Functions/object_modeling_new/object_modeling_new.xsd

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+    xmlns:p5om="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"
+    xmlns:p5omn="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    targetNamespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling_new/object_modeling_new.xsd"
+    vc:minVersion="1.1" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning">
+    <xs:annotation>
+        <xs:documentation>To define main function modelling for merging objects into system schema parameters</xs:documentation>
+    </xs:annotation>
+    <xs:import schemaLocation="../object_modeling/object_modeling.xsd"
+        namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_modeling/object_modeling.xsd"/>
+    <xs:element name="object_modeling_new.build_from_typespecial_refs">
+        <xs:annotation>
+            <xs:documentation>ANT_TARGET @2017-12-27 do tworzenia z typespecial to ref przetworzen zapisanych w default_db/id_zasob_36.xsd etc</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:attribute ref="p5om:TargetNamespaceBindingsApi.typespecial_refs"/>
+            <xs:attribute ref="p5om:NamespaceObjectInstanceType.typespecial_refs"/>
+            <xs:attribute ref="p5om:NamespaceDatabaseStorageDefinitionPrefix.typespecial_refs"/>
+            <xs:attribute
+                ref="p5om:NamespaceObjectInstanceTable_RegexString.ignore.typespecial_refs"/>
+            <xs:attribute ref="p5om:NamespaceObjectInstanceTable_RegexString.typespecial_refs"/>
+            <xs:attribute ref="p5om:targetNamespace.base.typespecial_refs"/>
+            <xs:attribute
+                ref="p5om:build_object_modeling_build_infrastructure_child.xml.typespecial_refs"/>
+            <xs:attribute ref="p5om:object_modeling.Error.Handling.typespecial_refs"/>
+            <xs:attribute ref="p5om:merge_priority.typespecial_refs"/>
+            <xs:attribute ref="p5om:suppres_saving.typespecial_refs"/>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>

+ 12 - 5
SE/schema/WPS_Functions/stock_optimize_calculations_raszczyk/build_stock_optimize_calculations_raszczyk.xml

@@ -4,10 +4,17 @@
     basedir="../../." name="build_stock_optimize_calculations_raszczyk" default="stock_optimize_calculations_raszczyk">
     <description> na potrzeby raszczyk do optymalizacji dostaw towarow do sklepow oraz w celu analizy danych poszczegolnych sklepow</description>
     
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <property name="WPS_Functions" location="${WPS_Functions.basedir}"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions.build}"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${WPS_Functions.properties}"/>
+    
     <!-- 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"/>
+    <!--<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  -->
     
     
@@ -41,8 +48,8 @@
     
   
     <target name="read_build_properties">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
     <target name="system_cache__appinfo:build_stock_optimize_calculations_raszczyk.create_tempdir">

+ 31 - 0
SE/schema/WPS_Functions/system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." name="p5suis.PRODUCT">
+    
+    <include file="../build.WPS_Functions.PRODUCT.xml"/>
+    
+    <condition property="p5suis.PRODUCT.ifdef.parent" taskname="p5suis.parent.PRODUCT.ifdef">
+        <isset property="WPS_Functions.PRODUCT.name"/>
+    </condition>
+    
+   
+    <property name="p5suis.PRODUCT.name" value="${WPS_Functions.PRODUCT.name}.system_ui_info_speech"/>
+    <property name="p5suis.PRODUCT.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}"/>
+    
+    <property name="p5suis.basedir"     value="${WPS_Functions.basedir}/system_ui_info_speech"/>
+    <property name="p5suis.build"  value="${p5suis.basedir}/build_system_ui_info_speech.xml"/>
+    <property name="p5suis.repository"  value="${p5suis.basedir}/system_ui_info_speech_repository"/>
+    <property name="p5suis.temp"        value="${p5suis.basedir}/temp"/>
+    
+    <property name="p5suis.pid" location="${p5suis.repository}/p5suis.speech.pid"/>
+    
+    
+    <property name="p5suis.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${p5suis.PRODUCT.name}.log"/>
+    <property name="p5suis.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${p5suis.PRODUCT.name}.log"/>
+    
+    
+    
+    <target name="p5suis.parent.PRODUCT.ifdef" unless="WPS_Functions.PRODUCT.ifdef.parent">
+        <fail>There is not set correct parent PRODUCT from expected file="../build.WPS_Functions.PRODUCT.xml" </fail>
+    </target>
+    
+</project>

+ 312 - 42
SE/schema/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml

@@ -7,109 +7,238 @@
         To allow functions to get GUI information also speech by system say command
     </description>
     
+    <tstamp>
+        <format property="p5suis:last.minute" pattern="MM/dd/yyyy hh:mm a"  offset="-1" unit="minute"/>
+        <format property="p5suis:current.timestamp" pattern="yyyy-dd-MM-hh-mm-a"  />
+    </tstamp>
     
+    <include file="build.system_ui_info_speech.PRODUCT.xml"/>
+    <include file="${build_SE.SYSTEM.build}" as="SYSTEM"/>
+   
     <!-- 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"/>
+   <!-- <property name="WPS_Functions" value="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" value="${WPS_Functions}/build_WPS_Functions.xml"/> <!-\- call it to get properties -\->
+    <property name="build_WPS_Functions.xml.properties" value="${build_WPS_Functions.xml}.properties"/>-->
     <!-- eof modules WPS_Functions  -->
     
-    <property name="system_ui_info_speech" location="${basedir}/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml"/>
-    <property name="system_ui_info_speech_basedir" location="${basedir}/WPS_Functions/${ant.project.name}"  />                         
-    <property name="p5suis:repository" location="${basedir}/WPS_Functions/${ant.project.name}/system_ui_info_speech_repository"  />
-        <property name="system_ui_info_speech_basedir_repository" location="${p5suis:repository}"  />
+    <property name="system_ui_info_speech" value="${basedir}/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml"/>
+    <property name="system_ui_info_speech_basedir" value="${basedir}/WPS_Functions/${ant.project.name}"  />                         
+    <property name="p5suis:repository" value="${basedir}/WPS_Functions/${ant.project.name}/system_ui_info_speech_repository"  />
+        <property name="system_ui_info_speech_basedir_repository" value="${p5suis:repository}"  />
     
-    <property name="system_ui_info_speech_basedir_temp" location="${system_ui_info_speech_basedir}/temp"  />
+    <property name="system_ui_info_speech_basedir_temp" value="${system_ui_info_speech_basedir}/temp"  />
+    <property name="p5suis.say_queue_dir" value="${system_ui_info_speech_basedir_temp}/p5suis.say_queue_dir"  />
     
-    <property name="build_system_ui_info_speech.child" location="${system_ui_info_speech_basedir_temp}/build_system_ui_info_speech.child.xml"/>
-    <property name="build_system_ui_info_speech.child.xsl" location="${system_ui_info_speech_basedir}/build_system_ui_info_speech.child.xsl"/>
+    <property name="build_system_ui_info_speech.child" value="${system_ui_info_speech_basedir_temp}/build_system_ui_info_speech.child.xml"/>
+    <property name="build_system_ui_info_speech.child.xsl" value="${system_ui_info_speech_basedir}/build_system_ui_info_speech.child.xsl"/>
     
-    <property name="build_system_ui_info_speech.childproperties" location="${WPS_Functions.childproperties}/build_system_ui_info_speech.properties"/>
+    <property name="build_system_ui_info_speech.childproperties" value="${WPS_Functions.childproperties}/build_system_ui_info_speech.properties"/>
   
   
-    <property name="system_ui_info_speech.xsl" location="${system_ui_info_speech_basedir}/system_ui_info_speech.xsl"/>
-    <property name="p5suis:speech.pid" value="${system_ui_info_speech_basedir_repository}/p5suis:speech.pid" />
+    <property name="system_ui_info_speech.xsl" value="${system_ui_info_speech_basedir}/system_ui_info_speech.xsl"/>
+    <property name="p5suis:speech.pid" location="${system_ui_info_speech_basedir_repository}/p5suis.speech.pid" />
+    
     
+    <property name="psuis.addToLaunchctl.header.plist" value="${system_ui_info_speech_basedir}/psuis.addToLaunchctl.header.plist.xml"/>
+    <property name="psuis.addToLaunchctl.plistFile.StartInterval" value="15"/>
+  
+    <property name="p5suis:read.info.about.file.changes.prepared.timestamp" value="${system_ui_info_speech_basedir_repository}/p5suis:read.info.about.file.changes.prepared.timestamp"/>
+    <property name="p5suis:read.info.about.file.changes.informed.timestamp" value="${system_ui_info_speech_basedir_repository}/p5suis:read.info.about.file.changes.informed.timestamp"/>
+    
+    <property name="psuis.addToLaunchctl.plistFile.installed" value="${system_ui_info_speech_basedir_repository}/psuis.addToLaunchctl.plistFile.installed"/>
     
     <target name="write_child_props_to_config_dir" depends="read_build_properties">
-        <echoproperties destfile="${build_system_ui_info_speech.childproperties}"/>
+        <echoproperties destfile="${build_system_ui_info_speech.childproperties}" />
     </target>
     
     <target name="system_ui_info_speech_create_dirs">
         <mkdir dir="${system_ui_info_speech_basedir_temp}"/>
+        <mkdir dir="${p5suis.say_queue_dir}"/>
         <mkdir dir="${system_ui_info_speech_basedir_repository}"/>
     </target>
     
     
     <target name="build_WPS_Functions.xml.properties.test" >
         <condition property="build_WPS_Functions.xml.properties.cond" taskname="build_WPS_Functions.xml.properties.cond">
-            <or>
+            <and>
                 <available file="${build_WPS_Functions.xml.properties}"/>
                 <not><contains string="${php_session_id}" substring="'php_session_id'"/></not>
-            </or>
+            </and>
         </condition>
     </target>
     
-    <target name="build_WPS_Functions.xml.properties.cond" depends="build_WPS_Functions.xml.properties.test,build_WPS_Functions.xml.properties.fail,build_WPS_Functions.xml.properties.ok"/>
+    <target name="build_WPS_Functions.xml.properties.cond" depends="build_WPS_Functions.xml.properties.test,build_WPS_Functions.xml.properties.fail,build_WPS_Functions.xml.properties.ok">
+        <echo>#64 debug build_WPS_Functions.xml.properties.cond = ${build_WPS_Functions.xml.properties.cond}
+            {php_session_id} ${php_session_id}
+        </echo>
+    </target>
     
-    <target name="build_WPS_Functions.xml.properties.fail"  unless="${build_WPS_Functions.xml.properties.cond}">
-        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+    <target name="build_WPS_Functions.xml.properties.fail"  unless="build_WPS_Functions.xml.properties.cond">
+        <ant antfile="${WPS_Functions.build}" target="save_build_properties"/>
+        <echo>#67 runned creting of ${WPS_Functions.properties}, now we read it!</echo>
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
-    <target name="build_WPS_Functions.xml.properties.ok"  if="${build_WPS_Functions.xml.properties.cond}">
-        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+    <target name="build_WPS_Functions.xml.properties.ok"  if="build_WPS_Functions.xml.properties.cond">
+        <loadproperties srcfile="${WPS_Functions.properties}"/>
     </target>
     
     <target name="read_build_properties" depends="build_WPS_Functions.xml.properties.cond"/>
        
     
+    <target name="p5suis:read.info.about.file.changes" description="to inform about file changes">
+       <!-- <property name="p5suis:read.info.about.file.changes.prepared.timestamp" value="${system_ui_info_speech_basedir_repository}/p5suis:read.info.about.file.changes.prepared.timestamp"/>
+        <property name="p5suis:read.info.about.file.changes.informed.timestamp" value="${system_ui_info_speech_basedir_repository}/p5suis:read.info.about.file.changes.informed.timestamp"/>-->
+        
+        
+        
+        
+    </target>
+    
+    <target name="p5suis:read.info.about.file.changes.fresh.file.informed.exist.test">
+        <condition property="p5suis:read.info.about.file.changes.fresh.file.informed.exist.test" taskname="p5suis:read.info.about.file.changes.fresh.file.informed.exist.condition">
+            <available file="${p5suis:read.info.about.file.changes.informed.timestamp}"/>
+        </condition>
+    </target>
+    
+    
+    <target name="p5suis:read.info.about.file.changes.fresh.file.informed.exist.condition" description="detect if anytime changes were informed">
+        
+    </target>
+    
+    <target name="p5suis:read.info.about.file.changes.fresh.condition" description="to detect if changes were made">
+        <tempfile property="p5suis:read.info.about.file.changes.current.timestamp" deleteonexit="true" destdir="${system_ui_info_speech_basedir_temp}" prefix="p5suis.read.info.about.file.changes.current.timestamp" suffix=".touch"/>
+        
+        <!--<uptodate property="p5suis:write_pid.delete_old_stuck.cond"  targetfile="${p5suis:read.info.about.file.changes.informed.timestamp}" >
+            <srcfiles file="${p5suis:read.info.about.file.changes.prepared.timestamp}"/>
+        </uptodate>-->
+    </target>
+    
     
     <target name="clean" description="Clean all output and temp files">
         <delete dir="${system_ui_info_speech_basedir_temp}" failonerror="false"/>
         <delete dir="${system_ui_info_speech_basedir_repository}" failonerror="false"/>
+        <delete dir="${p5suis.say_queue_dir}" failonerror="false"/>
     </target>
     
     <target name="clean.temp" description="Clean all output and temp files">
         <delete dir="${system_ui_info_speech_basedir_temp}" failonerror="false"/>
+        <delete dir="${p5suis.say_queue_dir}"/>
     </target>
     
     
+    <target name="p5suis:write_pid.delete_old_stuck" if="p5suis:write_pid.delete_old_stuck.cond.file" unless="p5suis:write_pid.delete_old_stuck.cond" > <!-- if="${p5suis:write_pid.delete_old_stuck.cond}" -->
+        <echo level="verbose"> if="p5suis:write_pid.delete_old_stuck.cond.file" unless="p5suis:write_pid.delete_old_stuck.cond"
+           #129 Deleting old stuck $p5suis:speech.pid ${p5suis:speech.pid} before ${p5suis:last.minute} for ${p5suis:write_pid.delete_old_stuck.cond}</echo>
+        <!--<antcall target="p5suis:say_to_queue">
+            <param name="p5suis:say_text" value="System speech  Deleting old stuck PID. "/>
+        </antcall>-->
+        <condition property="p5suis:write_pid.delete_old_stuck.debug" taskname="p5suis:say_from_queue.task.run.immediate">
+            <available file="${p5suis:speech.pid}"/>
+        </condition>        
+        <delete file="${p5suis:speech.pid}"/>
+        
+    </target>
+    
+    <!--<target name="p5suis:write_pid.delete_old_stuck.sayonce" depends="p5suis:write_pid.delete_old_stuck">
+        <antcall target="p5suis:write_pid.delete_old_stuck"/>
+    </target>-->
     
     <target name="p5suis:write_pid.test">
-        <condition property="p5suis:write_pid.cond" taskname="p5suis:write_pid.cond">
-            <available file="${p5suis:speech.pid}" />
-        </condition>
+        <!--<fileset  file="${p5suis:speech.pid}" id="p5suis:speech.pid.id" dir="${system_ui_info_speech_basedir_repository}">
+            <date datetime="${p5suis:last.minute}" when="before" />
+        </fileset>
+            <property name="p5suis:speech.pid.id" refid="p5suis:speech.pid.id"/>-->
+            <tempfile property="p5suis:speech.pid.timestamp" deleteonexit="true" destdir="${system_ui_info_speech_basedir_temp}" prefix="p5suisspeech.pid.timestamp" suffix=".touch"/>
+            <touch file="${p5suis:speech.pid.timestamp}" datetime="${p5suis:last.minute}" verbose="false"/>
+        
+        <uptodate property="p5suis:write_pid.delete_old_stuck.cond"  targetfile="${p5suis:speech.pid}" >
+            <srcfiles file="${p5suis:speech.pid.timestamp}"/>
+            </uptodate>
+               <echo level="verbose">#152 We created tempfile property="p5suis:speech.pid.timestamp"=${p5suis:speech.pid.timestamp}
+                deleteonexit="true" destdir="${system_ui_info_speech_basedir_temp}" prefix="p5suisspeech.pid.timestamp" suffix=".touch"
+                with touch file="{p5suis:speech.pid.timestamp}" datetime="p5suis:last.minute{${p5suis:last.minute}}"
+                
+                We checked UPTODATE uptodate (of this file is newer or the same)  
+                targetfile="{p5suis:speech.pid.timestamp}" VS srcfiles p5suis:speech.pid{${p5suis:speech.pid}}
+                with RESULT {p5suis:write_pid.delete_old_stuck.cond}=${p5suis:write_pid.delete_old_stuck.cond}
+              </echo>
+            <condition property="p5suis:write_pid.delete_old_stuck.cond.cond" taskname="p5suis:say_from_queue.task.run.immediate.run">
+                <not><contains string="${p5suis:write_pid.delete_old_stuck.cond}" substring="{p5suis:write_pid.delete_old_stuck.cond}"/></not>
+            </condition>
+            <condition property="p5suis:write_pid.delete_old_stuck.cond.cond" taskname="p5suis:write_pid.task">
+                <not><contains string="${p5suis:write_pid.delete_old_stuck.cond}" substring="{p5suis:write_pid.delete_old_stuck.cond}"/></not>
+            </condition>
+            <!--<echo level="verbose">#163 We CONDITION to taskname "p5suis:write_pid.delete_old_stuck" checked if property {p5suis:write_pid.delete_old_stuck.cond} is set by substring
+                with result {p5suis:write_pid.delete_old_stuck.cond.cond}=${p5suis:write_pid.delete_old_stuck.cond.cond}
+            </echo>-->
+            <condition property="p5suis:write_pid.delete_old_stuck.cond.file" taskname="p5suis:write_pid.delete_old_stuck">
+                <!--<isset property="p5suis:write_pid.delete_old_stuck.cond.file"/>-->
+                <available file="${p5suis:speech.pid}"/>
+            </condition> 
+            <echo level="verbose">#170 We CONDITION to taskname "p5suis:write_pid.delete_old_stuck" check if there is aviable file {p5suis:speech.pid}
+                to property {p5suis:write_pid.delete_old_stuck.cond.file}=${p5suis:write_pid.delete_old_stuck.cond.file`} 
+                which should run unless="{p5suis:write_pid.delete_old_stuck.cond.cond}" if="{p5suis:write_pid.delete_old_stuck.cond.file}"
+                == target name="p5suis:write_pid.delete_old_stuck" unless="${p5suis:write_pid.delete_old_stuck.cond.cond}" if="${p5suis:write_pid.delete_old_stuck.cond.file}
+            </echo>
+        
+            <!--<antcall target="p5suis:write_pid.delete_old_stuck" />-->
+        <!--<antcall target="p5suis:say_from_queue"/>-->
+            <condition property="p5suis:write_pid.cond" taskname="p5suis:write_pid.cond">
+                <available file="${p5suis:speech.pid}" />
+            </condition>
+            <echo level="verbose">#178 we CONDITION again to taskname="p5suis:write_pid.cond" if is aviable {p5suis:speech.pid}
+                to property {p5suis:write_pid.cond}=${p5suis:write_pid.cond}</echo>
     </target>
    
-    <target name="p5suis:write_pid.cond" depends="p5suis:write_pid.test,p5suis:write_pid.fail,p5suis:write_pid.ok"/>
+    <target name="p5suis:write_pid.cond" depends="p5suis:write_pid.test,p5suis:write_pid.fail,p5suis:write_pid.ok,p5suis:write_pid.delete_old_stuck"/>
         
-    <target name="p5suis:write_pid.ok"  if="${p5suis:write_pid.cond}" description="Pid exists - it is not OK">
-        <echo>#85 PID exists in $p5suis:speech.pid - TODO check if it is alive - if alive - system is talking ! ${$p5suis:speech.pid} </echo>
+    <target name="p5suis:write_pid.ok"  if="p5suis:write_pid.cond" description="Pid exists - it is not OK">
+        <loadfile property="p5suis:speech.pid.loadfile" srcfile="${p5suis:speech.pid}" quiet="true" />
+        <echo level="warning">
+            #85 PID exists in $p5suis:speech.pid - TODO check if it is alive - if alive - system is talking ! ${$p5suis:speech.pid} 
+            contents: ${p5suis:speech.pid.loadfile}
+            p5suis:write_pid.delete_old_stuck.cond = ${p5suis:write_pid.delete_old_stuck.cond}
+        </echo>
+        <!--<sleep  seconds="2"/>-->
+        <property name="p5suis:write_pid.delete_old_stuck.cond" value="WAS_STUCK"/>
     </target>
     
-    <target name="p5suis:write_pid.fail"  unless="${p5suis:write_pid.cond}" description="Pid not exists - it is OK">
+    <!--<extension-point name="p5suis:write_pid.task.extension" depends="p5suis:write_pid.fail"/>-->
+    
+    <target name="p5suis:write_pid.task" unless="p5suis:write_pid.delete_old_stuck.cond.cond"  extensionOf="p5suis:write_pid.fail" >
+        <echo level="verbose">#207 ? extension-point name="p5suis:write_pid.fail"
+            passed unless="p5suis:write_pid.cond" = ${p5suis:write_pid.cond}
+        </echo>
         <property environment="env" />
         <echoxml file="${p5suis:speech.pid}">
             <speech.pid xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd">
                 ${env.PPID}
+                ${env.$$}
             </speech.pid>
         </echoxml>
+        <property name="p5suis:write_pid.task" value="true"/>
     </target>
+    
+    <extension-point name="p5suis:write_pid.fail" depends="p5suis:write_pid.task"  unless="p5suis:write_pid.cond"  description="Pid not exists - it is OK">
+        <!--<antcall target="p5suis:write_pid.task"/>-->
+    </extension-point>
+    
+    
    
     <target name="p5suis:write_pid" depends="p5suis:write_pid.cond"/>
         
     <target name="p5suis:clean_pid" description="should be called after p5suis:write_pid at the end of the task">
-        <delete file="${p5suis:speech.pid}"/>
-        <echo>#101  $p5suis:speech.pid deleted after finished ant task (${p5suis:speech.pid})</echo>
+        <delete file="${p5suis:speech.pid}" failonerror="false" quiet="true" verbose="false"/>
+        <echo >#101 level="debug" $p5suis:speech.pid deleted after finished ant task (${p5suis:speech.pid})</echo>
     </target>
     
     
      
-    
+    <!-- build_WPS_Functions.xml.properties.cond -->
     <target name="p5suis:say_to_queue" depends="system_ui_info_speech_create_dirs" description="To put some text to say queue">
         <input addproperty="p5suis:say_text"/> <!-- root namespace API -->
-        <tempfile property="p5suis:say_text.file" deleteonexit="no" prefix="say_to_queue_" suffix=".xml" destdir="${system_ui_info_speech_basedir_repository}"/>
+        <tempfile property="p5suis:say_text.file" deleteonexit="no" prefix="${p5suis:current.timestamp}_say_to_queue_" suffix=".xml" destdir="${p5suis.say_queue_dir}"/>
         <echoxml file="${p5suis:say_text.file}" >
             <say xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd">
                 ${p5suis:say_text}
@@ -117,10 +246,10 @@
         </echoxml>
     </target>
     
-    
+    <!-- ,build_WPS_Functions.xml.properties.cond -->
     <target name="p5suis:say_to_queue.PL" depends="system_ui_info_speech_create_dirs" description="To put some text to say queue">
         <input addproperty="p5suis:say_text"/> <!-- root namespace API -->
-        <tempfile property="p5suis:say_text.file" deleteonexit="no" prefix="say_to_queue_" suffix=".xml" destdir="${system_ui_info_speech_basedir_repository}"/>
+        <tempfile property="p5suis:say_text.file" deleteonexit="no" prefix="${p5suis:current.timestamp}_say_to_queue_" suffix=".xml" destdir="${p5suis.say_queue_dir}"/>
         <echoxml file="${p5suis:say_text.file}" >
             <say.PL xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd">
                 ${p5suis:say_text}
@@ -128,21 +257,47 @@
         </echoxml>
     </target>
     
-    <target name="p5suis:say_from_queue" depends="clean.temp,system_ui_info_speech_create_dirs,p5suis:write_pid" description="To say the queue once">
+    <target name="p5suis:say_from_queue" >
+        <condition property="psuis.addToLaunchctl.plistFile.installed.test" taskname="p5suis:say_from_queue.cond">
+            <not><available file="${system_ui_info_speech_basedir_repository}/psuis.addToLaunchctl.plistFile.installed"/></not>
+        </condition>
+        <echo level="verbose">#256 We detected or not aviable file NOT! file="${system_ui_info_speech_basedir_repository}/psuis.addToLaunchctl.plistFile.installed"
+            with result psuis.addToLaunchctl.plistFile.installed.test = ${psuis.addToLaunchctl.plistFile.installed.test} </echo>
+        <antcall target="p5suis:say_from_queue.cond"/>
+    </target>
+    
+    <target name="p5suis:say_from_queue.cond" description="test if is controlled by Launch Daemon" depends="p5suis:say_from_queue.task,p5suis:say_from_queue.task.controlled_by_addToLaunchctl.plistFile"/>
         
-        <fileset id="p5suis:say_queue" dir="${system_ui_info_speech_basedir_repository}" includes="say_to_queue_*.xml" />
+    <target name="p5suis:say_from_queue.task.controlled_by_addToLaunchctl.plistFile"  unless="psuis.addToLaunchctl.plistFile.installed.test">
+            <echo>#247 name="p5suis:say_from_queue.task.controlled_by_addToLaunchctl.plistFile"  unless="{psuis.addToLaunchctl.plistFile.installed.test}"
+                ==  unless="${psuis.addToLaunchctl.plistFile.installed.test}"
+                Controlling for reading queue is from ${p5build_SE.LaunchDaemons}/psuis.addToLaunchctl.plist</echo>
+    </target>
+    
+    
+        
+    <target name="p5suis:say_from_queue.addToLaunchctl.controlled" description="task for controlling queue from LaunchCtl" depends="system_ui_info_speech_create_dirs,p5suis:write_pid,p5suis:say_from_queue.task.run"/>
+    <target name="p5suis:say_from_queue.task" if="psuis.addToLaunchctl.plistFile.installed.test"  depends="p5suis:say_from_queue.task.run" description="To controll pid "/>
+    
+    <target name="p5suis:say_from_queue.task.run"  unless="p5suis:write_pid.delete_old_stuck.cond"  if="p5suis:write_pid.task" depends="system_ui_info_speech_create_dirs,p5suis:write_pid,p5suis:say_from_queue.task.run.immediate"/>
+    
+    <extension-point name="p5suis:say_from_queue.task.run.immediate" unless="p5suis:write_pid.delete_old_stuck.cond"  depends="p5suis:say_from_queue.task.run.immediate.run" description="To say the queue once"/>
+        
+    <target name="p5suis:say_from_queue.task.run.immediate.run"  unless="p5suis:write_pid.delete_old_stuck.cond.cond"  depends="system_ui_info_speech_create_dirs,p5suis:write_pid" description="To say the queue once">
+        <echo level="verbose">#278 {p5suis:write_pid.delete_old_stuck.cond}=${p5suis:write_pid.delete_old_stuck.cond} </echo>
+        <fileset id="p5suis:say_queue" dir="${p5suis.say_queue_dir}" includes="*say_to_queue_*.xml"  />
         
         <property name="p5suis:say_queue" refid="p5suis:say_queue"/>
-        <tempfile property="p5suis:say_queue.file" destdir="${system_ui_info_speech_basedir_temp}" prefix="say_queue.file_" suffix=".xml"/>
+        <tempfile property="p5suis:say_queue.file" destdir="${system_ui_info_speech_basedir_temp}" prefix="say_queue.file_" suffix=".xml" deleteonexit="yes"/>
         <echoxml file="${p5suis:say_queue.file}" namespacepolicy="all">
             <say_queue xmlns="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd">
                    ${p5suis:say_queue}
             </say_queue>
         </echoxml>
         
-        <echo> $p5suis:say_queue ${p5suis:say_queue}</echo>
+        <echo level="debug"> $p5suis:say_queue ${p5suis:say_queue}</echo>
         
-        <tempfile property="p5suis:build_say_from_queue.xml" destdir="${system_ui_info_speech_basedir_temp}" prefix="build_say_from_queue_" suffix=".xml"/>
+        <tempfile property="p5suis:build_say_from_queue.xml" destdir="${system_ui_info_speech_basedir_temp}" prefix="build_say_from_queue_" suffix=".xml" deleteonexit="yes"/>
         <xslt basedir="${system_ui_info_speech_basedir_temp}" style="${system_ui_info_speech.xsl}" in="${p5suis:say_queue.file}"  destdir="${system_ui_info_speech_basedir_temp}" out="${p5suis:build_say_from_queue.xml}"  >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -152,14 +307,129 @@
             <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd}basedir" expression="${system_ui_info_speech_basedir}"/>
             <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd}speech.pid" expression="${p5suis:speech.pid}"/>
             <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd}repository" expression="${p5suis:repository}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd}say_queue_dir" expression="${p5suis.say_queue_dir}"/>
         </xslt>
+            <property name="ant-launcher.jar" value="/opt/local/share/java/apache-ant/lib/ant-launcher.jar"/>
+        <!--<java jar="${ant-launcher.jar}" fork="true" clonevm="true" failonerror="false"> <!-\- jar="${ant-launcher.jar}" -\->
+            
+            <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
+          
+          <!-\-  <xsl:attribute name="newenvironment" select="'true'"/>-\->
+            <!-\-<xsl:attribute name="failonerror" select="'false'"/>-\->
+            <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
+            <!-\-<xsl:attribute name="output" select="concat(.,'_out.log')"/>-\->
+            <arg value="-buildfile"/>
+            <arg value="${p5suis:build_say_from_queue.xml}"/>
+        </java>-->
+            <ant antfile="${p5suis:build_say_from_queue.xml}"/>
+            <delete file="${p5suis:build_say_from_queue.xml}"/>
+            <antcall target="p5suis:clean_pid"/>
+        
+    </target>
+    
+    
+    <target name="psuis.addToLaunchctl.plistFile.test"  >
+        <condition property="psuis.addToLaunchctl.plistFile.test" taskname="psuis:addToLaunchctl.cond">
+            <available file="${psuis.addToLaunchctl.plistFile}"/>
+        </condition>
+        
+    </target>
+    
+    <target name="psuis.addToLaunchctl.plistFile.property" if="psuis.addToLaunchctl.test" description="Set property when we are sure path which contains it is ok">
+        <property name="psuis.addToLaunchctl.plistFile" value="${p5build_SE.LaunchDaemons}/${p5build_SE.PRODUCT.vendor-domain}.psuis.addToLaunchctl.plist"/>
+        <echo>#271 OK conditionally we add psuis.addToLaunchctl.plistFile.property = ${psuis.addToLaunchctl.plistFile.property}</echo>
+    </target>
+    
+    <target name="psuis:addToLaunchctl.test"  >
+        <condition property="psuis.addToLaunchctl.test" taskname="psuis:addToLaunchctl.cond">
+            <and>
+                <not><contains string="${p5build_SE.LaunchDaemons}" substring="'{p5build_SE.LaunchDaemons}'"/></not>
+                <not><available file="${psuis.addToLaunchctl.plistFile}"/></not>
+            </and>
+        </condition>
+        
+    </target>
+    <target name="psuis:addToLaunchctl.cond" depends="psuis:addToLaunchctl.test,psuis.addToLaunchctl.plistFile.test,psuis.addToLaunchctl.plistFile.property,psuis:addToLaunchctl.upload.plist" description="To verify if all settings are ok">
+        <echo level="verbose">#270 $psuis.addToLaunchctl.test = ${psuis.addToLaunchctl.test} </echo>
+        <echo level="verbose">#271 4psuis.addToLaunchctl.plistFile.test = ${psuis.addToLaunchctl.plistFile.test}
+            {p5build_SE.LaunchDaemons} = ${p5build_SE.LaunchDaemons}
+            {psuis.addToLaunchctl.plistFile} = ${psuis.addToLaunchctl.plistFile}
+           
+        </echo>
+    </target>
+     
+    
+    <target name="psuis:addToLaunchctl.upload.plist" depends="SYSTEM.build_SE.SYSTEM" unless="psuis.addToLaunchctl.plistFile.test" if="psuis.addToLaunchctl.test">
+        <property environment="env"/>
+        <echo level="verbose">ENV ${env.user.name}</echo>
+        <ant antfile="${build_SE.xml}" target="uid.build_SE.fail_if_user_is_not_root" inheritall="yes"/>
+        <!--<input addproperty="username.local" defaultvalue="${p5build_SE.SYSTEM.local-user}" message="Type standard system user name from which speech should be done - it shouldns been root "/>-->
+        <local name="p5suis:say_text"/>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue" inheritall="false">
+            <property name="p5suis:say_text" value="Installing speech substystem into system cron" />
+        </ant>
+        <ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue.task.run.immediate"/>
+        
+        <tempfile property="psuis.addToLaunchctl.upload.plist.temp" prefix="psuis:addToLaunchctl.upload.plist" suffix=".xml" destdir="${system_ui_info_speech_basedir_temp}" deleteonexit="yes" />
+        <copy file="${psuis.addToLaunchctl.header.plist}" tofile="${psuis.addToLaunchctl.upload.plist.temp}"  />
+        
+        <echo level="verbose">#261 debug $p5build_SE.LaunchDaemons = ${p5build_SE.LaunchDaemons} </echo>
+        <echoxml namespacepolicy="ignore" append="true" file="${psuis.addToLaunchctl.upload.plist.temp}" >
+            <plist version="1.0">
+                <dict>
+                    <key>Disabled</key><false/>
+                    <!--<key>KeepAlive</key><false/>-->
+                    <key>Label</key><string>pl.procesy5.pl.system_ui_info_speech</string>
+                    <key>ProgramArguments</key>
+                    <array>
+                        <string>${bin.ant}</string>
+                        <string>-f</string>
+                        <string>${system_ui_info_speech}</string>
+                        <string>p5suis:say_from_queue.addToLaunchctl.controlled</string>
+                        <string>-S</string>
+                    </array>
+                    <key>StandardOutPath</key>
+                    <string>${p5suis.StandardOutPath}</string>
+                    <key>StandardErrorPath</key>
+                    <string>${p5suis.StandardErrorPath}</string>
+                    <key>Debug</key>
+                    <true/>
+                    <!--<key>StartInterval</key>
+                    <integer>${psuis.addToLaunchctl.plistFile.StartInterval}</integer>-->
+                    <key>QueueDirectories</key>
+                    <array>
+                        <string>${p5suis.say_queue_dir}</string>
+                    </array>
+                    <key>UserName</key><string>${p5build_SE.SYSTEM.local-root}</string>
+                    <key>RunAtLoad</key><true/>
+                    <!--<key>AbandonProcessGroup</key><true/>-->
+                </dict>
+            </plist>
+        </echoxml>
+        <echo>#315 moving ${psuis.addToLaunchctl.upload.plist.temp}</echo>
+        <move file="${psuis.addToLaunchctl.upload.plist.temp}" tofile="${psuis.addToLaunchctl.plistFile}"/>
         
-        <ant antfile="${p5suis:build_say_from_queue.xml}"/>
         
-        <antcall target="p5suis:clean_pid"/>
+            
+        
+        <ant antfile="${build_SE.xml}" target="p5build_SE:OSX_SERVER:launchctl.load.plist">
+            <property name="OSX_SERVER.plistFile" value="${psuis.addToLaunchctl.plistFile}"/>
+            <property name="addToLaunchctl.plistFile.installed.touch_if_ok" value="${psuis.addToLaunchctl.plistFile.installed}"/>
+        </ant>
     </target>
     
     
+    <target name="psuis:addToLaunchctl" depends="build_WPS_Functions.xml.properties.cond,p5suis:clean_pid, psuis:addToLaunchctl.cond" description="Conditionally add talk service to system cron">
+        <!-- 		$plistFile = "/Library/LaunchDaemons/pl.biallnet.sync_perms.{$domain}.php.plist";
+ -->
+        
+        
+        
+        
+        
+        
+    </target>
+    
     
     
 </project>

+ 2 - 0
SE/schema/WPS_Functions/system_ui_info_speech/psuis.addToLaunchctl.header.plist.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

+ 44 - 5
SE/schema/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsl

@@ -12,6 +12,8 @@
     <xsl:param name="p5suis:basedir" required="yes"/>
     <xsl:param name="p5suis:repository" required="yes"/>
     <xsl:param name="p5suis:speech.pid" required="yes"/>
+    <xsl:param name="p5suis:say_queue_dir" required="yes"/>
+    
     
     <xsl:template match="say_queue" mode="p5suis:say_from_queue.build_ant" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"> <!-- imput are queue say lists -->
         <project basedir="{$p5suis:basedir}" name="p5suis:say_from_queue.build_ant" default="p5suis:say_from_queue.build_ant"
@@ -26,7 +28,7 @@
             <target name="p5suis:say_from_queue.build_ant" description="To say the queue once">
                 <xsl:for-each  select="tokenize( text(),';')">
                     <xsl:call-template name="p5suis:say_from_queue.build_ant.say_and_delete">
-                        <xsl:with-param name="p5suis:file" select="concat($p5suis:repository,'/',current())"/>
+                        <xsl:with-param name="p5suis:file" select="concat($p5suis:say_queue_dir,'/',current())"/>
                     </xsl:call-template>
                     
                 </xsl:for-each>
@@ -38,6 +40,7 @@
         <xsl:param name="p5suis:file" required="yes"/>
         <xsl:message>#37 saying for p5suis:file:<xsl:value-of select="$p5suis:file"/></xsl:message>
         <xsl:variable name="p5suis:file.content" select="doc($p5suis:file)"/>
+        
         <xsl:apply-templates select="$p5suis:file.content" mode="p5suis:say_from_queue.build_ant.say_and_delete">
             <xsl:with-param name="p5suis:file" select="$p5suis:file"/>
         </xsl:apply-templates>
@@ -46,25 +49,61 @@
         <!--</xsl:for-each>-->
     </xsl:template>
     
+    <xsl:function name="p5suis:text_to_say_optimize">
+        <xsl:param name="p5suis:file.content"/>
+        <xsl:variable name="text.xml">
+            <text.xml>
+                <xsl:for-each select="tokenize($p5suis:file.content,' ')">
+                    <ph pos="{position()}"><xsl:value-of select="."/></ph>
+                </xsl:for-each>
+            </text.xml>
+        </xsl:variable>
+        <xsl:for-each select="$text.xml/text.xml/ph">
+            <xsl:message>#61 testing [<xsl:value-of select="@pos"/>]"<xsl:value-of select="current()"/>"</xsl:message>
+            <xsl:choose>
+                <xsl:when test=" matches(text(),'p5:object')">
+                    <xsl:message>#64-A detectet object</xsl:message>
+                    <xsl:text> </xsl:text><xsl:value-of select="' object '"/>
+                </xsl:when>
+                <xsl:when test="matches(../ph[@pos= current()/@pos - 1],'p5:object')">
+                    <xsl:message>#64-B truncating "<xsl:value-of select="."/>" to <xsl:value-of select="substring( current(),1,10)"/></xsl:message>
+                    <xsl:text> </xsl:text><xsl:value-of select="concat(replace(substring( current(),1,10),'_',' '),replace(substring( current(),20,30),'_',' '))"/>
+                </xsl:when>
+                <xsl:when test=" matches( text(),'(.*targetNamespace.*)|(.*namespace.*)')">
+                    <xsl:message>#65-A detectet targetNamespace</xsl:message>
+                    <xsl:text> </xsl:text><xsl:value-of select="' name space '"/>
+                </xsl:when>
+                <xsl:when test=" matches(../ph[@pos= current()/@pos - 1], '(.*targetNamespace.*)|(.*namespace.*)')">
+                    <xsl:message>#6%-B targetNamespace "<xsl:value-of select="."/>" namespace </xsl:message>
+                    <xsl:text> </xsl:text><xsl:value-of select="replace(substring( replace(current(),'(http)|(://)|([_-])',' '),1,30),'_',' ')"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:text> </xsl:text><xsl:value-of select="."/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:for-each>
+    </xsl:function>
     
     <xsl:template mode="p5suis:say_from_queue.build_ant.say_and_delete" match="say.PL">
         <xsl:param name="p5suis:file" required="yes"/>
+        <xsl:variable name="p5suis:text_to_say_optimize" select="p5suis:text_to_say_optimize( current())"/>
         <exec executable="say"  failifexecutionfails="false">
             <arg line="-v Zosia"/>
-            <arg line="{  current()}"/>
+            <arg line="{  $p5suis:text_to_say_optimize}"/>
         </exec>
         <echo> deleting sayed file=<xsl:value-of select="$p5suis:file"/>; </echo>
-        <delete file="{$p5suis:file}"/>
+        <delete file="{$p5suis:file}" failonerror="false"/>
     </xsl:template>
     
     <xsl:template mode="p5suis:say_from_queue.build_ant.say_and_delete" match="say">
         <xsl:param name="p5suis:file" required="yes"/>
+        <xsl:variable name="p5suis:text_to_say_optimize" select="p5suis:text_to_say_optimize( current())"/>
         <exec executable="say"  failifexecutionfails="false">
             <arg line="-v alex"/>
-            <arg line="{  current()}"/>
+            <arg line="{  $p5suis:text_to_say_optimize}"/>
         </exec>
         <echo> deleting sayed file=<xsl:value-of select="$p5suis:file"/>; </echo>
-        <delete file="{$p5suis:file}"/>
+        <delete file="{$p5suis:file}" failonerror="false"/>
     </xsl:template>
     
     

+ 1 - 0
SE/schema/ant-url_action/build.WPS_Functions.PRODUCT.xml

@@ -0,0 +1 @@
+/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/build.WPS_Functions.PRODUCT.xml

+ 1 - 0
SE/schema/ant-url_action/build.WPS_Functions.SYSTEM.xml

@@ -0,0 +1 @@
+/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/build.WPS_Functions.SYSTEM.xml

+ 1 - 0
SE/schema/ant-url_action/build_WPS_Function_basedir.xml

@@ -0,0 +1 @@
+/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/build_WPS_Function_basedir.xml

+ 1 - 0
SE/schema/ant-url_action/build_WPS_Function_properties.xml

@@ -0,0 +1 @@
+/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/build_WPS_Function_properties.xml

+ 10 - 0
SE/schema/build.p5build.GLOBALS.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="p5build.GLOBALES">
+  
+    <property name="bin.ant" location="/opt/local/bin/ant"/>
+    <property name="xlsx2csv" location="/opt/local/bin/xlsx2csv.sh"/><!-- port install xlsx2csv -->
+    <property name="bin.perl" location="/opt/local/bin/perl"/>
+    <property name="wget" value="/opt/local/bin/wget"/>
+    <property name="PATH_ADD" value="/opt/local/bin:/usr/bin:/bin"/> <!-- to use in mapserver_gml_to_png ant kw -->
+    
+</project>

+ 21 - 0
SE/schema/build.p5build.PRODUCT.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="p5build.PRODUCT">
+  
+  
+    <include file="build.p5build.GLOBALS.xml"/>
+    <include file="build_SE_basedir/build.p5build_SE.PRODUCT.xml"/>
+    <include file="build_SE_basedir/build.p5build_SE.SYSTEM.xml"/>
+  
+    <property name="p5build.PRODUCT.name" value="${p5build_SE.PRODUCT.name}.p5build"/>
+    <property name="p5build.PRODUCT.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}"/>
+    
+    <property name="p5build.basedir" location="${basedir}"/>
+    <property name="p5build.build" location="${basedir}/build.xml"/>
+    <!--<property name="p5build.temp" location=""/>-->
+    
+    <property name="p5build.properties" location="${basedir}/.build_properties" />
+    <property name="p5build.properties.xml" location="${basedir}/.build_properties.xml" />
+    
+    
+    
+</project>

+ 24 - 0
SE/schema/build.p5build.SYSTEM.transformed.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="p5build.SYSTEM.transformed" default="p5build.SYSTEM.transformed">
+    
+  
+    <include file="build.p5build.PRODUCT.xml" optional="true"/>
+    
+    <property name="p5build.SYSTEM.transformed.name" value="${p5build.PRODUCT.name}.transformed"/>
+    <property name="p5build.SYSTEM.transformed.vendor-domain" value="${p5build_SE.PRODUCT.vendor-domain}.transformed"/>
+    
+  
+    <property name="p5build.SYSTEM.transformed.default_db.instance.xml" value="${basedir}/default_db.instance.xml"><!--<glossgroup id="glossgroup_ezt_5sz_gz">--></property> 
+    <property name="p5build.SYSTEM.transformed.default_db.instance.xml.symlink" value="${basedir}/default_db.instance.xml.symlink"/>
+    <property name="p5build.SYSTEM.transformed.transformed.local" location="${p5build.SYSTEM.transformed.default_db.instance.xml}/transformed"/> <!-- dir for some raport outputs -->
+    <property name="p5build.SYSTEM.transformed.build_complexType.local" location="${p5build.SYSTEM.transformed.default_db.instance.xml}/build_complexType"/>
+    
+    
+    <target name="p5build.SYSTEM.transformed">
+        <mkdir dir="${p5build.SYSTEM.transformed.build_complexType.local}"/>
+    </target>
+    
+    
+    
+    
+</project>

+ 14 - 0
SE/schema/build.p5build.SYSTEM.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="p5build.SYSTEM">
+  
+  
+    
+    <include file="build_SE_basedir/build.p5build_SE.SYSTEM.xml" optional="true"/>
+    <include file="build.p5build.PRODUCT.xml" optional="true"/>
+  
+    
+    <property name="p5build.SYSTEM.StandardOutPath" location="${p5build_SE.SYSTEM.StandardOutPath}/${p5build.PRODUCT.name}.log"/>
+    <property name="p5build.SYSTEM.StandardErrorPath" location="${p5build_SE.SYSTEM.StandardErrorPath}/${p5build.PRODUCT.name}.log"/>
+    
+    
+</project>

Різницю між файлами не показано, бо вона завелика
+ 1119 - 170
SE/schema/build.xml


+ 14 - 0
SE/schema/build_SE_basedir/build.p5build_SE.PRODUCT.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../schema" name="build_SE.PRODUCT"
+    xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+    >
+  
+    <property name="p5build_SE.PRODUCT.name" value="p5build_SE"/>
+    <property name="p5build_SE.PRODUCT.vendor-domain" value="pl.procesy5"/>
+    <property name="p5build_SE.basedir" value="${basedir}/build_SE_basedir"/>
+    <property name="p5build_SE.build" value="${basedir}/../build_SE.xml"/>
+    <property name="p5build_SE.temp" value="${p5build_SE.basedir}/temp"/>
+    <property name="p5build_SE.properties" value="${p5build_SE.basedir}/.build_SE.properties"/>
+    <property name="p5build_SE.properties.xml" value="${p5build_SE.properties}.xml"/>
+    
+</project>

+ 77 - 0
SE/schema/build_SE_basedir/build.p5build_SE.SYSTEM.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../schema" name="build_SE.SYSTEM"
+    xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+    >
+    
+    <include optional="true" file="build.p5build_SE.PRODUCT.xml"/>
+    
+    <property name="build_SE.SYSTEM.build" location="${p5build_SE.basedir}/build.p5build_SE.SYSTEM.xml"/>
+    
+    <property name="p5build_SE.SYSTEM.config_dir" value="${basedir}/config"/>
+    
+    
+    <include file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-user.xml" optional="true"/>
+    <include file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-root.xml" optional="true"/>
+    
+    <property name="p5build_SE.SYSTEM.StandardOutPath" value="${p5build_SE.temp}/StandardOutPath"/>
+    <property name="p5build_SE.SYSTEM.StandardErrorPath" value="${p5build_SE.temp}/StandardErrorPath"/>
+    
+    <condition property="p5build_SE.SYSTEM.StandardOutPath.notcreated" taskname="p5build_SE.SYSTEM.StandardOutPath">
+        <not><available file="${p5build_SE.SYSTEM.StandardOutPath}"></available></not>
+    </condition>
+    <condition property="p5build_SE.SYSTEM.StandardErrorPath.notcreated" taskname="p5build_SE.SYSTEM.StandardErrorPath">
+        <not><available file="${p5build_SE.SYSTEM.StandardErrorPath}"></available></not>
+    </condition>
+    
+    <condition property="p5build_SE.SYSTEM.local-user.undef" taskname="p5build_SE.SYSTEM.local-user">
+        <not><isset property="p5build_SE.SYSTEM.local-user"/></not>
+    </condition>
+    <condition property="p5build_SE.SYSTEM.local-root.undef" taskname="p5build_SE.SYSTEM.local-root">
+        <not><isset property="p5build_SE.SYSTEM.local-root"/></not>
+    </condition>
+  
+   <!-- <property name="p5build_SE.SYSTEM.local-user" value="a.binder"/><!-\- type local username for files creations permitions - some root tasks should chown it to this UID to allow for him to read -\->
+    <property name="p5build_SE.SYSTEM.local-root" value="root"/> <!-\- name of system user account to make some root tasks -\->-->
+   
+    
+    
+    <target name="build_SE.SYSTEM" depends="p5build_SE.SYSTEM.local-user,p5build_SE.SYSTEM.local-root,p5build_SE.SYSTEM.StandardOutPath,p5build_SE.SYSTEM.StandardErrorPath"/>
+        
+    
+    
+    <target name="p5build_SE.SYSTEM.local-user" if="p5build_SE.SYSTEM.local-user.undef">
+        <input addproperty="p5build_SE.SYSTEM.local-user" message=" type local username for files creations permitions - some root tasks should chown it to this UID to allow for him to read"/>
+        <echoxml file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-user.xml">
+            <project basedir="${basedir}" name="build_SE.SYSTEM.local-user"
+                xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+                >
+                <property name="p5build_SE.SYSTEM.local-user" value="${p5build_SE.SYSTEM.local-user}"/><!-- type local username for files creations permitions - some root tasks should chown it to this UID to allow for him to read -->
+            </project>
+        </echoxml>
+        <chown file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-user.xml" owner="${p5build_SE.SYSTEM.local-user}"/>
+    </target>
+    <target name="p5build_SE.SYSTEM.local-root" if="p5build_SE.SYSTEM.local-root.undef">
+        <input addproperty="p5build_SE.SYSTEM.local-root" message=" name of system user account to make some root tasks"/>
+        <echoxml file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-root.xml">
+            <project basedir="${basedir}" name="build_SE.SYSTEM.local-root"
+                xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+                >
+                <property name="p5build_SE.SYSTEM.local-root" value="${p5build_SE.SYSTEM.local-root}"/><!-- type local username for files creations permitions - some root tasks should chown it to this UID to allow for him to read -->
+            </project>
+        </echoxml>
+        <chown file="${p5build_SE.SYSTEM.config_dir}/build.p5build_SE.SYSTEM.local-root.xml" owner="${p5build_SE.SYSTEM.local-user}"/>
+    </target>
+    
+    <target name="p5build_SE.SYSTEM.StandardOutPath" if="p5build_SE.SYSTEM.StandardOutPath.notcreated">
+        <mkdir dir="${p5build_SE.SYSTEM.StandardOutPath}"/>
+        <chown file="${p5build_SE.SYSTEM.StandardOutPath}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false"/>
+        <chmod file="${p5build_SE.SYSTEM.StandardOutPath}" perm="777" failonerror="false"/>
+    </target>
+    
+    <target name="p5build_SE.SYSTEM.StandardErrorPath" if="p5build_SE.SYSTEM.StandardErrorPath.notcreated">
+        <mkdir dir="${p5build_SE.SYSTEM.StandardErrorPath}"/>
+        <chown file="${p5build_SE.SYSTEM.StandardErrorPath}" owner="${p5build_SE.SYSTEM.local-user}" failonerror="false"/>
+        <chmod file="${p5build_SE.SYSTEM.StandardErrorPath}" perm="777" failonerror="false"/>
+    </target>
+    
+</project>

+ 41 - 0
SE/schema/build_SE_basedir/build_SE.check_OS.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../." name="build_SE.check_OS"
+    xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+    >
+  
+  
+  
+    <condition property="build_SE.check_OS.root" value="c:\">
+        <os family="windows" />
+    </condition>
+    
+    <condition property="sbuild_SE.check_OS.rootw.root" value="/">
+        <os family="unix" />
+    </condition>
+    
+    
+  
+    <!--Tell Ant to define the Ant Contrib tasks from the jar-->
+    <!--<taskdef resource="net/sf/antcontrib/antcontrib.properties">
+        <classpath>
+            <pathelement location="path/to/ant-contrib-0.6.jar"/>
+        </classpath>
+    </taskdef>-->
+    
+    <!--Do your OS specific stuff-->
+    <!--<target name="checkos">
+        <if>
+            <os family="unix"/>
+            <then>
+                <!-\-Do your Unix stuff-\->
+            </then>
+            <elseif>
+                <os family="windows"/>
+                <then>
+                    <!-\-Do your Windows stuff-\->
+                </then>
+            </elseif>
+        </if>
+    </target>-->
+  
+</project>

+ 31 - 0
SE/schema/build_SE_basedir/build_SE.fail_if_user_is_not_root.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../." name="build_SE.fail_if_user_is_not_root"
+    xmlns:p5build_SE="http://biuro.biall-net.pl/build_SE.xsd"
+    default="build_SE.fail_if_user_is_not_root"
+    >
+  
+  
+  
+    <target name="p5build_SE.fail_if_user_is_not_root.check"  >
+        <property environment="env"  />
+        <condition property="p5build_SE.fail_if_user_is_not_root.check" taskname="p5build_SE.fail_if_user_is_not_root.cond">
+            <equals arg1="${env.USER}" arg2="root" />
+        </condition>
+        <echo> tested {env.USER} = ${env.USER}  ${user.name}</echo>
+        <echoproperties destfile="/tmp/props_now.txt"/>
+    </target>
+    
+    <target name="p5build_SE.fail_if_user_is_not_root.cond" depends="p5build_SE.fail_if_user_is_not_root.check,p5build_SE.fail_if_user_is_not_root.ok,p5build_SE.fail_if_user_is_not_root.fail"/>
+    
+    <target name="p5build_SE.fail_if_user_is_not_root.ok"  if="${p5build_SE.fail_if_user_is_not_root.check}" >
+        <echo> OK user is  not root ;-) </echo>
+    </target>
+    
+    <target name="p5build_SE.fail_if_user_is_not_root.fail" unless="${p5build_SE.fail_if_user_is_not_root.check}" description="To fail command if the user is not root">
+        <fail> Current user is root - which was unantended</fail>
+    </target>
+    
+    <target name="build_SE.fail_if_user_is_not_root" depends="p5build_SE.fail_if_user_is_not_root.cond" description="To fail command if the user is not root"/>
+    
+  
+</project>

+ 9 - 0
SE/schema/build_SE_basedir/build_SE.properties.xml.xsl

@@ -0,0 +1,9 @@
+<?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:param name="build_SE.properties.xml" required="yes"/> <!-- file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/build_SE_basedir/.build_SE.properties.xml -->
+
+</xsl:stylesheet>

+ 1 - 0
SE/schema/build_SE_basedir/procesy5_config.default_db.xsl

@@ -6,6 +6,7 @@
     
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
+    <xsl:param name="procesy5_config.default_db.properties"/>
     
     <xsl:template match="procesy5_config">
         <procesy5_config>

+ 1 - 3
SE/schema/build_SE_basedir/procesy5_config.folders.xsl

@@ -8,9 +8,7 @@
     <xsl:strip-space elements="*"/>
     
     <xsl:template match="procesy5_config">
-        <procesy5_config>
-            <xsl:apply-templates/>
-        </procesy5_config>
+        <xsl:apply-templates/>
     </xsl:template>
     
     <xsl:template match="procesy5_config.folders.server">

Деякі файли не було показано, через те що забагато файлів було змінено