a.binder 5 年之前
父節點
當前提交
a7a60aa920

+ 147 - 2
SE/schema/WPS_Functions/automation_driven/build.automation_driven.PRODUCT.submodule.xml

@@ -12,13 +12,158 @@
    <property  name="automation_driven.submodule.repository" location="${automation_driven.repository}/submodule"/>
    <property  name="automation_driven.submodule.temp" location="${automation_driven.temp}/submodule"/>
    
+   
+   
+   
+   
+   <property name="p5build.SYSTEM.transformed.default_db.instance.xml" value="${automation_driven.submodule.repository}/default_db.instance.xml"><!--<glossgroup id="glossgroup_ezt_5sz_gz">--></property> 
+   <property name="p5build.SYSTEM.transformed.default_db.instance.xml.symlink" value="${automation_driven.submodule.repository}/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"/>
+   
+   
+   <property name="procesy5_system_schema_collection_dir" location="/Users/a.binder/Documents/Arduino/libraries"/><!--<property name="procesy5_system_schema_collection_dir" location="${automation_driven.submodule.basedir}"/>-->
+   
+   
+   
+   <property name="remote.SE" location="${automation_driven.submodule.repository}/SEx"/><!--<property name="remote.SE" location="${Shared_Git_Root}/se/SE"/>-->
+   <property name="remote" location="${automation_driven.submodule.repository}/SEx/schema"/><!--<property name="remote" location="${Shared_Git_Root}/se/SE/schema"/>-->
+   
+   <property name="p5build.remote.SE" location="${remote.SE}"/>
+   <property name="p5build.remote" location="${remote}"/>
+   
+   
+   <property name="table.local" location="${automation_driven.submodule.basedir}"/><!--<property name="table.local" location="${basedir}/table"/>-->
+   <property name="table.remote" location="${remote}/table"/>
+   
+   
+   
+   <property name="default_db.instance.xml" value="${automation_driven.submodule.repository}/default_db.instance.xml"><!--<glossgroup id="glossgroup_ezt_5sz_gz">--></property> 
+   <property name="default_db.instance.xml.symlink" value="${automation_driven.submodule.repository}/default_db.instance.xml.symlink"/>
+   
+   <property name="transformed.local" location="${default_db.instance.xml}/transformed"/> <!-- dir for some raport outputs -->
+   <property name="procesy5_system_schema.xml" value="${transformed.local}/procesy5_system_schema.xml"/>
+   <property name="procesy5_system_schema.complete" value="${transformed.local}/procesy5_system_schema.complete"/>
+   <property name="procesy5_system_schema_file" value="${procesy5_system_schema.xml}"/> <!-- alias property used in buildComplexType - to be removed in cleaning/organizing -->
+   
+   
+   <property name="external_schema" value="/Users/a.binder/Documents/Arduino/libraries/p5_automation_lib/automation_driven.submodule.struct.read."/><!--<property name="external_schema" value="/public_html/external_schema"/>--><!-- ignore schemas to be imported/transformed locally -->
+   <property name="external_schema_id_namespace_prefix" value="libraries/p5_automation_lib"/><!--<property name="external_schema_id_namespace_prefix" value="/public_html/external_schema_id_namespace_prefix"/>--><!-- ingored but to parse schemas to be imported/transformed locally -->
+   
+   <property name="external_schema_table.path" value="${automation_driven.submodule.repository}/external_schema_table"/><!-- transformed to tables from external_schema_id_namespace_prefix to be set @id  TODO use it on recurse_ant - it is now set manually-->
+   <property name="vrtfNamespaces.xml" value="${transformed.local}/vrtfNamespaces.xml"/>
+   <property name="vrtfNamespaces_file" value="${vrtfNamespaces.xml}"/>
+   <property name="element_complexType.xml" value="${transformed.local}/element_complexType.xml"/><!-- for build flat schema and tr_map -->
+   <property name="build_element_complexType.xml" value="${transformed.local}/build_element_complexType.xml"/> <!-- for build parallel by ant universal xsl -->
+   <property name="build_element_complexType.xml.complete" value="${build_element_complexType.xml}.complete"/> <!-- to controll if is complete to bypass it -->
+   <property name="build_tr_map.xml" value="${transformed.local}/build_tr_map.xml"/>
+   <property name="build_tr_map.xml.complete" value="${transformed.local}/build_tr_map.xml.complete"/>
+   <property name="CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml" value="${transformed.local}/CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml"/><!-- transformed/CRM_LISTA_ZASOBOW.get_wfs_recurse_xsl.xml -->
+   <property name="CRM_PROCES.get_wfs_recurse_xsl.xml" value="${transformed.local}/CRM_PROCES.get_wfs_recurse_xsl.xml"/>
+   <property name="build_simpleSchema_for_recurse_ant.single.complete" value="${transformed.local}/build_simpleSchema_for_recurse_ant.single.complete"/>
+   
+   <!--<property name="system_ui_info_speech" location="${basedir}/WPS_Functions/system_ui_info_speech/build_system_ui_info_speech.xml"/>-->
+   
+   <property name="build_complexType.local" location="${default_db.instance.xml}/build_complexType"/>
+   <property name="build_complexType.remote" location="${remote}/default_db.instance.xml/build_complexType"/>
+   
+   <property name="p5_tr_map.local" location="${default_db.instance.xml}/p5_tr_map"/>
+   <property name="p5_tr_map.remote" location="${remote}/default_db.instance.xml/p5_tr_map"/>
+   
+   
+   <property name="detect_resource_type.local" location="${default_db.instance.xml}/detect_resource_type"/>
+   <property name="detect_resource_type.remote" location="${remote}/default_db.instance.xml/detect_resource_type"/>
+   
+   <property name="detect_objects_parent_relations.local" location="${default_db.instance.xml}/detect_objects_parent_relations"/>
+   <property name="detect_objects_parent_relations.remote" location="${remote}/default_db.instance.xml/detect_objects_parent_relations"/>
+   
+   
+   <property name="simpleSchema.local" location="${default_db.instance.xml}/simpleSchema"/>
+   <property name="simpleSchema.remote" location="${remote}/default_db.instance.xml/simpleSchema"/>
+   
+   <!-- module cache -->
+   <property name="build_properties" location="${automation_driven.submodule.repository}/.build_properties" />
+   <property name="build_properties.xml" location="${automation_driven.submodule.repository}/.build_properties.xml" />
+   
+   
+   
+   
+   <property name="new-schema-with-ID-to-move-and-rename-to-xsd"  location="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd"/>
+   
+   <!-- templates -->  
+   
+   <property name="default_db_xml_cache.public" location="${basedir}/default_db_xml_cache.public"/>
+   <property name="default_db_xml_cache" value="${basedir}/default_db_xml_cache"/><!-- xsl Business Objects Transformers -->
+   <property name="system_cache__resources_tree_generate_xsl_required_occurs_raport" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport"/>
+   <property name="parse_schema_to_generate_id.xsl" value="${system_cache__resources_tree_generate_xsl_required_occurs_raport}/parse_schema_to_generate_id.xsl" />
+   <property name="parse_schema_to_generate_id_raport.xml" value="${transformed.local}/new-schema-with-ID-to-move-and-rename-to-xsd.xml"/>
+   <property name="get_all_xsd.xsl" value="${default_db_xml_cache.public}/get_all_xsd.xsl"/>
+   
+   <property name="build_element_complexType.xml" value="${transformed.local}/build_element_complexType.xml"/> <!-- ant build to generate elements flat and p5_tr_map -->
+   
+   <property name="build_detect_resource_type.xml" value="${transformed.local}/build_detect_resource_type.xml"/>
+   <property name="build_detect_resource_type.complete" value="${transformed.local}/build_detect_resource_type.complete"/>
+   <property name="build_complexType.xsl" value="${default_db_xml_cache}/build_complexType.xsl"/>
+   <property name="build_complexType_raport.xml" value="${transformed.local}/build_complexType_raport.xml"/>
+   
+   <property name="build_tr_map_raport.xml" value="${transformed.local}/build_tr_map_raport.xml"/>
+   <property name="p5_tr_map.xsl" value="${default_db_xml_cache}/p5_tr_map.xsl"/>
+   
+   
+   <property name="detect_resource_type.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_resource_type.xsl"/>
+   <property name="detect_resource_type.xml" value="${transformed.local}/detect_resource_type.xml"/> <!-- ${targetNamespace_DEFAULTS_prefix} -->
+   
+   <property name="detect_objects_parent_relations.xsl" value="${default_db_xml_cache}/system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_objects_parent_relations.xsl"/>
+   <property name="detect_objects_parent_relations.xml" value="${transformed.local}/detect_objects_parent_relations.xml"/>
+   
+   <property name="build_detect_objects_parent_relations.xml" value="${transformed.local}/build_detect_objects_parent_relations.xml"/>
+   <property name="build_detect_objects_parent_relations.complete" value="${transformed.local}/build_detect_objects_parent_relations.complete"/>
+   
+   <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"/>
+   <property name="main_build_recurse_ant.dita_with_id_raport.xml" value="${transformed.local}/main_build_recurse_ant.dita_with_id_raport.xml"/><!-- raport only for simpleSchema -->
+   
+   <property name="build_SimpleSchema.xml" value="${transformed.local}/build_SimpleSchema.xml"/>
+   <!--<property name="build_SimpleSchema.complete" value="${transformed.local}/build_SimpleSchema.complete"/>-->
+   
+   
+   <property name="build_assertion_from_complexType.xsl" value="${default_db_xml_cache}/build_assertion_from_complexType.xsl"/>
+   <property name="assertion_from_complexType_generated.xsl" value="${transformed.local}/assertion_from_complexType_generated.xsl"/>
+   
+   <property name="typespecial_to_ref.xsl" location="${default_db_xml_cache}/typespecial_to_ref/typespecial_to_ref.xsl"/>
+   <property name="typespecial_to_ref.xml" location="${transformed.local}/typespecial_to_ref.xml"/>
+   <property name="typespecial_to_ref_final.xml" location="${transformed.local}/typespecial_to_ref_final.xml"/>
+   <property name="typespecial_to_ref_final.xml_to_default_db.report.xml" location="${transformed.local}/typespecial_to_ref_final.xml_to_default_db.report.xml"/>
+   
+   
+   <property name="default_db.dir" value="p5_automation_lib/default_db"/><!--<property name="default_db.dir" value="${automation_driven.submodule.repository}/default_db"/>-->
+   <property name="default_db.xml" value="${default_db.dir}/default_db.xsd"/>
+   
+   <property name="default_db.xml.get_url" value="${TargetNamespaceBindings}/SE/version-git/api.php/xml/xsd/default_db"/> <!-- TODO to be set  -->
+   
+   <property name="TargetNamespaceBindings.xsl" value="${default_db_xml_cache.public}/system_cache__appinfo/TargetNamespaceBindings.xsl"/>
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
    <property  name="automation_driven.submodule.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.xsd"/>
    
    
+   
    <property  name="automation_driven.submodule.struct.read.xml" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.xml"/>
    <property  name="automation_driven.submodule.struct.read.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.xsl"/>   
    <property  name="automation_driven.submodule.struct.read.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.xsd"/>
   
+   <property  name="automation_driven.submodule.struct.write.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.write.xsd"/>
+   <property  name="automation_driven.submodule.struct.write.h" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.write.h"/>
+   <property  name="automation_driven.submodule.struct.write.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.write.xsl"/>
+   
    
    <property name="automation_driven.submodule.xsd__struct_files_fix_default.xml" location="${automation_driven.submodule.basedir}/automation_driven.submodule.xsd__struct_files_fix_default.xml"/>
    <property  name="automation_driven.submodule.xsd__struct_files_fix_default.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.xsd__struct_files_fix_default.xsl"/>
@@ -27,11 +172,11 @@
    <property  name="automation_driven.submodule.xsd__struct_files_fix_types.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.xsd__struct_files_fix_types.xsl"/>
    
    
-   <property  name="automation_driven.submodule.struct.read__communication.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication.xsd"/><!-- all el. on this will get id for data and action type -->
+   <property  name="automation_driven.submodule.struct.read__communication.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.__communication.xsd"/><!-- all el. on this will get id for data and action type -->
    <property  name="automation_driven.submodule.struct.read__communication.xml" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication.xml"/>
    <property  name="automation_driven.submodule.struct.read__communication.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication.xsl"/>
    
-   <property  name="automation_driven.submodule.struct.read__communication_generated.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication_generated.xsd"/><!-- all el. on this will get id for data and action type -->
+   <property  name="automation_driven.submodule.struct.read__communication_generated.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.__communication_generated.xsd"/><!-- all el. on this will get id for data and action type -->
    <property  name="automation_driven.submodule.struct.read__communication_generated.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication_generated.xsl"/>
    <property  name="automation_driven.submodule.struct.read__communication_generated.xml" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication_generated.xml"/>
    <property  name="automation_driven.submodule.struct.read__communication_generated.h" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read__communication_generated.h"/>

+ 45 - 1
SE/schema/WPS_Functions/automation_driven/build.automation_driven.PRODUCT.xml

@@ -5,12 +5,44 @@
          default="PRODUCT"
          name="automation_driven.PRODUCT">
    <description>p5suis:say Created function automation_driven with prefix automation_driven by p5ant module</description>
-   <include as="WPS_Functions" file="../build.WPS_Functions.PRODUCT.xml"/>
+  
+   <property name="WPS_Functions.basedir" location="${basedir}/WPS_Functions"/>
+   
+   
+   <include file="../../build_SE_basedir/build.p5build_SE.INSTALL_ROOT.xml"/>
+   
+   <property name="p5build_SE.PRODUCT.name" value="p5build_SE"/>
+   <property name="p5build_SE.PRODUCT.vendor-domain" value="pl.procesy5"/>
+   <property name="p5build_SE.PRODUCT.prefix" value="p5build_SE"/>
+   <property name="p5build_SE.PRODUCT.namespace" value="http://biuro.biall-net.pl/build_SE.xsd"/>
+   <property name="p5build_SE.PRODUCT.root_module" value="true"/>
+   
+   
+   <property name="WPS_Functions.PRODUCT.name" value="${p5build.PRODUCT.name}.WPS_Functions"/>
+   <property name="WPS_Functions.PRODUCT.vendor-domain" value="${p5build.PRODUCT.vendor-domain}.WPS_Functions"/>
+   <property name="WPS_Functions.PRODUCT.prefix" value="p5bws"/>
+   <property name="WPS_Functions.PRODUCT.namespace" value="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"/>
+   
+   
+   
+   <property name="WPS_Functions.repository" location="${p5build_SE.INSTALL_ROOT.repository}/WPS_Functions"/>
+   
+   <property name="WPS_Functions.temp" location="${p5build_SE.INSTALL_ROOT.temp}/WPS_Functions"/>
+   
+   
+   
    
    <condition property="automation_driven.PRODUCT.ifdef.parent"
               taskname="automation_driven.parent.PRODUCT.ifdef">
       <isset property="WPS_Functions.PRODUCT.name"/>
    </condition>
+   
+   
+   
+   
+   
+   
+   
    <property name="automation_driven.PRODUCT.name"
              value="${WPS_Functions.PRODUCT.name}.automation_driven"/>
    <property name="automation_driven.PRODUCT.vendor-domain"
@@ -44,6 +76,18 @@
    
    <include file="build.automation_driven.PRODUCT.submodule.xml"/>
    
+   
+   
+   
+   
+   
+   <include as="WPS_Functions" file="../build.WPS_Functions.PRODUCT.xml"/>
+   
+   
+   
+   
+   
+   
    <target name="PRODUCT"
            depends="basedir,p5xsls.xml"
            description="to create basedir, includes and install"/>

+ 714 - 2
SE/schema/WPS_Functions/automation_driven/build_automation_driven.xml

@@ -3,6 +3,17 @@
          basedir="../../."
          default="default"
          name="automation_driven">
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
    <include as="PRODUCT" file="build.automation_driven.PRODUCT.xml"/>
    <include as="SYSTEM" file="build.automation_driven.SYSTEM.xml"/>
    <include as="INSTALL" file="build.automation_driven.INSTALL.xml"/>
@@ -10,7 +21,10 @@
             file="build.automation_driven.${local.p5ant.WPS_Functions.PRODUCT.module.input}.xml"
             optional="yes"/>
    <include as="WPS_Functions" file="../build.WPS_Functions.PRODUCT.xml"/>
-   <include file="../system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml"/>
+   <!--<include file="../system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml"/>-->
+   
+   <include file="../system_ui_info_speech/build_system_ui_info_speech.xml" as="p5suis" optional="false"/>
+   
    <extension-point name="default.default" depends="default"/>
    <extension-point name="default" depends="PRODUCT.PRODUCT,INSTALL.INSTALL"/>
    <target name="xsl-test"
@@ -39,9 +53,655 @@
       </xslt>
    </target>
    
+   <target name="procesy5_system_schema.xml" depends="empty.xml" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
+      <sleep seconds="2"/>
+      
+      
+      <!--<exec executable="say" spawn="true" failifexecutionfails="false">
+                <arg line="-v alex"/>
+                <arg line="Generating process 5 system schema"/>
+            </exec>-->
+      <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+         <property name="p5suis:say_text" value="Generating process 5 system schema" />
+      </ant>
+      <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+      
+      <antcall target="delete.external_schema_table.path"/>
+      <mkdir dir="${default_db.instance.xml}"/>
+      <mkdir dir="${transformed.local}"/>
+      <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
+      <delete dir="${procesy5_system_schema.xml}" failonerror="false"/>
+      <echo>#242 run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${procesy5_system_schema_collection_dir}; 
+         $basedir = ${basedir}
+         $default_db.dir = ${default_db.dir} 
+         $external_schema_table.path = ${external_schema_table.path}
+         
+      </echo>
+      <!-- ${get_all_xsd.xsl}  d2a__x3A__p5xsl__x3A__p5CPTpm.xsl-->
+      <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${empty.xml}"  destdir="./" out="${procesy5_system_schema.xml}" >
+         <factory name="net.sf.saxon.TransformerFactoryImpl">    
+            <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+            <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
+         </factory>
+         <param name="ignore_SVG.xsd" expression="true"/>
+         <!-- d2a -->
+         <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+         <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+         <param name="external_schema" expression="${external_schema}"/>
+         
+         <param name="d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl" expression="${d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/default_db/CRM_PROCES_tree/CRM_PROCES_tree.postprocess_modules.xsd}disable.ditamap" expression=""/>
+         
+         <param name="temp" expression="${p5build.temp}"/>
+         <param
+            name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.param.xsl"
+            expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.param.xsl}"/>
+         <param
+            name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.xsl"
+            expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.xsl}"/>
+         <!-- EOF d2a -->
+         <param name="procesy5_system_schema_collection_dir" expression="${procesy5_system_schema_collection_dir}"/>
+         <param name="cache" expression="refresh"/>
+         <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="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="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+         <param name="basedir" expression="${basedir}"/>
+         <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
+         <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+         <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+         <classpath location="/opt/local/share/java/saxon9he.jar"/>
+      </xslt>
+      <sequential>
+         <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="analyzing process 5 schema namespaces" />
+         </ant>
+         <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+         <!--<exec executable="say" spawn="true" failifexecutionfails="false">
+                <arg line="-v alex"/>
+                <arg line="analyzing process 5 schema namespaces"/>
+            </exec>-->
+         
+         <delete file="${vrtfNamespaces.xml}"/>        
+         <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${vrtfNamespaces.xml}" >
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+               <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+               <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
+            </factory>
+            
+            <param name="ignore_SVG.xsd" expression="true"/>
+            
+            <!-- d2a -->
+            
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+            <param name="external_schema" expression="${external_schema}"/>
+            
+            <param name="d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl" expression="${d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl}"/>
+            <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/default_db/CRM_PROCES_tree/CRM_PROCES_tree.postprocess_modules.xsd}disable.ditamap" expression=""/>
+            <param name="basedir" expression="${basedir}"/>
+            <param name="temp" expression="${p5build.temp}"/>
+            <param
+               name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.param.xsl"
+               expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.param.xsl}"/>
+            <param
+               name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.xsl"
+               expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.xsl}"/>
+            <!-- EOF d2a -->
+            <param name="procesy5_system_schema_collection_dir" expression="${procesy5_system_schema_collection_dir}"/>
+            <param name="cache" expression="refresh"/>
+            <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="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="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="default_db.dir" expression="${default_db.dir}"/>
+            <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+            <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+            <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+         </xslt>
+         <sleep seconds="1"/>
+      </sequential>
+   </target>
+   
+   
+   
+   
+   
+   <target name="empty.xml" description="Builds empty.xml">
+      <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+   </target>
+   
+   
+   
+   
+   <target name="vrtfNamespaces.xml" description="Procedure to create vrtfNamespaces.xml - used in some tasks especially in generate schema with id">
+      <parallel threadcount="2">
+         <sequential>
+            
+            <!--<exec executable="say"  failifexecutionfails="false">
+                 <arg line="-v alex"/>
+                 <arg line="Generating namspaces list "/>
+             </exec>-->
+            
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="Generating namspaces list" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete file="${vrtfNamespaces.xml}"/>        
+            <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${vrtfNamespaces.xml}" >
+               <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                  <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                  <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}vrtfNamespaces"/>
+               </factory>
+               <param name="ignore_SVG.xsd" expression="true"/>
+               <param name="procesy5_system_schema_collection_dir" expression="${procesy5_system_schema_collection_dir}"/>
+               <param name="cache" expression="refresh"/>
+               <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_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="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+               <param name="basedir" expression="${basedir}"/>
+               <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+               <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+               <param name="default_db.dir" expression="${default_db.dir}"/>
+               <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+               <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+               <param name="external_schema" expression="${external_schema}"/>
+               <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            </xslt>
+         </sequential>
+      </parallel>
+   </target>
+   
+   <target name="generate_schema_with_id" depends="procesy5_system_schema.xml" description="first we generate schema to check if all have correct ID">
+      <!-- schema @id fixing -->
+      <parallel threadcount="2">
+         <sequential>
+            <!--<sleep seconds="3"/>-->
+            <!--<exec executable="say"  failifexecutionfails="false">
+                    <arg line="-v alex"/>
+                    <arg line="Checking schema for correnct id attributes if not generating them"/>
+                </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="Checking schema for correnct id attributes if not generating them" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}" failonerror="false"/>
+            <delete file="${new-schema-with-ID-to-move-and-rename-to-xsd}" failonerror="false"/>
+            <delete file="${parse_schema_to_generate_id_raport.xml}"/>
+            <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+            <echo>#406 xslt ${parse_schema_to_generate_id.xsl}</echo>
+            <xslt basedir="./" style="${parse_schema_to_generate_id.xsl}"   in="${empty.xml}"  destdir="./" out="${parse_schema_to_generate_id_raport.xml}" >
+               <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                  <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                  <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}parse_schema_to_generate_id"/>
+               </factory>
+               <!-- d2a -->
+               <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+               <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+               <param name="external_schema" expression="${external_schema}"/>
+               
+               <param name="d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl" expression="${d2a__x3A__p5xsl__x3A__p5CPTpm.limited_import.xsl}"/>
+               <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/default_db/CRM_PROCES_tree/CRM_PROCES_tree.postprocess_modules.xsd}disable.ditamap" expression=""/>
+               
+               <param name="temp" expression="${p5build.temp}"/>
+               <param
+                  name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.param.xsl"
+                  expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.param.xsl}"/>
+               <param
+                  name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd}fast_fix_param.xsl"
+                  expression="${p5xsl__x3A__p5ant-interface.fast_fix_param.xsl}"/>
+               <!-- EOF d2a -->
+               <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+               <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+               <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
+               <param name="new-schema-with-ID-to-move-and-rename-to-xsd" expression="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+               <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
+               <param name="default_db.dir" expression="${default_db.dir}"/>
+               <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+               <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="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+               <param name="basedir" expression="${basedir}"/>
+               <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+               <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+               <!--<param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>-->
+               <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            </xslt>
+            <antcall target="p5suis.p5suis.say_to_queue.copy_file.drop_overflow" >
+               <param name="p5suis.say_to_queue.copy_file" value="${parse_schema_to_generate_id_raport.xml}"/>
+            </antcall>
+            <echo>#466 check what were missing in no-id directory</echo>
+            <sleep seconds="3"/>
+         </sequential>
+      </parallel>
+   </target>
+   
+   
+   <target depends="generate_schema_with_id" name="new-schema-with-ID-to-move-and-rename-to-xsd_test">
+      <condition taskname="new-schema-with-ID-to-move-and-rename-to-xsd"    property="new-schema-with-ID-to-move-and-rename-to-xsd_exists">
+         <available file="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+      </condition>
+   </target>
+   
+   
+   
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.cond" depends="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.test,new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.fail,new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.ok" />
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.test">
+      <condition property="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.test" taskname="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.cond">
+         <available file="${procesy5_system_schema.complete}"/>
+      </condition>
+   </target>
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.fail" unless="${new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.test}" />
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.ok"  if="${new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete.test}">
+      <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+         <property name="p5suis:say_text" value="need to generate schema with id" />
+      </ant>
+      <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+      
+   </target>
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd.if_not_complete" description="to make procesy5 system schema only if no ${procesy5_system_schema.complete}"/>
+   
+   
+   
+   <target name="new-schema-with-ID-to-move-and-rename-to-xsd"  depends="new-schema-with-ID-to-move-and-rename-to-xsd_test" if="${new-schema-with-ID-to-move-and-rename-to-xsd_exists}" > <!-- R save_build_properties,read_build_properties, -->
+      <parallel failonany="true" threadCount="2">
+         <sequential>
+            <!--<exec executable="say"  failifexecutionfails="false">
+                 <arg line="-v alex"/>
+                 <arg line="need to generate schema with id"/>
+             </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="need to generate schema with id" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <copy todir="${procesy5_system_schema_collection_dir}">
+               <fileset dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+            </copy>
+            <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}"/>
+            <delete file="${new-schema-with-ID-to-move-and-rename-to-xsd}" failonerror="false"/>
+         </sequential>
+      </parallel>
+      
+      <sequential>
+         <antcall target="procesy5_system_schema.xml"/> <!-- saved files are not in current schema - need to regenerate -->
+         <antcall target="vrtfNamespaces.xml"/>
+         <!--<exec executable="say" spawn="true" failifexecutionfails="false">
+                        <arg line="-v alex"/>
+                        <arg line="generated schema with id complete"/>
+                    </exec>-->
+         <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="generated schema with id complete" />
+         </ant>
+         <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+         
+      </sequential>
+      
+   </target>
+   
+   <target name="procesy5_system_schema.xml_complete" depends="new-schema-with-ID-to-move-and-rename-to-xsd" description="Generate procesy5_system_schema.xml and vrtfNamespaces.xml which can be not correct">
+      <sequential>
+         <sleep seconds="2"/>
+         
+         <!--<exec executable="say" spawn="true" failifexecutionfails="false">
+             <arg line="-v alex"/>
+             <arg line="generating complete process 5 system schema"/>
+         </exec>-->
+         
+         <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+            <property name="p5suis:say_text" value="generating complete process 5 system schema" />
+         </ant>
+         <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+         
+         
+         
+         <mkdir dir="${default_db.instance.xml}"/>
+         <mkdir dir="${transformed.local}"/>
+         <delete file="${procesy5_system_schema.xml}" failonerror="false"/>
+         <delete dir="${new-schema-with-ID-to-move-and-rename-to-xsd}" failonerror="false"/>
+         <delete file="${new-schema-with-ID-to-move-and-rename-to-xsd}" failonerror="false"/>
+         <echoxml file="${empty.xml}"><empty>empty</empty></echoxml>
+         <echo> run ${get_all_xsd.xsl} with param procesy5_system_schema_collection_dir=${procesy5_system_schema_collection_dir}; </echo>
+         <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${empty.xml}"  destdir="./" out="${procesy5_system_schema.xml}" >
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+               <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+               <attribute name="http://saxon.sf.net/feature/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}get_all_xsd"/>
+            </factory>
+            <param name="ignore_SVG.xsd" expression="true"/>
+            <param name="procesy5_system_schema_collection_dir" expression="${procesy5_system_schema_collection_dir}"/>
+            <param name="cache" expression="refresh"/>
+            <param name="external_schema" expression="${external_schema}"/>
+            <param name="external_schema_id_namespace_prefix" expression="${external_schema_id_namespace_prefix}"/>
+            <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_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="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="basedir" expression="${basedir}"/>
+            <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+            <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+            <param name="default_db.dir" expression="${default_db.dir}"/>
+            <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+            <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+            <param name="external_schema" expression="${external_schema}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+         </xslt>
+      </sequential>
+      <sleep seconds="1"/>
+      <antcall target="vrtfNamespaces.xml"/>
+   </target>
+   
+   <target name="element_complexType.xml.single"   description="SINGLE generate list of elements and Complextype to generate flat and tr_map">
+      <parallel threadcount="2">
+         <sequential>
+            <!--<exec executable="say"   failifexecutionfails="false">
+                    <arg line="-v alex"/>
+                    <arg line="generating xml object list from system schema to provide making multi thread build lists for complex Types and transaction maps and others "/>
+                </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating xml object list from system schema to provide making multi thread build lists for complex Types and transaction maps and others" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete file="${element_complexType.xml}"/>
+            <xslt basedir="./" style="${get_all_xsd.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${element_complexType.xml}" >
+               <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                  <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                  <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}element_complexType"/>
+               </factory>
+               <param name="ignore_SVG.xsd" expression="true"/>
+               <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="external_schema_table.path" expression="${external_schema_table.path}"/>
+               <param name="debug_level_param" expression="${debug_level_param}"/>
+               <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="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+               <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="basedir" expression="${basedir}"/>
+               <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+               <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+               <param name="default_db.dir" expression="${default_db.dir}"/>
+               <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+               <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+               <param name="external_schema" expression="${external_schema}"/>
+               <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            </xslt>
+         </sequential>
+      </parallel>
+   </target>
+   
+   <target name="build_element_complexType.xml.single.task"  depends="p5build.SYSTEM.transformed,save_build_properties,element_complexType.xml.single" description="Just element_complexType elements"> <!-- R save_build_properties,read_build_properties, -->
+      
+      <parallel threadcount="2">
+         <sequential>
+            <!--<exec executable="say"  failifexecutionfails="false">
+                    <arg line="-v alex"/>
+                    <arg line="generating multi thread build lists for complex Types "/>
+                </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating multi thread build lists for complex Types" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete file="${build_element_complexType.xml}"/>
+            <!--<tempfile property="build_element_complexType.xml.properties_override" prefix="build_element_complexType.xml.properties_override" suffix=".xml" destdir="${transformed.local}" deleteonexit="no"/>-->
+            <!--<echoxml file="${build_element_complexType.xml.properties_override}" >
+                  <properties>
+                      <property name="uuid" value="PROCES_INIT_TREE_$${xpath_value}"/> <!-\- to be evaluated in child xsl/ant-\->
+                      <property name="typeName" value="default_db:PROCES_INIT"/>
+                      <property name="xpath" value="ID"/>
+                  </properties>
+              </echoxml>-->
+            <xslt basedir="./" style="${build_ant_universal_by_xsl_match.xsl}"  in="${element_complexType.xml}"  destdir="./" out="${build_element_complexType.xml}" >
+               <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                  <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                  <attribute name="http://saxon.sf.net/feature/initialMode" value="build_element_complexType.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="${threadCount}"/>
+               <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
+               <param name="debug_level_param" expression="${debug_level_param}"/>
+               <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>
+            <!--<exec executable="say"  failifexecutionfails="false">
+                  <arg line="-v alex"/>
+                  <arg line="executing multi thread build for complex Types by thread count ${threadCount}"/>
+              </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="executing multi thread build for complex Types by thread count ${threadCount}" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+            
+            <!--<delete dir="${build_complexType.local}"/>-->
+            <echo>#637 will antfile: ${build_element_complexType.xml}
+            </echo>
+            <ant antfile="${build_element_complexType.xml}"/>
+            <touch file="${build_element_complexType.xml.complete}"/>
+            <!--<exec executable="say" failifexecutionfails="false">
+                  <arg line="-v alex"/>
+                  <arg line="generating complex types complete"/>
+              </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating complex types complete" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+         </sequential>
+      </parallel>
+   </target>
+   
+   
+   <target name="p5build.SYSTEM.transformed">
+      <mkdir dir="${p5build.SYSTEM.transformed.build_complexType.local}"/>
+   </target>
+   
+   <target name="save_build_properties" >
+      <mkdir  dir="${p5build.temp}"/>
+      <mkdir dir="${p5build.repository}"/>
+      <ant antfile="${WPS_Functions.build}" inheritall="yes"/>
+      
+      <!--R <ant antfile="${build_SE.xml}"  target="save_build_properties"/>-->
+      <!-- R <loadproperties srcfile="${build_SE.properties}"/>-->
+      
+      <!--R <echoproperties destfile="${build_properties}" />-->
+      <echoproperties destfile="${build_properties.xml}"  format="xml"/>
+   </target>
+   
+   <target name="delete.external_schema_table.path" description="To delete generated by ${build_object_install_se_ant_object.xml} task system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external models">
+      <delete dir="${external_schema_table.path}" failonerror="false"/>
+   </target>
+   
+   
+   <target name="build_detect_resource_type.xml.single.task"   description="Just build_detect_resource_type.xml elements"> <!-- R depends="save_build_properties,read_build_properties" -->
+      
+      <parallel threadcount="2">
+         <sequential>
+            <!--<exec executable="say" spawn="true"  failifexecutionfails="false">
+                     <arg line="-v alex"/>
+                     <arg line="generating multi thread build lists for complex resource types relations "/>
+                 </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating multi thread build lists for complex resource types relations " />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete file="${build_detect_resource_type.xml}" failonerror="false"/>
+            <delete file="${build_detect_resource_type.complete}" failonerror="false"/>
+            
+            <xslt basedir="./" style="${build_ant_universal_by_xsl_match.xsl}"  in="${element_complexType.xml}"  destdir="./" out="${build_detect_resource_type.xml}" >
+               <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                  <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                  <attribute name="http://saxon.sf.net/feature/initialMode" value="build_detect_resource_type.xml"/>
+               </factory>
+               <!--<param name="match_root_element" expression="wfs:FeatureCollection"/>-->
+               <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+
+               <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+               <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+               <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+               <param name="external_schema" expression="${external_schema}"/>
+               <param name="default_db.dir" expression="${default_db.dir}"/>
+               
+               
+               <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="${threadCount}"/>
+               <param name="ant-launcher.jar" expression="${ant-launcher.jar}"/>
+               <param name="debug_level_param" expression="${debug_level_param}"/>
+               <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="detect_resource_type.xsl" expression="${detect_resource_type.xsl}"/>
+               <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="external_schema_table.path" expression="${external_schema_table.path}"/>-->
+               <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            </xslt>
+            
+            <!--<exec executable="say"  spawn="true" failifexecutionfails="false">
+                     <arg line="-v alex"/>
+                     <arg line="executing multi thread build for relations  by thread count ${threadCount}"/>
+                 </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="executing multi thread build for relations  by thread count ${threadCount}" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+            
+            <!--<delete dir="${build_complexType.local}"/>-->
+            <ant antfile="${build_detect_resource_type.xml}"/>
+            <touch file="${build_detect_resource_type.complete}"/>
+            <!--<exec executable="say" failifexecutionfails="false">
+                        <arg line="-v alex"/>
+                        <arg line="generating relations types complete"/>
+                    </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating relations types complete" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+      </parallel>
+   </target>
+   
    
+   <target name="build_detect_objects_parent_relations.single" depends="build_detect_resource_type.xml.single.task"   description="we generate detect resources parent relations -to dir detect_resource_type "> <!-- R save_build_properties,read_build_properties, -->
+      
+      <parallel threadcount="2">
+         <sequential>
+            <!--<exec executable="say"  failifexecutionfails="false">
+                    <arg line="-v alex"/>
+                    <arg line="generating detect_object_parent_relations_single with distinct object definitions in detect_resource_type directory."/>
+                </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="generating detect_object_parent_relations_single with distinct object definitions in detect_resource_type directory." />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+         <sequential>
+            <delete file="${detect_objects_parent_relations.xml}"/>
+            
+            <xslt basedir="./" style="${detect_objects_parent_relations.xsl}"  in="${empty.xml}"  destdir="./" out="${detect_objects_parent_relations.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/initialTemplate" value="{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport}detect_objects_parent_relations"/>
+               </factory>
+               
+               <param name="p5Type.basedir" expression="${p5Type.basedir}"/>
+               <param name="WPS_Functions" expression="${WPS_Functions.basedir}"/>
+               <param name="default_db.ant-object.basedir" expression="${default_db.ant-object.basedir}"/>
+               <param name="default_db_xml_cache.public" expression="${default_db_xml_cache.public}"/>
+               <param name="external_schema" expression="${external_schema}"/>
+               
+               <param name="default_db.dir" expression="${default_db.dir}"/>
+               <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+               <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+               <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+               <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+               <param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>
+               <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="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="basedir" expression="${basedir}"/>
+               <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            </xslt>
+            <!--<exec executable="say" spawn="true" failifexecutionfails="false">
+                    <arg line="-v alex"/>
+                    <arg line="complete build detect objects parent relations single"/>
+                </exec>-->
+            <ant antfile="${system_ui_info_speech}" target="p5suis:say_to_queue">
+               <property name="p5suis:say_text" value="complete build detect objects parent relations single" />
+            </ant>
+            <!--<ant antfile="${system_ui_info_speech}" target="p5suis:say_from_queue"/>-->
+            
+         </sequential>
+      </parallel>
+      <!--file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/transformed/resources_tree_required_occurs_raport/detect_objects_parent_relations-\-http__x3A____x2F____x2F__biuro.biall__x2D__net.pl__x2F__xmlschema_procesy5__x2F__default_db.xml-->
+   </target>
    
-   <target name="automation_driven.submodule.struct.read.xsd"
+   <target name="automation_driven.submodule.struct.read.xsd" depends="automation_driven.submodule.xsd__struct_write"
       description="to initially generate xsd from automation_driven.submodule.struct.h file">
       <echo>#42 generating ${automation_driven.submodule.struct.read.xsd} using ${automation_driven.submodule.struct.h}</echo>
       <xslt basedir="${automation_driven.submodule.basedir}"
@@ -84,6 +744,51 @@
       </xslt>
    </target>
    
+   
+   <target name="automation_driven.submodule.xsd__struct_write"
+      description="to initially generate h " >
+      <echo>#42 generating from ${automation_driven.submodule.struct.write.xsd} </echo>
+      <xslt basedir="${automation_driven.submodule.basedir}"
+         destdir="${automation_driven.submodule.temp}"
+         force="true"
+         in="${automation_driven.submodule.struct.write.xsd}"
+         out="${automation_driven.submodule.struct.write.h}"
+         style="${automation_driven.submodule.struct.write.xsl}"> <!-- ${automation_driven.submodule.struct.h} -->
+         <factory name="net.sf.saxon.TransformerFactoryImpl">
+            <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+            <!--<attribute name="http://saxon.sf.net/feature/initialTemplate"
+               value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}read.xml"/>-->
+            <attribute name="http://saxon.sf.net/feature/initialMode"
+               value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}write.h"/>
+            <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
+               value="true"/>
+         </factory>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}basedir"
+            expression="${automation_driven.basedir}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}repository"
+            expression="${automation_driven.repository}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}temp"
+            expression="${automation_driven.temp}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}basedir"
+            expression="${automation_driven.submodule.basedir}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}repository"
+            expression="${automation_driven.submodule.repository}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}temp"
+            expression="${automation_driven.submodule.temp}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}h"
+            expression="${automation_driven.submodule.struct.h}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.namespaces.xsd}xsd"
+            expression="${automation_driven.submodule.namespaces.xsd}"/>
+         
+         <classpath location="/opt/local/share/java/saxon9he.jar"/>
+         <xmlcatalog refid="dita-ot.dtd.catalog"/>
+      </xslt>
+   </target>
+   
+   
    <target name="automation_driven.submodule.xsd__struct_files"
       description="to initially generate xsd " depends="automation_driven.submodule.struct.read.xsd">
       <echo>#42 generating ${automation_driven.submodule.struct.read.xsd} using ${automation_driven.submodule.xsd}</echo>
@@ -262,6 +967,7 @@
    </target>-->
    
    <target name="automation_driven.submodule.struct.read__communication.xml"
+      depends="automation_driven.submodule.xsd__struct_files__fixed"
       
       ><!--
          depends="automation_driven.submodule.xsd__struct_files__fixed"
@@ -282,6 +988,8 @@
             <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
                value="true"/>
          </factory>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}struct_files_fix_default.xml"
+            expression="${automation_driven.submodule.xsd__struct_files_fix_default.xml}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}struct_files_fix_default.xml"
             expression="${automation_driven.submodule.xsd__struct_files_fix_default.xml}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}basedir"
@@ -338,6 +1046,8 @@
             <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
                value="true"/>
          </factory>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}struct_files_fix_default.xml"
+            expression="${automation_driven.submodule.xsd__struct_files_fix_default.xml}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}basedir"
             expression="${automation_driven.basedir}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}repository"
@@ -387,6 +1097,8 @@
             <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
                value="true"/>
          </factory>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}struct_files_fix_default.xml"
+            expression="${automation_driven.submodule.xsd__struct_files_fix_default.xml}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}basedir"
             expression="${automation_driven.basedir}"/>
          <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}repository"

+ 17 - 0
SE/schema/default_db_xml_cache.public/build_ant_universal_by_xsl_match.xsl

@@ -40,6 +40,12 @@
     <!--<xsl:param name="detect_resource_type.xsl"/>-->
     <!--<xsl:param name="external_schema_table.path" required="yes"/>-->
     
+    <xsl:param name="default_db.dir"/>
+    <xsl:param name="WPS_Functions"/>
+    <xsl:param name="default_db.ant-object.basedir"/>
+    <xsl:param name="default_db_xml_cache.public"/>
+    <xsl:param name="external_schema"/>
+    <xsl:param name="p5Type.basedir"/>
     
     
     <xsl:template mode="build_element_complexType.xml build_detect_resource_type.xml build_detect_objects_parent_relations.xml build_SimpleSchema.xml" match="system_cache__appinfo:element_complexType"> <!-- for type generate in main build.xml mode -->
@@ -680,6 +686,17 @@
                         <param name="external_schema_table.path" >
                             <xsl:attribute name="expression" select="'${external_schema_table.path}'"/>
                         </param>
+                        
+                        
+                        <param name="default_db.dir" expression="{$default_db.dir}"/>
+                        <param name="WPS_Functions" expression="{$WPS_Functions}"/>
+                        <param name="default_db.ant-object.basedir" expression="{$default_db.ant-object.basedir}"/>
+                        <param name="default_db_xml_cache.public" expression="{$default_db_xml_cache.public}"/>
+                        <param name="external_schema" expression="{$external_schema}"/>
+                        <param name="p5Type.basedir" expression="{$p5Type.basedir}"/>
+                        
+                        
+                        
                         <param name="debug_level_param" expression="{$debug_level_param}"/>
                         <param name="vrtfNamespaces_file">
                             <xsl:attribute name="expression" select="'${vrtfNamespaces_file}'"/>

+ 81 - 65
SE/schema/default_db_xml_cache.public/get_all_xsd.xsl

@@ -30,7 +30,7 @@
     <xsl:strip-space elements="*"/>
     
     
-    
+    <xsl:param name="ignore_SVG.xsd"/>
     <xsl:param name="vc:minVersion" select="'1.1'" />
     <xsl:param name="vc:maxVersion"/>
     <xsl:param name="procesy5_system_schema" select="'../default_db.instance.xml/transformed/procesy5_system_schema.xml'"/>
@@ -82,8 +82,8 @@
             
             <xsl:template match="get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
                 <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals"/>
-            </xsl:template>  
-            -->
+            </xsl:template>  -->
+            
     <xsl:template match="complexType" mode="system_cache__appinfo:get_all_xsd_default_db__equals" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
         <xsl:param name="system_cache__appinfo:get_all_xsd.row" required="yes"/>
         <xsl:if test="not($system_cache__appinfo:get_all_xsd.row/*)">
@@ -364,23 +364,25 @@
             </namespaces_cur>
         </xsl:variable>
         
-        
-        <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
-            <xsl:choose>
-                <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix)  or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
-                    <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
-                    <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
-                    <xsl:copy-of select="namespace::node()"/>
-                    <xsl:copy-of select="@targetNamespace"/>
-                    <xsl:attribute name="vc:minVersion" select="'1.0'"/>
-                    <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
-                    <xsl:comment>#144 when  @targetNamespace exists and prefix not exists</xsl:comment>
-                    <xsl:comment>namespaces_cur/ns/@uri=<xsl:value-of select="$targetNamespace"/> = <xsl:value-of select="$namespaces_cur/namespaces_cur/ns[@uri=$targetNamespace]/@prefix"/> </xsl:comment>
-                    <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
-                    <!--<xsl:for-each select="$namespaces_cur/namespaces_cur/ns">
+        <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
+        <xsl:choose>
+            <xsl:when test="string-length($detect_prefix) &gt; 0">
+                <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
+                    <xsl:choose>
+                        <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix)  or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
+                            <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
+                            <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
+                            <xsl:copy-of select="namespace::node()"/>
+                            <xsl:copy-of select="@targetNamespace"/>
+                            <xsl:attribute name="vc:minVersion" select="'1.0'"/>
+                            <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
+                            <xsl:comment>#144 when  @targetNamespace exists and prefix not exists</xsl:comment>
+                            <xsl:comment>namespaces_cur/ns/@uri=<xsl:value-of select="$targetNamespace"/> = <xsl:value-of select="$namespaces_cur/namespaces_cur/ns[@uri=$targetNamespace]/@prefix"/> </xsl:comment>
+                            <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
+                            <!--<xsl:for-each select="$namespaces_cur/namespaces_cur/ns">
                         <xsl:comment> ns @element=<xsl:value-of select="@element"/>; @prefix=<xsl:value-of select="@prefix"/>;  @uri=<xsl:value-of select="@uri"/>;</xsl:comment>
                     </xsl:for-each>-->
-                  <!--  <xs:debug>
+                            <!--  <xs:debug>
                         <xsl:copy-of select="$namespaces_cur"/>
                     </xs:debug>
                     <xs:debug_filter>
@@ -389,22 +391,22 @@
                     <xs:debug_filter_NS>
                         <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
                     </xs:debug_filter_NS>-->
-                    <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
-                        <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
-                        <xsl:with-param name="detect_targetNamespace" select="@targetNamespace"/>
-                        <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
-                    </xsl:apply-templates>
-                </xsl:when>
-                <xsl:when test="@targetNamespace">
-                    <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
-                    <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
-                    <xsl:copy-of select="namespace::node()"/>
-                    <xsl:copy-of select="@targetNamespace"/>
-                    <xsl:attribute name="vc:minVersion" select="'1.1'"/>
-                    <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
-                    <xsl:comment>#147 when  @targetNamespace and prefix probably exists!</xsl:comment>
-                    <!--<xsl:copy-of select="*" copy-namespaces="yes"/>-->
-                    <!--<xs:debug_test>
+                            <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
+                                <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
+                                <xsl:with-param name="detect_targetNamespace" select="@targetNamespace"/>
+                                <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
+                            </xsl:apply-templates>
+                        </xsl:when>
+                        <xsl:when test="@targetNamespace">
+                            <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
+                            <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
+                            <xsl:copy-of select="namespace::node()"/>
+                            <xsl:copy-of select="@targetNamespace"/>
+                            <xsl:attribute name="vc:minVersion" select="'1.1'"/>
+                            <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
+                            <xsl:comment>#147 when  @targetNamespace and prefix probably exists!</xsl:comment>
+                            <!--<xsl:copy-of select="*" copy-namespaces="yes"/>-->
+                            <!--<xs:debug_test>
                         <xsl:value-of select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix"/>
                     </xs:debug_test>  
                     <xs:debug>
@@ -416,27 +418,35 @@
                     <xs:debug_filter_NS>
                         <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
                     </xs:debug_filter_NS>-->
-                    <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>                    
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
-                    <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
-                    <xsl:copy-of select="namespace::node()"/>
-                    <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
-                    <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
-                    <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
-
-                    <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
-                    <xsl:message>#35 detect. targetNamespace <xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/></xsl:message>
-                    <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
-                    <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
-                        <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
-                        <xsl:with-param name="detect_targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
-                        <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
-                    </xsl:apply-templates>
-                </xsl:otherwise>
-            </xsl:choose>
-        </xsl:element>
+                            <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>                    
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
+                            <xsl:copy-of select="namespace::node()"/>
+                            <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
+                            <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
+                            <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
+                            
+                            <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
+                            <xsl:message>#35 detect. targetNamespace <xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/></xsl:message>
+                            <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
+                            <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
+                                <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
+                                <xsl:with-param name="detect_targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
+                                <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
+                            </xsl:apply-templates>
+                            
+                            
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:element>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:comment>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:comment>
+                <xsl:message>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:message>
+            </xsl:otherwise>
+        </xsl:choose>
+        
     </xsl:template>
     
     
@@ -608,7 +618,7 @@
                             </xsl:when>
                             
                             
-                            <xsl:when test=" contains(document-uri(/), concat($external_schema,'/'))">
+                            <xsl:when test=" contains(document-uri(/), concat($external_schema,'/')) or   document-uri(/) = $external_schema or contains(document-uri(/), concat('file:',$external_schema)) ">
                                 <xsl:comment>#145 Ignored /public_html/external_schema <xsl:value-of select="document-uri(/)"/></xsl:comment>
                                 <system_cache__appinfo:get_all_xsd_external_schema>
                                     <xsl:attribute name="system_cache__appinfo:document-uri" select="system_cache__appinfo:document-uri_for_external_schema_id_namespace_prefix(document-uri(/))"/>
@@ -629,7 +639,7 @@
                                     </xsl:apply-templates>
                                 </system_cache__appinfo:get_all_xsd_external_schema>
                             </xsl:when>
-                            <xsl:when test=" contains(document-uri(/), concat($external_schema_id_namespace_prefix,'/'))">
+                            <xsl:when test=" contains(document-uri(/), concat($external_schema_id_namespace_prefix,'/')) or  document-uri(/) = $external_schema_id_namespace_prefix">
                                 <xsl:comment>#248 Ignored /public_html/external_schema_id_namespace_prefix <xsl:value-of select="document-uri(/)"/></xsl:comment>
                                 <system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
                                     <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
@@ -715,13 +725,13 @@
                             
                             <xsl:when test=" contains(document-uri(/), $procesy5_system_schema_collection_dir)">
                                 <xsl:comment>#701 (!NOT) ignored  schema by contains(document-uri(/), $procesy5_system_schema_collection_dir) (<xsl:value-of select="document-uri(/)"/>) ($procesy5_system_schema_collection_dir=(<xsl:value-of select="$procesy5_system_schema_collection_dir"/>))</xsl:comment>
-                                <xsl:message>#701 (!NOT) ignored  schema by contains(document-uri(/), $procesy5_system_schema_collection_dir) (<xsl:value-of select="document-uri(/)"/>) ($procesy5_system_schema_collection_dir=(<xsl:value-of select="$procesy5_system_schema_collection_dir"/>))</xsl:message>
-                                <!--<system_cache__appinfo:get_all_xsd>
+                                <xsl:message>#701 (!NOT) ignored  schema by contains(document-uri(/), $procesy5_system_schema_collection_dir) (<xsl:value-of select="document-uri(/)"/>) ($procesy5_system_schema_collection_dir=(<xsl:value-of select="$procesy5_system_schema_collection_dir"/>)) ($default_db.dir=<xsl:value-of select="$default_db.dir"/>)</xsl:message>
+                                <system_cache__appinfo:get_all_xsd>
                                     <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $procesy5_system_schema_collection_dir)"/>
                                     <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
                                     <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
                                     <xsl:copy-of select="/"/>
-                                </system_cache__appinfo:get_all_xsd>-->
+                                </system_cache__appinfo:get_all_xsd>
                                 <xsl:comment> #701 test ant-object:location__x3A__default_db.validate = "<xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>" </xsl:comment>
                                 
                             </xsl:when>
@@ -784,11 +794,17 @@
                         </system_cache__appinfo:get_all_xsd>
                         
                         
-                        <system_cache__appinfo:get_all_xsd>
-                            <xsl:copy-of  select="$system_cache__appinfo:SVG.xsd//@system_cache__appinfo:document-uri"/>
-                            <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:SVG.xsd//@targetNamespace"/>
-                            <xsl:copy-of select="$system_cache__appinfo:SVG.xsd"/>
-                        </system_cache__appinfo:get_all_xsd>
+                        <xsl:choose>
+                            <xsl:when test="string-length($ignore_SVG.xsd) &gt; 0"></xsl:when>
+                            <xsl:otherwise>
+                                <system_cache__appinfo:get_all_xsd>
+                                    <xsl:copy-of  select="$system_cache__appinfo:SVG.xsd//@system_cache__appinfo:document-uri"/>
+                                    <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:SVG.xsd//@targetNamespace"/>
+                                    <xsl:copy-of select="$system_cache__appinfo:SVG.xsd"/>
+                                </system_cache__appinfo:get_all_xsd>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        
                         
                         <system_cache__appinfo:get_all_xsd>
                             <xsl:copy-of  select="$system_cache__appinfo:xlink.xsd//@system_cache__appinfo:document-uri"/>

+ 7 - 2
SE/schema/default_db_xml_cache/build_complexType.xsl

@@ -21,7 +21,7 @@
     
     
     <xsl:output indent="yes"/>
-    <xsl:param name="system_cache__appinfo:path.2863.len.limit" select="150"/>
+    <xsl:param name="system_cache__appinfo:path.2863.len.limit" select="250"/>
     <xsl:param name="debug_level_param" /><!-- select="4" -->
     
     <xsl:param name="default_db.instance.xml" required="yes"/>
@@ -1337,7 +1337,7 @@
                 </xsl:variable>
                 <xsl:if test="$restriction_base">
                     <xsl:if test="count($restriction_base//@id[../@system_cache__appinfo:restriction_path=$restriction_path and parent::node()/name()!='system_cache__appinfo:restriction_base'])!=1">
-                        <xsl:message terminate="yes">263:ERROR system_cache__appinfo:build_element cannot found/or too many: count:(<xsl:value-of select="count($restriction_base//@id[../@system_cache__appinfo:restriction_path=$restriction_path  and parent::node()/name()!='system_cache__appinfo:restriction_base'])"/>;) restriction @base for @id:<xsl:value-of select="@id"/>; $xpath_local:<xsl:value-of select="$xpath_local"/>; for element. Case complexType restriction has max_occurs=0 and @base complexType has not such element at all. ? TODO is this real requirement $path:<xsl:value-of select="$path"/>;
+                        <xsl:message terminate="no">263:ERROR system_cache__appinfo:build_element cannot found/or too many: count:(<xsl:value-of select="count($restriction_base//@id[../@system_cache__appinfo:restriction_path=$restriction_path  and parent::node()/name()!='system_cache__appinfo:restriction_base'])"/>;) restriction @base for @id:<xsl:value-of select="@id"/>; $xpath_local:<xsl:value-of select="$xpath_local"/>; for element. Case complexType restriction has max_occurs=0 and @base complexType has not such element at all. ? TODO is this real requirement $path:<xsl:value-of select="$path"/>;
                             count($restriction_base//@id)="<xsl:value-of select="count($restriction_base//@id)"/>" ; 
                             $restriction_path="<xsl:value-of select="$restriction_path"/>";
                             <xsl:for-each select="$restriction_base//*">
@@ -2839,6 +2839,11 @@
             </xsl:apply-templates>
          </xsl:element>
     </xsl:template>
+    
+    <xsl:template match="any|anyAttribute" mode="system_cache__appinfo:build_flat_schema_restriction" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:message>#2844 igored <xsl:value-of select="name()"/></xsl:message>
+    </xsl:template>
+    
     <xsl:template match="*" mode="system_cache__appinfo:build_flat_schema_restriction" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="path" required="yes"/>
         <xsl:param name="targetNamespace" required="yes"/>

+ 12 - 5
SE/schema/default_db_xml_cache/system_cache__resources_tree_generate_xsl_required_occurs_raport/parse_schema_to_generate_id.xsl

@@ -70,11 +70,11 @@
         </xsl:variable>-->
         <xsl:choose>
             <xsl:when test="not($system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list/schema_id_list/schema_id[@id=concat($schema_prefix,'___',$row_id,'-',$candidate_loop)])">
-                <xsl:value-of select="substring( concat(substring($schema_prefix,string-length($schema_prefix)-10,string-length($schema_prefix)),'___',$row_id,'-',$candidate_loop),1,63)"/>
+                <xsl:value-of select="replace(substring( concat(substring($schema_prefix,string-length($schema_prefix)-10,string-length($schema_prefix)),'___',$row_id,'-',$candidate_loop),1,63),'\.','_')"/>
             </xsl:when>
             <xsl:otherwise>
                 <xsl:message>find next unique id - exec loop for data <xsl:value-of select="concat($schema_prefix,'___',$row_id,'-',$candidate_loop)"/></xsl:message>
-                <xsl:value-of select="substring(system_cache__resources_tree_generate_xsl_required_occurs_raport:find_next_unique_id_for_schema($schema_prefix,$row_id,$system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list,$candidate_loop),1,63)"/>
+                <xsl:value-of select="replace(substring(system_cache__resources_tree_generate_xsl_required_occurs_raport:find_next_unique_id_for_schema($schema_prefix,$row_id,$system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list,$candidate_loop),1,63),'\.','_')"/>
             </xsl:otherwise>
         </xsl:choose>
     </xsl:function>
@@ -386,17 +386,24 @@
             </xsl:apply-templates>
         </xsl:element>  
     </xsl:template>
-    <xsl:template match="annotation" mode="system_cache__resources_tree_generate_xsl_required_occurs_raport:generate_element_id_for_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="annotation|appinfo" mode="system_cache__resources_tree_generate_xsl_required_occurs_raport:generate_element_id_for_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
         <xsl:comment>#375 match annotation with (prefix:<xsl:value-of select="substring-before(name(),':')"/>);(root/schema/@xmlns=(<xsl:value-of select="root()/schema/@xmlns"/>))</xsl:comment>
         <!--<xsl:copy-of select="."/>-->
-        <xsl:element name="xs:annotation">
+        <xsl:element name="{name()}">
             <xsl:copy-of select="@*"/>
-            <xsl:copy-of select="*"/>
+            <!--<xsl:copy-of select="*"/>-->
+            <xsl:apply-templates mode="#current" >
+                <xsl:with-param name="system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list" select="$system_cache__resources_tree_generate_xsl_required_occurs_raport:schema_id_list"/>
+                <xsl:with-param name="prefix" select="$prefix"/>
+            </xsl:apply-templates>
         </xsl:element>
     </xsl:template>
     
     
     
+    
     <xsl:template match="@*" mode="system_cache__resources_tree_generate_xsl_required_occurs_raport:generate_element_id_for_schema" >
         <xsl:copy-of select="."/>
     </xsl:template>

+ 19 - 43
SE/stuff/P5_Automation_can-dev-res-working-1930/P5_Automation_can-dev-res-working-1930.ino

@@ -174,6 +174,7 @@ const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
 
 
 #include "__main_struct.h" //lite #include "___main/__main_struct.h"
+//#include "automation_driven.submodule.struct.write.h" 
 #include "__main_trigger_struct.h" //lite #include "___main/__main_trigger_struct.h"
 #include "__main_struct_funct.h" //lite #include "___main/__main_struct_funct.h"
 
@@ -262,9 +263,9 @@ const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
 #endif
 
 
-//#if defined(HAS_TFT_ILI9163C)
+#if defined(HAS_TFT_ILI9163C)
   #include "_TFT_ILI9163C_struct.h"
-//#endif
+#endif
 
 
 #if defined(HAS__PCINT_setup)
@@ -292,8 +293,7 @@ const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
  #include "_Slave_Ports_Protocol_CAN_struct.h" //lite _CAN/
  #include "_Slave_Ports_Protocol_CAN_func.h"
 
- #include "__icon.h" //icon 
- 
+ #include "automation_driven.submodule.struct.write.h"
  
  
  #if defined(HAS_TFT_ILI9163C)
@@ -421,7 +421,7 @@ const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
 #include "_DISPLAY_init.h"
 
 #if defined(HAS_SERIAL_PROXY)
-  //#include "automation_driven.submodule.struct.read__communication_generated.h"
+  #include "automation_driven.submodule.struct.read__communication_generated.h"
 #endif
 
 #if defined(HAS__PCINT_setup)
@@ -431,17 +431,11 @@ const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
 #include "config_Slave_Ports_LOCAL_init.h"
 
 
-
-
 #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  #include "_I2C_driver_Adafruit_PWMServoDriver_init.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
 #endif
 
 
-
-
-
-
 #include "__main_init.h" //lite ___main/
 
  #ifdef DISABLE_LOOP 
@@ -554,50 +548,32 @@ ARDUINO_SETUP_DEF_T HAS_TFT_ILI9163C_A = false ; //todo
   //String LCDarray2 ;
 
 
-  unsigned long time;
-  
-                
+   unsigned long time;                
    #include "_LOOP_LATENCY_COUNTER.h" //lite ___loop/
 
 
-
-
-
 void loop() {
-register long time;
-  time = millis();
-#include "___loop_init.h" //lite ___loop/
- 
- 
- 
-#if defined(HAS_ROTTARY_SW)
-    #include "_ROTTARY_SW_loop.h" //lite _ROTTARY_SW/
-#endif
- 
-
-
+    register long time;
+    time = millis();
+    #include "___loop_init.h" //lite ___loop/
+  
+    #if defined(HAS_ROTTARY_SW)
+        #include "_ROTTARY_SW_loop.h" //lite _ROTTARY_SW/
+    #endif
 
     #ifdef DISABLE_LOOP 
         #include "___DEBUG/___DEBUG_DISABLE_LOOP.h"
     #endif
     #include "__main_loop_top.h" //lite ___loop/
     
-    
-    
-    
- // Serial.println(time);
-      #include "_SlaveID_loop1.h" //todo PCINT //lite ___loop/
-      #include "_ControllerID_loop1.h"  //todo make default //lite ___loop/
-  
-  #include "__main_loop_end.h" //lite ___loop/
-
-
+    #include "_SlaveID_loop1.h" //todo PCINT //lite ___loop/
+    #include "_ControllerID_loop1.h"  //todo make default //lite ___loop/
+    #include "__main_loop_end.h" //lite ___loop/
 
-#if defined(HAS_SERIAL_PROXY)
-    #include "SERIAL_PROXY__loop.h"
-#endif
+    #if defined(HAS_SERIAL_PROXY)
+        #include "SERIAL_PROXY__loop.h"
+    #endif
 
-  
     if(DEBUG_ACTION_TRIG != DEBUG_LAST_ACTION_TRIG)   {
        #if defined(DEBUG_LAST_ACTION_TRIG_ENABLE)
         Serial.print(F("#534   DEBUG_ACTION_TRIG["));Serial.print(DEBUG_ACTION_TRIG);Serial.print(F("] ")); Serial.print(F("]  LAST_DEBUG_ACTION_TRIG["));Serial.print(DEBUG_LAST_ACTION_TRIG);Serial.println(F("] "));

+ 111 - 84
SE/stuff/p5_automation_lite/p5_automation_lite.ino

@@ -5,13 +5,13 @@
 #define DISPLAY_CURSOR_Y_CHARS_DEBUG_DEF 5 //todo proportional
 #define ARDUINO_ARRAY_INDEX_LIMIT_QUEUE_DEF 4
 
-#define ARDUINO_ARRAY_INDEX_LIMIT_I2C_ARRAY_DRIVER_DEF 1
-#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_DEF 0 // 3 //todo debug
+#define ARDUINO_ARRAY_INDEX_LIMIT_I2C_ARRAY_DRIVER_DEF 2//1
+#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_DEF 2 // 3 //todo debug
 
 #define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_DEF 2 //todo test
 
-#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_ITEM_A_DEF  5 //todo debug 
-#define ARDUINO_ARRAY_INDEX_LIMIT_PORTS_DEF 4//3 //todo debug lite
+#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_ITEM_A_DEF  10 //todo debug 
+#define ARDUINO_ARRAY_INDEX_LIMIT_PORTS_DEF 6//4//3 //todo debug lite
 #define ARDUINO_ARRAY_INDEX_LIMIT_PORTS_I2C_DEF 2//2 //todo debug lite
 //#define HAS_DEBUG_ACTION_TRIG
 //#define DEBUG_I2C //to debug _Slave_Ports_I2C_POP etc
@@ -103,7 +103,7 @@
 #include "_time_struct.h"
 
 //lite wyglada na niepotrzebne
-#include "_DRIVER_STATUS_struct.h" //lite
+ #include "_DRIVER_STATUS_struct.h" //lite
 
 #include "__main_I2C_struc.h" //lite ___main/
 #include "__main_static.h" //lite ___main/
@@ -120,24 +120,23 @@
 
 #include "_TASK_TYPES_struct.h"
 #include "_Slave_Ports_Status_QUEUE_struct.h"
+//#include "Slave_Ports_Status_QUEUE.h"
 
-    
 
-#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
-    #include "_I2C_driver_Adafruit_PWMServoDriver_struct.h" //lite - too much ram 4% //reorganize 
-#endif
+#include "_I2C_driver_Adafruit_PWMServoDriver_struct.h" //lite
 
 #include "_CAN_config.h" //lite _CAN/
 
+
+
+
+
+    
 #if defined(HAS_ROTTARY_SW)
   #include "_ROTTARY_SW_config.h" //lite _ROTTARY_SW/
 #endif
 
 
-#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
-    #include "_I2C_driver_Adafruit_PWMServoDriver_config.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
-#endif
-
 #if defined(HAS_ROTTARY_SW)
   #include "_ROTTARY_SW_struct.h" //lite _ROTTARY_SW/
 #endif
@@ -156,10 +155,7 @@
  #if defined(HAS_u8x8)
        #include "u8x8_struct.h"
    #endif
-   
-  #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
-        #include "SERIAL_PROXY_DISPLAY_MASTER__struct.h"
-  #endif
+  
 
 
 #if defined(HAS__PCINT_setup)
@@ -167,13 +163,8 @@
 #endif
 
 
-//BEGIN CAN
-
 
 #include "_CAN_init.h" //lite #include "_CAN/_CAN_init.h"
-//EOF CAN
-
-
 
 
 
@@ -185,8 +176,11 @@
  #include "_Port_I2C_driver_struct.h"
  //#include "_Slave_Ports_Status_struct_lite.h" // lite 
  #include "_Slave_Ports_Status_struct.h"
- #include "_Slave_Ports_Protocol_CAN_struct.h" //lite _CAN/
-  
+// #include "_Slave_Ports_Protocol_CAN_2020_struct.h" 
+#include "_Slave_Ports_Protocol_CAN_struct.h" //lite _CAN/
+#include "_Slave_Ports_Protocol_CAN_func.h"
+
+#include "automation_driven.submodule.struct.write.h"
  
  #if defined(HAS_TFT_ILI9163C)
   #include "_TFT_ILI9163C_func.h"
@@ -200,15 +194,11 @@
 
 #if defined(HAS_u8x8)
     #include "u8x8_func.h"
+    #include "u8x8_init.h"
 #endif
 
  #include "_DISPLAY_DEV.h"
-
-
-
-#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
-     #include "_I2C_driver_Adafruit_PWMServoDriver_func.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
-#endif
+ 
 
     #include "_TASK_TYPES_func.h"
     #include "_Slave_Ports_Status_QUEUE_add_func.h"
@@ -229,6 +219,24 @@
 
 
 
+void DISPLAY_MENU_SELECTOR( DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A, 
+        
+        Slave_Ports_Status_T* Slave_Ports_Status_A , 
+        Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A,
+        
+        
+       // DISPLAY_MENU_ITEM_INDEX_T DISPLAY_MENU_ITEM_INDEX_A ,
+        time_seq_id_T time_seq_id_A ,
+        time_min_run_T time_min_run_A , 
+        //DISPLAY_MENU_SELECTOR_STATUS_T DISPLAY_MENU_SELECTOR_STATUS_A , //; //which mode
+        DISPLAY_MENU_SELECTOR_SWITCH_T DISPLAY_MENU_SELECTOR_SWITCH_A, 
+        DISPLAY_MENU_SELECTOR_oldEncPos_T DISPLAY_MENU_SELECTOR_oldEncPos_A , //; //values
+        DISPLAY_MENU_SELECTOR_encoderPos_T DISPLAY_MENU_SELECTOR_encoderPos_A,
+        
+        DISPLAY_MENU_SELECTOR_triggerCountOld_T DISPLAY_MENU_SELECTOR_triggerCountOld_A,
+        DISPLAY_MENU_SELECTOR_triggerCount_T DISPLAY_MENU_SELECTOR_triggerCount_A) {
+}
+
 
 
 #if defined(HAS_ROTTARY_SW)
@@ -238,7 +246,7 @@
 #include "_time_func.h"
 
 
-#include "DISPLAY_ELEMENT_TO_REFRESH.h"
+
 #include "_Slave_Ports_ttl_decrement_func.h"
 #include "_Slave_Ports_broadcast_func.h"
 #include "TASK_TYPE_T_Set_Port_Smooth_forward__.h"
@@ -248,46 +256,68 @@
 #include "_DISPLAY_queue_pop_func.h"
 #include "_Slave_Ports_Status_QUEUE_func.h"
 
-#include "_Slave_Ports_Protocol_CAN_func.h"
 #include "TASK_TYPE_T_Get_Ports_Status_INPUT_A___.h"
 #include "_Slave_Ports_Status_func.h"
 #include "Slave_Ports_Status__DISPLAY_TARGET.h"
 
-
 #include "TASK_TYPE_T_Set_Ports_Status_LIMITS_A__.h"
 #include "TASK_TYPE_T_Set_Ports_Status_ASSOC.h"
  
 
+
+#include "_CAN_func.h" //lite _CAN/
+
+
+#include "DISPLAY_ELEMENT_TO_REFRESH.h"
+
+
+
+
+
+ 
+
 //L #include "_CAN_func.h" //lite _CAN/
 
-#if defined(HAS_SERIAL_PROXY_DISPLAY_SLAVE) or defined(HAS_SERIAL_PROXY_DISPLAY_MASTER)
-#include <SoftwareSerial.h>
+
+//EOF SERIAL ##############//EOF SERIAL ##############//EOF SERIAL ##############
+#include "SERIAL__init.h"
+
+#if defined(HAS_SERIAL_PROXY_SoftwareSerial)
+    #include <SoftwareSerial.h>
+    //SoftwareSerial SERIAL_PROXY_DEVICE(SERIAL_PROXY_SoftwareSerial_rx_pin, SERIAL_PROXY_SoftwareSerial_tx_pin); // RX, TX
+    #include "SERIAL_PROXY__init.h"
+
+    #if defined(SERIAL_PROXY_DEVICE)
+        #errior when set HAS_SERIAL_PROXY_SoftwareSerial - cannot be set both hardware SERIAL_PROXY_DEVICE 
+    #endif
+#endif
+
+#if defined(HAS_SERIAL_PROXY)  
+    #include "SERIAL__struct.h"
+   // #include "SERIAL__func.h"
 #endif
 
 #if defined(HAS_SERIAL_PROXY_DISPLAY_SLAVE) 
-    SoftwareSerial SERIAL_PROXY_DISPLAY_SLAVE_DEVICE(SERIAL_PROXY_DISPLAY_SLAVE_rx_pin, SERIAL_PROXY_DISPLAY_SLAVE_tx_pin); // RX, TX
+   #define  SoftwareSerial_SLAVE SoftwareSerial
+   #include "SERIAL_PROXY_DISPLAY_SLAVE__init.h"
     #include "SERIAL_PROXY_DISPLAY_SLAVE__func.h"
-#endif
+ #endif
 
 #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
-    SoftwareSerial SERIAL_PROXY_DISPLAY_MASTER_DEVICE(SERIAL_PROXY_DISPLAY_MASTER_rx_pin, SERIAL_PROXY_DISPLAY_MASTER_tx_pin); // RX, TX
+    #define  SoftwareSerial_MASTER SoftwareSerial
+    #include "SERIAL_PROXY_DISPLAY_MASTER__init.h"
     #include "SERIAL_PROXY_DISPLAY_MASTER__func.h"
 #endif
 
+#if defined(HAS_SERIAL_PROXY)
+  //  #define  SoftwareSerial_PROXY SoftwareSerial
+   // #include "SERIAL__struct.h"
+    #include "SERIAL_PROXY__func.h"
 
-//L  #include "_Slave_Ports.h"
- // #include "_Slave_Ports_ttl_decrement_POP.h"
-  // #define _CAN_P_0x102_PWM0x00_0 { _Slave1_ID , "PWM", 0x00, 0 } 
-   //#define _CAN_P_0x102_PWMServoDriver0x40
-   
-    // #define   Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver();
-  //    Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver(0x40);
+    #include "SERIAL__func.h"
+#endif
 
-
-// #define __CSpin 53 // 10 //  chip select
- 
- 
- 
+//EOF SERIAL ##############//EOF SERIAL ##############//EOF SERIAL ##############
 
 #if defined(HAS_TFT_ILI9163C)
     #include "_TFT_ILI9163C_init.h"
@@ -296,32 +326,21 @@
 
 
 #include "_DISPLAY_init.h"
-
-#include "config_Slave_Ports_LOCAL_init.h" //lite
-
-
-#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
- //L #include "_I2C_driver_Adafruit_PWMServoDriver_init.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
+#if defined(HAS_SERIAL_PROXY)
+  #include "automation_driven.submodule.struct.read__communication_generated.h"
 #endif
 
+#include "config_Slave_Ports_LOCAL_init.h"
 
 
 
-
-
-#include "__main_init.h"
-
- #ifdef DISABLE_LOOP 
-     //L   #include "___DEBUG/___DEBUG_DISABLE_INIT.h"
-    #endif
-
- //#include "scan.h"
+#include "__main_init.h" //lite ___main/
 
 void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     Serial.begin(115200);
      //Wire.begin();
       //  scan_h();
-        
+    SPFT(begin);    
         
    #if defined(HAS_u8g2)
   //L     #include "u8g2__setup.h"
@@ -331,17 +350,23 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
          #include "u8x8__setup.h"
    #endif
     
-     #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
-         pinMode(SERIAL_PROXY_DISPLAY_MASTER_rx_pin, INPUT);
-         pinMode(SERIAL_PROXY_DISPLAY_MASTER_tx_pin, OUTPUT);
-         SERIAL_PROXY_DISPLAY_MASTER_DEVICE.begin(38400);
-     #endif
+            
+    #if defined(HAS_SERIAL_PROXY_SoftwareSerial) 
+         pinMode(SERIAL_PROXY_SoftwareSerial_rx_pin, INPUT);
+         pinMode(SERIAL_PROXY_SoftwareSerial_rx_pin, OUTPUT);
+         SERIAL_PROXY_DEVICE.begin(SERIAL_PROXY_SPEED);
+    #endif
+    #if defined(HAS_SERIAL_PROXY)
+        #include "SERIAL_PROXY__setup.h"
+    #endif
+     
 
 }
 
         
 
   unsigned long time;
+unsigned long t_timestamp = 0;
 
     #include "_LOOP_LATENCY_COUNTER.h" //lite ___loop/
 
@@ -349,29 +374,31 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
 void loop() {
     register long time;
     time = millis();
+    
+    
+     if( t_timestamp < millis() ) {
+        t_timestamp = millis() + 4000 ;
+          
+         Serial.print(F("D"));
+         //Serial.print(String(DISPLAY_PHYSICAL_CHAR_A___DISPLAY_textsize_x_A_struct(DISPLAY_PHYSICAL_CHAR_INDEX_DEFAULT_A).Data_Level2_Value_A));
+        
+       }
          #include "___loop_init.h" //lite ___loop/
             
          #if defined(HAS_ROTTARY_SW)
             #include "_ROTTARY_SW_loop.h" //lite _ROTTARY_SW/
          #endif
         
-         #include "__main_loop_top.h" //lite ___loop/
+        #include "__main_loop_top.h" //lite ___loop/
          #include "__main_loop_end.h" //lite ___loop/
          
          
-          #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
-             if (SERIAL_PROXY_DISPLAY_MASTER_DEVICE.available()) {
-                 Serial.print(F("S:"));
-                 Serial.write(SERIAL_PROXY_DISPLAY_MASTER_DEVICE.read());
-                 }
-              /*    if (SERIAL_PROXY_DISPLAY_MASTER.available())
-                 Serial.write(SERIAL_PROXY_DISPLAY_MASTER.read());
-                if (Serial.available())
-                  SERIAL_PROXY_DISPLAY_MASTER.write(Serial.read());
-                  */
-              //  Serial.print(F("MD."));
-              //  SERIAL_PROXY_DISPLAY_MASTER.write("MD");
+#if defined(HAS_SERIAL_PROXY)
+    #include "SERIAL_PROXY__loop.h"
+#endif
 
+          #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
+            
          #endif
 }