a.binder 8 anos atrás
pai
commit
ed877416fa

+ 26 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/build_get_wfs_recurse_xsl.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="get_wgs_recurse_xsl" default="main">
+    <description> To test file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db_xml_cache.public/get_wfs_recurse_xsl.xsl</description>
+    
+    
+    <target name="main">
+        
+        
+        
+        <xslt basedir="${default_db:recurse_ant_basedir}" style="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db_xml_cache.public/get_wfs_recurse_xsl.xsl" in="empty.xml"  destdir="./" out="out.xml" > <!-- out_task.dita.final -->
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                <!--<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>-->
+                <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <!--<param name="webRootUrl" expression="${webRootUrl}" />--> 
+            <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
+            <param name="uuid" expression="${uuid_tested}"/>
+            <param name="username.pass" expression="Vis11on69CZ"/>
+            <!--<param name="basedir" expression="${basedir}"/>-->
+            <param name="temp" expression="${temp}"/>
+            <param name="simpleSchema_dir" expression="/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/default_db.instance.xml/simpleSchema/"/>
+        </xslt>
+        
+    </target>
+</project>

+ 2 - 0
SE/schema/WPS_Functions/get_wfs_recurse_xsl/empty.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<empty></empty>

+ 142 - 0
SE/schema/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." name="graph_gnuplot" default="graph_to_image">
+  <description>to use from to dita conversion from xsl/ant to generate png graphs</description>
+    
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
+    <!-- eof modules WPS_Functions  -->
+    
+    
+    <!-- local shared module individual properties should contain ${project.name} basedir ant its .temp -->
+    <property name="graph_gnuplot" location="${basedir}/WPS_Functions/graph_gnuplot/build_graph_gnuplot.xml"/>
+    <property name="build_graph_gnuplot.childproperties" location="${WPS_Functions.childproperties}/build_graph_gnuplot.properties"/>
+    <property name="graph_gnuplot_basedir" location="${basedir}/WPS_Functions/graph_gnuplot"  />                         
+    <property name="graph_gnuplot_basedir.temp" location="${graph_gnuplot_basedir}/temp"  />
+    <!-- eof shared local module individual properties -->
+    
+    <!-- local individual module properties -->
+    <!--<property name="genpng2.sh" location="${mapserver_gml_to_png_basedir}/map/genpng2.sh"/>-->
+    <property name="gnuplot" value="/opt/local/bin/gnuplot"/>
+    <property name="graph_gnuplot_helper.xsl" location="${basedir}/WPS_Functions/graph_gnuplot/build_graph_gnuplot_helper.xsl"/>
+    <!--<property name="PATH_ADD" value="/opt/local/bin:/usr/bin:/bin"/>-->
+    
+    <target name="write_child_props_to_config_dir" depends="read_build_properties">
+        <echoproperties destfile="${build_graph_gnuplot.childproperties}"/>
+    </target>
+    
+    <target name="graph_gnuplot:create_tempdir">
+        <!--<mkdir dir="${mapserver_gml_to_png_basedir.temp}"/>-->
+        <mkdir dir="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}"/>
+    </target>
+    
+    <target name="clean" description="Clean all output and temp files">
+        <delete dir="${graph_gnuplot_basedir.temp}" failonerror="false"/>
+    </target>
+    
+    <target name="read_build_properties" depends="graph_gnuplot:create_tempdir">
+        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
+        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+    </target>
+    
+    
+    <target name="graph_to_image" depends="graph_gnuplot:create_tempdir" description="To generate image">
+        <property name="srcfile" value="${srcfile}"/>
+        <property name="dstfile" value="${dstfile}"/>
+        <property name="fileindex" value="${fileindex}"/> <!-- to uniq name -->
+        <property name="barchart.gnuplot.dita" value="${srcfile}"/> 
+        <property name="population.dat.dita" value="${srcfile}.dat"/> 
+        <property name="barchart.png.dita" value="${dstfile}"/>
+        <property name="ditadir" value="${ditadir}"/>
+        <property name="uuid" value="${uuid}"/>
+        <property name="images.xml" value="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}/${fileindex}_images.xml"/> 
+        
+        
+        <property name="barchart.gnuplot" value="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}/barchart.${fileindex}.gnuplot"/>
+        <property name="population.dat" value="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}/population.${fileindex}.dat"/>
+        <property name="barchart.png" value="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}/barchart.${fileindex}.png"/>
+            <!--<property name="build_graph_to_image_make.xml" value="${build_graph_to_image_make.xml}.xml"/>-->
+        <!-- example from web http://timmurphy.org/2014/08/11/creating-bar-charts-with-gnuplot/
+            
+            
+        plot <data_file> using <label_column>:xtic(<value_column>) with boxes
+            
+        barchart.gnuplot:
+        set terminal pngcairo font "arial,10" size 500,500
+        set output 'barchart.png'
+        set boxwidth 0.75
+        set style fill solid
+        set title "Population of Australian cities (millions), as of June 2012"
+        plot "population.dat" using 2:xtic(1) with boxes
+        
+        population.dat
+            Adelaide    1.277174
+            Brisbane    2.189878
+            Canberra    0.374658
+            Darwin      0.131678
+            Hobart      0.216959
+            Melbourne   4.246345
+            Sydney      4.667283
+        
+        -->
+        
+        <!-- contains info about images 
+         <image x="1" y="1">
+            <xmin>6524926.16944566666666666690</xmin>
+            <ymin>6012771.75580466666666666690</ymin>
+            <xmax>6525264.83611233333333333310</xmax>
+            <ymax>6013110.42247133333333333310</ymax>
+            <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
+        </image> -->
+        <echo>
+            gnuplot  ${barchart.gnuplot.dita}
+        </echo>
+        
+        <!--<xslt basedir="${graph_gnuplot_basedir.temp}" style="${graph_gnuplot_helper.xsl}" in="${srcfile}"  out="${build_graph_to_image_make.xml}"  >
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+            </factory>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+            <param name="temp" expression="${graph_gnuplot_basedir.temp}"/>
+          <!-\-  <param name="srcfile" expression="${srcfile}"/> <!-\\- zrodlo do zrobienia grapha - dane do przetworzenia -\\->
+            <param name="dstfile" expression="${dstfile}"/> <!-\\- nazwa docelowa -\\->-\->
+            <param name="fileindex" expression="${fileindex}"/>
+            <param name="ditadir" expression="${ditadir}"/>
+            <param name="uuid" expression="${uuid}"/>
+            <param name="images.xml" expression="${images.xml}"/>
+            <param name="barchart.gnuplot" expression="${barchart.gnuplot}"/>
+            <param name="population.dat" expression="${population.dat}"/>
+            <param name="barchart.png" expression="${barchart.png}"/>
+            
+            
+        </xslt>-->
+        
+        <!--<exec executable="${gnuplot}" dir="${graph_gnuplot_basedir.temp}/graph_to_image/${uuid}">-->
+        <exec executable="${gnuplot}" dir="${ditadir}/graph_to_image">
+            <arg line="${barchart.gnuplot.dita}"/>
+            <!--<env key="PATH" path="$PATH:${PATH_ADD}"/>-->
+        </exec>
+        
+        <condition property="barchart.png.empty">
+            <length file="${ditadir}/graph_to_image/${fileindex}.png"  when="equal" length="0"/>
+        </condition>
+        <!--<move file="${images.xml}" tofile="${barchart.png.dita}"/>
+        <mkdir dir="${ditadir}/${fileindex}"/>-->
+        <!--<move todir="${ditadir}/graph_to_image/${fileindex}" >
+            <fileset dir="${graph_gnuplot_basedir}/graph_to_image">
+                <include name="${fileindex}_image-*"/>
+            </fileset>
+        </move>-->
+        <antcall target="graph_to_image.confirm"/>
+    </target>
+    
+    <target name="graph_to_image.confirm" unless="${barchart.png.empty}" description="to confirm that we created .png file">
+        <echoxml file="${dstfile}">
+            <graph fileindex="${fileindex}"/>
+        </echoxml>
+    </target>
+    
+    
+    
+</project>

+ 66 - 0
SE/schema/WPS_Functions/graph_gnuplot/graph_gnuplot_helper.xsl

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    <xsl:param name="uuid" required="yes"/>
+    <xsl:param name="population.dat" required="yes"/>
+    <xsl:param name="barchart.gnuplot" required="yes"/>
+    <xsl:param name="barchart.png" required="yes"/>
+    <xsl:param name="dstfile" required="yes"/>
+    <xsl:param name="ditadir" required="yes"/>
+    
+    <!-- example input xml 
+    $graph_to_image.example
+    -->
+    
+    <!-- example output fileindex
+    
+            <graph x="1" y="1">
+                <title>some title</title>
+                <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/graph_gnuplot/temp/graph_to_image/{$uuid}/image-1-1.png</file>
+            </graph>
+    -->
+    
+    <xsl:variable name="graph_to_image.example">
+        <system_cache__appinfo:graph_to_image.population.dat>
+            <population.dat rowname="Adelaide">1.277174</population.dat>
+            <population.dat rowname="Canberra">Canberra</population.dat>
+            <population.dat rowname="Canberra">0.374658</population.dat>
+        </system_cache__appinfo:graph_to_image.population.dat>
+    </xsl:variable>
+    
+    <!-- example from web http://timmurphy.org/2014/08/11/creating-bar-charts-with-gnuplot/
+            
+            
+        plot <data_file> using <label_column>:xtic(<value_column>) with boxes
+            
+        barchart.gnuplot:
+        set terminal pngcairo font "arial,10" size 500,500
+        set output 'barchart.png'
+        set boxwidth 0.75
+        set style fill solid
+        set title "Population of Australian cities (millions), as of June 2012"
+        plot "population.dat" using 2:xtic(1) with boxes
+        
+        population.dat
+            Adelaide    1.277174
+            Brisbane    2.189878
+            Canberra    0.374658
+            Darwin      0.131678
+            Hobart      0.216959
+            Melbourne   4.246345
+            Sydney      4.667283
+        
+        -->
+    
+    
+    <xsl:template match="system_cache__appinfo:graph_to_image.population.dat">
+        
+    </xsl:template>
+    
+    
+</xsl:stylesheet>

+ 147 - 0
SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xml

@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="../../." name="object_install_se_ant_object" default="system_cache__appinfo:object_install_se_ant_object"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
+    <description> TODO NOT WORKING
+        TO install xsd object in SE/schema/ant_object
+    </description>
+    
+    <!-- modules WPS_Functions - to be copied to any module needed -->
+    <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
+    <property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
+    <property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>
+    <!-- eof modules WPS_Functions  -->
+    
+    
+    <!-- global required properties -->
+    <property name="remote.ant-object" value="${remote.ant-object}"/> <!-- than is default_db.CRM_PROCES/PROCES_INIT/PROCES_INIT.xsd and build.xml (empty) -->
+    <!--<property name="root_build.xml" location="${root_build.xml}"/>-->
+    <!--<property name="procesy5_system_schema.xml" value="${procesy5_system_schema.xml}"/>-->
+    <!--<property name="NamespaceBinding.xml" value="${NamespaceBinding.xml}"/>--> <!-- to bind to propery URL/api obj -->
+    <!--<property name="vrtfNamespaces.xml" value="${vrtfNamespaces.xml}"/>-->
+    
+    <property name="build_object_install_se_ant_object.local_path" value="WPS_Functions/object_install_se_ant_object"/> <!-- To be implemented in other modules to install xsl stylesheets correctly -->
+    <property name="build_object_install_se_ant_object" location="${basedir}/${build_object_install_se_ant_object.local_path}/build_object_install_se_ant_object.xml"/>
+    <property name="build_object_install_se_ant_object_basedir" location="${basedir}/${build_object_install_se_ant_object.local_path}"/>
+    <property name="build_object_install_se_ant_object_basedir.temp" location="${build_object_install_se_ant_object_basedir}/temp"/>
+    <property name="build_object_install_se_ant_object.childproperties" location="${WPS_Functions.childproperties}/build_object_install_se_ant_object.properties"/>
+    
+    <!--<property name="build_object_install_se_ant_object.xsl" location="${default_db_xml_cache.public}/build_object_install_se_ant_object.xsl"/>-->
+    
+    <!-- important temp files -->
+    <property name="build_object_install_se_ant_object.list_schema_elements.xml" location="${build_object_install_se_ant_object_basedir.temp}/list_schema_elements.xml"/>
+    <property name="build_object_install_se_ant_object.list_installed_elements.xml" location="${build_object_install_se_ant_object_basedir.temp}/list_installed_elements.xml"/>
+    <property name="build_object_install_se_ant_object.generate_tables_from_external.xml" location="${build_object_install_se_ant_object_basedir.temp}/generate_tables_from_external.xml"/>
+    <!--<property name="build_properties.xml" location="${public_html}/build_properties.xml" />-->
+    
+    
+    
+    
+    
+    
+   <!-- <property name="table.local" location="${public_html}/table"/>
+    
+    <property name="transformed.local" location="${default_db.instance.xml}/transformed"/>
+    <property name="procesy5_system_schema.xml" value="${transformed.local}/procesy5_system_schema.xml"/>
+    -->
+    
+    <target name="write_child_props_to_config_dir" depends="read_build_properties">
+        <echoproperties destfile="${build_object_install_se_ant_object.childproperties}"/>
+    </target>
+    
+    <target depends="read_build_properties" name="install.xsl" description="Symlink xsl stylesheets etc to ${default_db_xml_cache.public} /  ${build_object_install_se_ant_object.local_path} /build_object_install_se_ant_object.xsl">
+        <symlink link="${build_object_install_se_ant_object.xsl}" resource="${build_object_install_se_ant_object_basedir}/build_object_install_se_ant_object.xsl"/>
+    </target>
+    
+    <target name="read_build_properties">
+        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties" inheritall="yes" inheritrefs="yes"/>
+        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
+        <property name="build_object_install_se_ant_object.xsl" location="${default_db_xml_cache.public}/build_object_install_se_ant_object.xsl"/>
+    </target>
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.create_tempdir">
+        <mkdir dir="${build_object_modeling_new_basedir_temp}"/>
+    </target>
+    <target name="clean" description="Clean all output and temp files">
+        <delete dir="${build_object_modeling_new_basedir_temp}" failonerror="false"/>
+    </target>
+    
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" depends="read_build_properties" description="To generate tables using buildComplexType for objects">
+        <xslt basedir="./" style="${build_object_install_se_ant_object.xsl}"  in="${procesy5_system_schema.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${build_object_install_se_ant_object.generate_tables_from_external.xml}"  force="yes">
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}object_install_se_ant_object.generate_tables_from_external"/>
+            </factory>
+            <!--<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-->
+            <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="vrtfNamespaces_file" expression="${vrtfNamespaces.xml}"/>
+            
+            <param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>
+            <param name="default_db.instance.xml" expression="${default_db.instance.xml}"/>
+            <param name="default_db.instance.xml.symlink" expression="${default_db.instance.xml.symlink}"/>
+            <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
+            <!--<param name="targetNamespace_DEFAULTS" expression="${targetNamespace_DEFAULTS}"/>-->
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+    </target>
+    
+    <!--<target name="system_cache__appinfo:object_install_se_ant_object.detect_parent_relations_external" description="To propery cut objects based on derivation analysis and references"/>-->
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.list_external_schemas" depends="read_build_properties" description="To list to import aviable schemas">
+        <!-- procesy5_system_schema_file -->
+        <ant antfile="${build_root.xml}" target="procesy5_system_schema.xml_if_not_exists"/>
+        
+        <xslt basedir="./" style="${build_object_install_se_ant_object.xsl}"  in="${procesy5_system_schema.xml}"  destdir="${build_object_install_se_ant_object_basedir.temp}" out="${build_object_install_se_ant_object.list_schema_elements.xml}"  force="yes">
+            <factory name="net.sf.saxon.TransformerFactoryImpl">    
+                <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                <attribute name="http://saxon.sf.net/feature/initialMode" value="{http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd}object_install_se_ant_object.list_external_schemas"/>
+            </factory>
+            <!--<param name="procesy5_system_schema_file" expression="${procesy5_system_schema.xml}"/>-->
+            <param name="NamespaceBinding.xml" expression="${NamespaceBinding.xml}"/>
+            <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
+            <param name="external_schema_table.path" expression="${external_schema_table.path}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        <!-- TODO nadac @id obiektom external tak samo i przegrac je spowrotem -->
+        <!-- TODO zbudowac complexType - osobnym zadaniem ant/xsl -->
+        <!-- TODO sprawdizc, czu przypadkiem nie trzeba analizy zaleznosci, czy z tego wystarczy aby pociac obiekty na osobne schematy i refy  -->
+        <!-- TODO jak schema includuje obce - to trzeba tez przetranspoonowac wszelkie importy na nowe namespaces  -->
+    </target>
+    <target name="system_cache__appinfo:object_install_se_ant_object.import_external_schemas" description="To import to import aviable schemas to local/table undestable elements TODO"/>
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object.list_schema_elements" description="To list current elements aviable in schema"/>
+    <target name="system_cache__appinfo:object_install_se_ant_object.list_installed_elements" description="To list current installed elements aviable in schema">
+        
+    </target>
+    <target name="system_cache__appinfo:object_install_se_ant_object.install_new_elements" description="To install uninstalled elements aviable in schema"/>
+    <target name="system_cache__appinfo:object_install_se_ant_object.install_update_elements" description="To update newer/different elements aviable in schema"/>
+    
+    
+    <target name="system_cache__appinfo:object_install_se_ant_object" depends="read_build_properties,system_cache__appinfo:object_install_se_ant_object.create_tempdir" description="ANT_TARGET install new object" >
+        <input addproperty="object_namespace" /> <!-- https://biuro.biall-net.pl/wfs/default_db/table/Rozdzielcza_struktura_wewnetrzna_wsg84.xsd -->
+        <ant antfile="${root_build.xml}" target="procesy5_system_schema.xml_if_not_exists" />
+        <echo> object_modeling_basedir= ${object_modeling_basedir}
+            procesy5_system_schema.xml= ${procesy5_system_schema.xml} 
+            installing to ${object_namespace}
+        </echo>
+        
+        <!--<xslt basedir="./" style="${object_modeling.xsl}"  in="${procesy5_system_schema.xml}"  destdir="./" out="${new_object_by_prototype.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}new_object_by_prototype"/>
+            </factory>
+            <param name="prototype_object_namespace" expression="${prototype_object_namespace}"/>
+            <param name="new_object_namespace" expression="${new_object_namespace}"/>
+            <param name="procesy5_system_schema_collection_dir" expression="${public_html}"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xslt>
+        <loadfile property="new_object_by_prototype.xml_result" srcfile="${new_object_by_prototype.xml}"/>
+        <echo message="${new_object_by_prototype.xml_result}"/>-->
+    </target>
+    
+    
+    
+    
+  
+</project>

+ 1178 - 0
SE/schema/WPS_Functions/object_install_se_ant_object/build_object_install_se_ant_object.xsl

@@ -0,0 +1,1178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <!--<xsl:include href="system_cache__appinfo/TargetNamespaceBindings.xsl"/>-->
+    <!--<xsl:include href="system_cache__appinfo/external_schema_targetNamespace.xsl"/>-->
+    
+    <xsl:include href="../default_db_xml_cache/build_complexType.xsl"/>
+    
+    
+    <xsl:param name="NamespaceBinding.xml" required="yes"/> <!-- to set propery install prefix -->
+    <xsl:param name="vrtfNamespaces.xml" required="yes"/>
+    <xsl:param name="external_schema_table.path" required="yes"/>
+    
+    
+    <xsl:variable name="NamespaceBinding" select="doc($NamespaceBinding.xml)"/>
+    
+    <xsl:variable name="system_cache__appinfo:vrtfNamespaces" select="doc($vrtfNamespaces.xml)"/>
+    
+    
+   
+   
+   
+    <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"/>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external>
+    </xsl:template>
+   
+    <xsl:template match="system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"/>
+        
+   
+    <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+            <xsl:with-param name="system_cache__appinfo:document-uri-orig" select="@system_cache__appinfo:document-uri-orig"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    <!-- XXXXXX MAIN XXXX MAIN XXXX -->
+    <xsl:template match="schema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="system_cache__appinfo:document-uri-orig" required="yes"/>
+        <xsl:variable name="targetNamespace" select="@targetNamespace"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:prefix_from_targetNamespace($system_cache__appinfo:vrtfNamespaces,@targetNamespace)"/>
+        <!--<prefix>
+            <xsl:attribute name="look_for" select="@targetNamespace"/>
+            <xsl:attribute name="found" select="$system_cache__appinfo:vrtfNamespaces//node()[local-name()='ns'][@uri=$targetNamespace][1]/@prefix" />
+            <!-\-<xsl:copy-of select="$vrtfNamespaces"/>-\->
+        </prefix>-->
+        <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="@targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix"/>
+                <xsl:with-param name="targetNamespace_root" select="@targetNamespace"/>
+                <xsl:with-param name="system_cache__appinfo:document-uri-orig"></xsl:with-param>
+            </xsl:apply-templates>
+        </xsl:variable>
+        
+        
+        <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+            <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external>
+                <xsl:copy-of select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"/>
+            </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external>
+        </xsl:variable>
+        
+        <xsl:copy-of select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"/>
+        <!--<xsl:for-each select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external//system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables">
+            
+        </xsl:for-each>-->
+        <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables">
+            <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables" select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external//system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root/*">
+                    <xsl:with-param name="generate_tables_from_external_root.required_by.path_init" select="1"/>
+                </xsl:apply-templates>
+             </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>
+        </xsl:variable>
+        
+        
+        <xsl:copy-of select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables"/>
+        
+        
+        
+        <xsl:for-each-group select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables/system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables/*"  group-by="@targetNamespace">
+            <xsl:variable name="schema.prefix" select="@prefix"/>
+            <xsl:variable name="schema.targetNamespace" select="@targetNamespace"/>
+            <xsl:variable name="schema">
+                <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema">
+                    <!--<xsl:attribute name="namespace" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@generate_tables_from_external_root.path.last_token)"/>-->
+                    <!--<xsl:attribute name="namespace_val" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace(@system_cache__appinfo:namespace_uri,@generate_tables_from_external_root.path.last_token)"/>-->
+                    <!--<xsl:namespace name="{$schema.prefix}" select="$schema.targetNamespace"/>-->
+                    
+                    <!-- namespaces all referenced  -->
+                    <xsl:for-each-group select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables//generate_tables_from_external_root.required_by.path_init[@prefix]" group-by="@targetNamespace" xpath-default-namespace="">
+                        <xsl:namespace name="{@prefix}" select="@targetNamespace"/>
+                    </xsl:for-each-group>
+                    
+                    <xsl:namespace name="system_cache__appinfo" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd'"/>
+                    <xsl:attribute name="targetNamespace" select="concat(@system_cache__appinfo:namespace_uri,'/',@generate_tables_from_external_root.path.last_token)"/>
+                        <xsl:copy-of select="@*"/>
+                    <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="$system_cache__appinfo:document-uri-orig"/>
+                    <xsl:comment>#92 including</xsl:comment>
+                    <!--<generate_tables_from_external_root.required_by.path_init>
+                        <xsl:copy-of select=" current-group()/generate_tables_from_external_root.required_by.path_init/*" xpath-default-namespace=""/>
+                    </generate_tables_from_external_root.required_by.path_init>-->
+                    <xsl:for-each-group select="current-group()/generate_tables_from_external_root.required_by.path_init/*[@prefix]" group-by="@targetNamespace" xpath-default-namespace="">
+                        <xsl:element name="import" namespace="http://www.w3.org/2001/XMLSchema">
+                            <xsl:attribute name="namespace" select="@targetNamespace"/>
+                            <xsl:attribute name="schemaLocation" select="concat(@prefix,'.xsd')"/>
+                        </xsl:element>
+                    </xsl:for-each-group>
+                    <xsl:comment>#81 now groping by type and @lat_token</xsl:comment>
+                    <xsl:for-each-group select="current-group()" group-by="concat(@targetNamespace,name())">
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema" select=".">
+                            <xsl:with-param name="prefix" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                            <xsl:with-param name="prefix_root" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace"/>
+                        </xsl:apply-templates>
+                    </xsl:for-each-group>
+                </xsl:element>
+            </xsl:variable>
+            <xsl:copy-of select="$schema"/>
+            <xsl:comment>#123 saving to <xsl:value-of select="concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')"/></xsl:comment>
+            <xsl:result-document href="{ concat($external_schema_table.path,'/',$system_cache__appinfo:document-uri-orig,'/',$schema.prefix,'.xsd')}">
+                <xsl:copy-of select="$schema"/>
+            </xsl:result-document>
+        </xsl:for-each-group>
+        
+        
+        
+    </xsl:template>
+    
+    <!--<xsl:template match="schema[ not(@targetNamespace = 'external_schema__ksiegi_wieczyste__zsin_1013.xsd')]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:comment>#67 temporary bypased : <xsl:value-of select="@targetNamespace"/> ;  to analyze one schema scenario!</xsl:comment>
+    </xsl:template>-->
+            
+    
+    <!-- EOF XXXXXX MAIN XXXX MAIN XXXX -->
+    
+    
+    <!-- (((( SCHEMA PARSERS PREFIX NAMESPACES ))) -->
+         <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+             <xsl:param name="targetNamespace" required="yes"/>
+             <xsl:param name="prefix" required="yes"/>
+             <xsl:param name="prefix_root"  required="yes"/>
+             <xsl:param name="targetNamespace_root" required="yes"/>
+             <xsl:element name="{name()}">
+                 <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema" select="@*">
+                     <xsl:with-param name="generate_tables_from_external_root.path.last_token" select="@generate_tables_from_external_root.path.last_token"/>
+                     <xsl:with-param name="prefix" select="$prefix"/>
+                     <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                     <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                 </xsl:apply-templates>
+                 <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+                     <xsl:with-param name="prefix" select="$prefix"/>
+                     <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                     <xsl:with-param name="prefix_root" select="$prefix"/>
+                     <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                 </xsl:apply-templates>
+             </xsl:element>
+         </xsl:template>
+    
+        <xsl:template match="generate_tables_from_external_root.required_by.path_init" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+            <xsl:comment>#139 to include <xsl:value-of select=".//@generate_tables_from_external_root.required_by.path"/></xsl:comment>
+        </xsl:template>
+         
+         <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+             <xsl:copy-of select="."/>
+         </xsl:template>
+         
+         <!--<xsl:template match="@type|@ref" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+             <!-\-<xsl:param name="targetNamespace" required="yes"/>-\->
+             <xsl:param name="prefix" required="yes"/>
+             <xsl:param name="generate_tables_from_external_root.path.last_token" required="yes"/>
+             <xsl:param name="prefix_root"  required="yes"/>
+             <xsl:param name="targetNamespace_root" required="yes"/>
+             <xsl:choose>
+                 <xsl:when test="system_cache__appinfo:targetNamespace_from_prefix($system_cache__appinfo:vrtfNamespaces, system_cache__appinfo:get_prefix_from_element(.)) = 'http://www.w3.org/2001/XMLSchema'">
+                     <xsl:attribute name="{name()}" select="."/>
+                 </xsl:when>
+                 <xsl:otherwise>
+                     <xsl:attribute name="{name()}" select="concat( system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,$generate_tables_from_external_root.path.last_token),':', current()  )"/>
+                 </xsl:otherwise>   
+             </xsl:choose>
+             
+         </xsl:template>-->
+        
+    
+    <!-- (((( EOF SCHEMA PARSERS PREFIX NAMESPACES ))) -->
+    
+    
+    
+    
+    
+    <xsl:template match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="element" select="@name"/>
+        <xsl:variable name="element-filename" >
+            <xsl:choose>
+                <xsl:when test="$prefix">
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(concat($prefix,':',$element))"/>
+                </xsl:when>
+                <xsl:when test="$targetNamespace">
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(concat($targetNamespace,':',$element))"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string($element)"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:variable name="prefixed_object_info">
+            <xsl:call-template name="system_cache__appinfo:prefixed_object_info">
+                <xsl:with-param name="prefixed_object" select="$element-filename"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="prefix_token" select="tokenize(system_cache__appinfo:translate_object_escaped_prefix_from_string($element-filename),':')"/>
+        <xsl:variable name="translate_object_escaped_prefix_from_string" select="system_cache__appinfo:translate_object_escaped_prefix_from_string($element-filename)"/>
+        
+        <system_cache__appinfo:build_element>
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="namespace_uri_param" select="$targetNamespace"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="element-filename" select="$element-filename"/>
+            <!--<xsl:attribute name="id" select="@id"/>-->
+            <xsl:attribute name="translate_object_escaped_prefix_from_string" select="$translate_object_escaped_prefix_from_string"/>
+            <xsl:if test="$debug_level &gt; 4">
+                <prefix_token>
+                    <xsl:copy-of select="$prefix_token"/>
+                </prefix_token>
+                <prefixed_object_info>
+                    <xsl:copy-of select="$prefixed_object_info"/>
+                </prefixed_object_info>
+            </xsl:if>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/>
+                     <xsl:variable name="build_element_cache">
+                         <xsl:call-template name="system_cache__appinfo:build_element">
+                             <xsl:with-param name="element" select="@name"/>
+                             <xsl:with-param name="prefix" select="$prefix"/>
+                             <xsl:with-param name="namespace_uri_param" select="$targetNamespace"/>
+                         </xsl:call-template>
+                     </xsl:variable>
+                     <cache>
+                     <xsl:copy-of select="$build_element_cache"/>
+                     </cache>
+                     <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root">
+                         <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                             <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" select="$build_element_cache">
+                                 <xsl:with-param name="prefix" select="$prefix"/>
+                                 <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                                 <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                                 <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                             </xsl:apply-templates>
+                         </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                     </xsl:variable>
+                     <!--<xsl:if test="$debug_level &gt; 4">-->
+                         <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                             <xsl:copy-of select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root"/>
+                         </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                     <!--</xsl:if>-->
+                     <!--<system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>
+                         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables" select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root//system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root/*"/>
+                     </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>-->   
+            </xsl:element>
+        </system_cache__appinfo:build_element>
+    </xsl:template>
+    
+    <xsl:template match="complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="element" select="@name"/>
+        <xsl:variable name="element-filename" >
+            <xsl:choose>
+                <xsl:when test="$prefix">
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(concat($prefix,':',$element))"/>
+                </xsl:when>
+                <xsl:when test="$targetNamespace">
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(concat($targetNamespace,':',$element))"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string($element)"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:variable name="prefixed_object_info">
+            <xsl:call-template name="system_cache__appinfo:prefixed_object_info">
+                <xsl:with-param name="prefixed_object" select="$element-filename"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="prefix_token" select="tokenize(system_cache__appinfo:translate_object_escaped_prefix_from_string($element-filename),':')"/>
+        <xsl:variable name="translate_object_escaped_prefix_from_string" select="system_cache__appinfo:translate_object_escaped_prefix_from_string($element-filename)"/>
+        <xsl:message>#186 parsing CT: <xsl:value-of select="@name"/>  ; </xsl:message>
+        
+        <system_cache__appinfo:build_complexType>
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="namespace_uri_param" select="$targetNamespace"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="element-filename" select="$element-filename"/>
+            <xsl:attribute name="translate_object_escaped_prefix_from_string" select="$translate_object_escaped_prefix_from_string"/>
+            <xsl:if test="$debug_level &gt; 4">
+             <prefix_token>
+                 <xsl:copy-of select="$prefix_token"/>
+             </prefix_token>
+             <prefixed_object_info>
+                <xsl:copy-of select="$prefixed_object_info"/>
+            </prefixed_object_info>
+            </xsl:if>
+            <xsl:variable name="build_element_cache">
+                <xsl:call-template name="system_cache__appinfo:build_complexType">
+                    <xsl:with-param name="complexType" select="@name"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="namespace_uri_param" select="$targetNamespace"/>
+                </xsl:call-template>
+            </xsl:variable>
+            <cache>
+            <xsl:copy-of select="$build_element_cache"/>
+            </cache>
+            <xsl:element name="{name()}">
+                    <xsl:copy-of select="@*"/>
+                    <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root">
+                        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" select="$build_element_cache">
+                                <xsl:with-param name="prefix" select="$prefix"/>
+                                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                            </xsl:apply-templates>
+                        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                    </xsl:variable>
+                    <!--<xsl:if test="$debug_level &gt; -1">-->
+                            <xsl:copy-of select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root"/>                
+                    <!--</xsl:if>-->  
+                    <!--<system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables" select="$system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root//system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root/*"/>
+                    </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables>-->   
+            </xsl:element>
+        </system_cache__appinfo:build_complexType>
+    </xsl:template>
+    
+    <xsl:template match="simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external"/>
+        
+    
+    
+    
+    
+    
+    <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,@name)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@name)"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#135 root element without @type - ...force_refered_complexType (add path) </xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType">
+                    <xsl:with-param name="name" select="@name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,@name)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@name)"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#374 root CT without @type - ? maybe force element? or should be forced from another leafes? </xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"></xsl:copy-of>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    
+    
+    <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+         <!--<xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,@name)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@name)"/>-->
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:attribute name="debug_372_root_CT" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)"/>
+            <xsl:comment>#344A  TODO  fi create ? root_child element without @type - ...force_refered_complexType (not add path) </xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+                    <xsl:with-param name="prefix" select="$prefix"/> <!-- system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)) -->
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+                <xsl:comment> #344A - was but not good - suppresed processing - type should be defined in another leaf</xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root">
+                    <xsl:with-param name="name" select="@name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    <!--<xsl:template match="element[complexType]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <!-\-<xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,@name)"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,@name)"/>-\->
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:attribute name="debug_372_root_CT" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)"/>
+            <xsl:comment>#344Z  RODZAJ_BUDYNKU/ </xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+                    <xsl:with-param name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+                <xsl:comment> #344Z RODZAJ_BUDYNKU/ </xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root">
+                    <xsl:with-param name="name" select="@name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>-->
+    
+    <xsl:template match="complexType[complexType/@name]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        
+        <xsl:variable name="root_type" select="child::node()"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name) )"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#259 root complexType with complexContent/extension/@base = complexType/@name - native element - to be detected last derivation</xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/>
+                <xsl:element name="complexContent" namespace="http://www.w3.org/2001/XMLSchema">
+                    <xsl:element name="extension" namespace="http://www.w3.org/2001/XMLSchema" >
+                        <xsl:attribute name="base" select="complexType/@name"/>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_element" select=".">
+                            <xsl:with-param name="name" select="complexType/@name"/>
+                            <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name,'/',complexType/@name)"/>
+                            <xsl:with-param name="prefix" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                    </xsl:element>
+                </xsl:element>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    <xsl:template match="@ref" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root">
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:attribute name="{name()}" select=" concat($prefix,':', system_cache__appinfo:clean_object_prefix(current()))"/>
+    </xsl:template>
+    
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    <xsl:template match="@type" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type"/>
+        
+    
+    <xsl:template match="@name" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type">
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+       <!-- <xsl:attribute name="debug_422_prefix" select="$prefix"/>
+        <xsl:attribute name="debug_422_current" select=" current()"/>-->
+        <xsl:attribute name="type" select=" concat($prefix,':', current())"/>
+        <xsl:attribute name="name" select="."/>
+        
+    </xsl:template>
+    
+    <xsl:template match="element[@type]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@type"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    <xsl:template match="complexType[@type]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@type"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@type"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@type"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@type"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:comment>#319 complextype std from child</xsl:comment>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/> <!-- $generate_tables_from_external_root.name -->
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    <xsl:template match="sequence" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+            <xsl:element name="{name()}">
+                <xsl:copy-of select="@*"/><xsl:comment>#295 seq in child mode</xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="simpleType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
+        
+    
+    <xsl:template match="element[@ref]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+            <xsl:element name="{name()}">
+                <xsl:choose>
+                    <xsl:when test="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"><!-- jest ref do czegos co ma CT -->
+                        <xsl:attribute name="debug_587_root_complextype" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@ref)"/>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root" select="@*">
+                            <xsl:with-param name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
+                            <xsl:with-param name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                        <generate_tables_from_external_root.required_by.path_init>
+                                <xsl:attribute name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
+                            <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:object_install_se_ant_object.root_complextype(element,@ref))"/>
+                        </generate_tables_from_external_root.required_by.path_init>
+                    </xsl:when>
+                    <xsl:otherwise><!-- jest ref tylko do roota -->
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_ref_to_root" select="@*">
+                            <xsl:with-param name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
+                            <xsl:with-param name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace, system_cache__appinfo:clean_object_prefix(@ref))"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                        <generate_tables_from_external_root.required_by.path_init>
+                            <xsl:attribute name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
+                            <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace_root, system_cache__appinfo:clean_object_prefix(@ref))"/>
+                        </generate_tables_from_external_root.required_by.path_init>
+                    </xsl:otherwise>
+                </xsl:choose>
+                
+                
+                <xsl:comment>#191 element[@ref] on child - should not be more transformed</xsl:comment>
+                    <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child"/>-->
+                
+            </xsl:element>
+    </xsl:template>
+    
+    
+    <xsl:template match="element[@name and complexType and not(@type)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        
+        <xsl:element name="{name()}">
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_CT_ref" select="@*">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+            <xsl:comment>#320A  complexContent in child - try to map to root type schema </xsl:comment>
+            <generate_tables_from_external_root.required_by.path_init>
+                <xsl:attribute name="prefix" select="$prefix"/>
+                <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            </generate_tables_from_external_root.required_by.path_init>
+            <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                <xsl:attribute name="debug_579_root_complextype" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)"/>
+                <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path_new"/>
+                <xsl:attribute name="generate_tables_from_external_root.required_by.path" select="$generate_tables_from_external_root.path"/>
+                <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+                <xsl:attribute name="prefix" select="$prefix"/>
+                <xsl:comment>#320A complexContent in child - force to make Table with name based on current path (copy element with @ref + make CT) </xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" select=".">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path_new,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+        </xsl:element>
+    </xsl:template>
+    
+    
+    <xsl:template match="element[@name and complexType and @type]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        
+        <xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+        
+        <xsl:element name="{name()}">
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_CT_ref" select="@*">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+            <xsl:comment>#320T  complexContent with type in child - try to map to root type schema </xsl:comment>
+            <generate_tables_from_external_root.required_by.path_init>
+                <xsl:attribute name="prefix" select="$prefix"/>
+                <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            </generate_tables_from_external_root.required_by.path_init>
+            <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                <xsl:attribute name="debug_579_root_complextype" select="system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name)"/>
+                <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path_new"/>
+                <xsl:attribute name="generate_tables_from_external_root.required_by.path" select="$generate_tables_from_external_root.path"/>
+                <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+                <xsl:attribute name="prefix" select="$prefix"/>
+                <xsl:comment>#320T complexContent in child - force to make Table with name based on current path (copy element with @ref + make CT) </xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_child" select=".">
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path_new,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#376 element child - not type - error? to be fixed schema!</xsl:attribute>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="element[@type and not(complexType)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@type"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@type"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+            <xsl:element name="{name()}">
+                <xsl:choose>
+                    <xsl:when test="system_cache__appinfo:targetNamespace_from_prefix($system_cache__appinfo:vrtfNamespaces, system_cache__appinfo:get_prefix_from_element(@type)) = 'http://www.w3.org/2001/XMLSchema'">
+                        <xsl:copy-of select="@*"/>
+                        <xsl:comment>#203a - type typu xs:</xsl:comment>
+                        <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_element" select="."/>-->
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type" select="@*">
+                            <xsl:with-param name="prefix" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                        <xsl:comment>#203b - type innego typu niż xs: - trzeba stworzyc ten typ</xsl:comment>
+                        <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" select="."/>-->
+                        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+                            <!--<xsl:attribute name="debug_679_targNStype" select="system_cache__appinfo:targetNamespace_from_prefix($system_cache__appinfo:vrtfNamespaces, system_cache__appinfo:get_prefix_from_element(@type))"/>-->
+                            <xsl:element name="complexType" namespace="http://www.w3.org/2001/XMLSchema">
+                                <xs:complexType name="{@name}">
+                                    <xs:complexContent>
+                                        <xs:extension base="{@type}"/>
+                                    </xs:complexContent>
+                                </xs:complexType>
+                            </xsl:element>
+                        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+                            <xsl:element name="element">
+                                <xsl:attribute name="name" select="@name"/>
+                                <xsl:attribute name="type" select="@type"/>
+                            </xsl:element>
+                        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="name" required="yes"/>
+        <xsl:param name="generate_tables_from_external_root.name" select="$name"/>
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#359A complexType forced now contintue childs</xsl:comment>
+            <xsl:element name="{name()}" >
+                <xsl:copy-of select="@*"/>
+                <xsl:attribute name="name" select="$name"/>
+                <!--<xsl:element name="complexContent" namespace="http://www.w3.org/2001/XMLSchema">
+                        <xsl:element name="extension" namespace="http://www.w3.org/2001/XMLSchema" >
+                            <xsl:attribute name="base" select="complexType/@name"/>
+                            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_element" select=".">
+                                <xsl:with-param name="name" select="complexType/@name"/>
+                                <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name,'/',complexType/@name)"/>
+                                <xsl:with-param name="prefix" select="$prefix"/>
+                                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                            </xsl:apply-templates>
+                        </xsl:element>
+                    </xsl:element>-->
+                <xsl:comment>#359A -  parsing - CT will not be supplied from another leaf</xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    <xsl:template match="complexType[ sequence and not (@type) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="name" required="yes"/>
+        <xsl:param name="generate_tables_from_external_root.name" select="$name"/>
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#359C complexType forced now contintue childs</xsl:comment>
+            <xsl:element name="{name()}" >
+                <xsl:copy-of select="@*"/>
+                <xsl:attribute name="name" select="$name"/>
+                <xsl:comment>#359C -  parsing - CT is local leaf</xsl:comment>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType_root" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="name" required="yes"/>
+        <xsl:param name="generate_tables_from_external_root.name" select="$name"/>
+        <xsl:param name="generate_tables_from_external_root.path" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#359B complexType forced now contintue childs</xsl:comment>
+            <xsl:element name="{name()}" >
+                <xsl:copy-of select="@*"/>
+                <xsl:attribute name="name" select="$name"/>
+                <xsl:element name="complexContent" namespace="http://www.w3.org/2001/XMLSchema">
+                    <xsl:element name="extension" namespace="http://www.w3.org/2001/XMLSchema" >
+                        <xsl:attribute name="base" select="concat(system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( current(),@name)),':',@name )"/>
+                    </xsl:element>
+                </xsl:element>
+                <xsl:comment>#359B - not parsing - CT will be supplied from another leaf</xsl:comment>
+                <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>-->
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/>
+            <xsl:comment>#232 forced from ComplexType (generate_tables_from_external_root.name = <xsl:value-of select="$generate_tables_from_external_root.name"/>) </xsl:comment>
+            <xsl:element name="element" namespace="http://www.w3.org/2001/XMLSchema">
+                <xsl:copy-of select="@*"/>
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child">
+                    <xsl:with-param name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                    <xsl:with-param name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+                    <xsl:with-param name="prefix" select="$prefix"/>
+                    <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                    <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                    <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                </xsl:apply-templates>
+            </xsl:element>
+        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+    </xsl:template>
+    
+    
+    <xsl:template match="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables">
+        <xsl:comment>#166 ignored child to be set root </xsl:comment>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables">
+        <xsl:param name="generate_tables_from_external_root.required_by.path_init"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:copy-of select="../@*"/>
+            <xsl:choose>
+                <xsl:when test="../@generate_tables_from_external_root.path">
+                    <xsl:variable name="generate_tables_from_external_root.path.last" select="../@generate_tables_from_external_root.path"/>
+                    <xsl:variable name="generate_tables_from_external_root.path.last_token" select="tokenize($generate_tables_from_external_root.path.last,'/')[ count(tokenize($generate_tables_from_external_root.path.last,'/'))]"/>
+                    <xsl:attribute name="generate_tables_from_external_root.path.last_token" select="$generate_tables_from_external_root.path.last_token"/>
+                    <!--<xsl:attribute name="generate_tables_from_external_root.path.last" select="tokenize(.././@generate_tables_from_external_root.path,'/')[ count(tokenize(../@generate_tables_from_external_root.path,'/'))]"/>-->
+                </xsl:when>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="$generate_tables_from_external_root.required_by.path_init">
+                    <generate_tables_from_external_root.required_by.path_init>
+                        <xsl:for-each select=".//*[@prefix]">
+                            <generate_tables_from_external_root.required_by.path_init>
+                                <xsl:attribute name="generate_tables_from_external_root.required_by.path" select="@generate_tables_from_external_root.required_by.path"/>
+                                <xsl:attribute name="prefix" select="@prefix"/>
+                                <xsl:attribute name="targetNamespace" select="@targetNamespace"/>
+                            </generate_tables_from_external_root.required_by.path_init>
+                        </xsl:for-each>
+                    </generate_tables_from_external_root.required_by.path_init>
+                </xsl:when>
+            </xsl:choose>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables"/>
+        </xsl:element>
+    </xsl:template>
+    
+    
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_CT_ref">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    
+    <xsl:template match="@type" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_CT_ref"/>
+        
+    
+    <xsl:template match="@name" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_CT_ref">
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:attribute name="ref" select=" concat($prefix,':',current())"/>
+    </xsl:template>
+    
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    
+    <xsl:template match="@type" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type">
+        <xsl:attribute name="ref" select="."/>
+    </xsl:template>
+    
+    <xsl:template match="import|group|attributeGroup|include|annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        
+    </xsl:template>
+    <xsl:template match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <error_unantended><xsl:attribute name="name" select="name()"/></error_unantended>
+    </xsl:template>
+   
+    <xsl:template match="comment()|text()" mode="system_cache__appinfo:object_install_se_ant_object.list_external_schemas"/>
+    
+    <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:object_install_se_ant_object.list_external_schemas">
+        <system_cache__appinfo:object_install_se_ant_object.list_external_schemas>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_schemas"/>
+        </system_cache__appinfo:object_install_se_ant_object.list_external_schemas>
+    </xsl:template>
+    
+    <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:object_install_se_ant_object.list_external_schemas">
+        <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace">
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace"/>
+        </xsl:variable>
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_objects"  xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+            <xsl:with-param name="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace" select="$system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    <xsl:template match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.list_external_objects"><!-- root elements without types must be separate object -->
+        <xsl:param name="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace" required="yes"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="../@*"/>
+            <xsl:attribute name="targetNamespace" select="$system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace//@targetNamespace"/> <!-- todo targetnamespace musi byc powiazany z instalowanym API z TargetNamespaceBindings.xml + parametrem konfiguracyjnym - czyli to wstepne targetnamespace -->
+            <xsl:attribute name="targetNamespace_proposal" select="system_cache__appinfo:object_install_se_ant_object.merge_external_targetNamespace($system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace//@targetNamespace,@name)"/>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_objects">
+                <xsl:with-param name="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace" select="$system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.list_external_objects"/>
+    
+    
+    
+    <xsl:template match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:object_install_se_ant_object.list_external_objects"><!-- root elements without types must be separate object -->
+        <xsl:param name="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace" required="yes"/>
+        <object>
+            <xsl:attribute name="name" select="@name"/>
+            <xsl:attribute name="targetNamespace" select="$system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace//@targetNamespace"/> <!-- todo targetnamespace musi byc powiazany z instalowanym API z TargetNamespaceBindings.xml + parametrem konfiguracyjnym - czyli to wstepne targetnamespace -->
+            <xsl:attribute name="targetNamespace_proposal" select="system_cache__appinfo:object_install_se_ant_object.merge_external_targetNamespace($system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace//@targetNamespace,@name)"/>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables"></xsl:apply-templates>
+        </object>
+    </xsl:template>
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType"/>
+    </xsl:template>
+    
+    <xsl:template match="sequence" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType_sequence"/>
+    </xsl:template>
+    
+    <xsl:template match="element" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        TODO TODO need to build object natively!!! by buildComplexType!
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:comment>Unantended object <xsl:value-of select="name()"/></xsl:comment>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+       <xsl:comment>Unantended object <xsl:value-of select="name()"/></xsl:comment>
+    </xsl:template>
+    
+    <xsl:template match="text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables"/>
+    
+    <xsl:template match="text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.list_external_tables_complexType"/>
+    
+    <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:list_schema_elements">
+        <system_cache__appinfo:list_schema_elements>
+            <xsl:apply-templates mode="system_cache__appinfo:list_schema_elements"/>
+        </system_cache__appinfo:list_schema_elements>
+    </xsl:template>
+    
+    <xsl:template match="system_cache__appinfo:get_all_xsd" mode="system_cache__appinfo:list_schema_elements">
+        <xsl:apply-templates mode="system_cache__appinfo:list_schema_elements"/>
+    </xsl:template>
+    
+    <xsl:template match="xs:schema" mode="system_cache__appinfo:list_schema_elements">
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <system_cache__appinfo:prefix><xsl:value-of select="system_cache__appinfo:prefix_from_targetNamespace($system_cache__appinfo:vrtfNamespaces,@targetNamespace)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></system_cache__appinfo:prefix>
+            <system_cache__appinfo:prefix_binding><xsl:value-of select="system_cache__appinfo:get_default_db_obj_url_table_name(@targetNamespace)"/></system_cache__appinfo:prefix_binding>
+        <xsl:apply-templates mode="system_cache__appinfo:list_schema_elements"/>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="system_cache__appinfo:list_schema_elements">
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:list_schema_elements"/>
+    
+    <xsl:template match="text()|comment()" mode="system_cache__appinfo:list_schema_elements"/>
+    
+    <xsl:function name="system_cache__appinfo:object_install_se_ant_object.root_complextype">
+        <xsl:param name="system_cache__appinfo:build_complexType"/>
+        <xsl:param name="force_name"/>
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" select="$system_cache__appinfo:build_complexType">
+            <xsl:with-param name="force_name" select="$force_name"/>
+        </xsl:apply-templates>
+    </xsl:function>
+    
+    <xsl:template match="complexType" mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="force_name"/>
+        <xsl:choose>
+            <xsl:when test="complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.root_complextype"/>
+            </xsl:when>
+            <xsl:when test="@name">
+                <xsl:value-of select="@name"/>
+            </xsl:when>
+            <xsl:when test="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" select="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="$force_name"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    <xsl:template match="*|text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" />
+        
+    
+    
+</xsl:stylesheet>

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

@@ -8,7 +8,7 @@
     <xsl:param name="DEFAULTS__SERVER_ADDRESS" select="'biuro.biall-net.pl/SE/version-git/'"/><!--  parametr do wyrzucenia w defaults - do umozliwienia szybkiego wchodzenia do systemu powiazania szkolenia -->
     
     
-    <xsl:param name="CRM_PROCES.xml"  required="yes"/>
+    <xsl:param name="CRM_PROCES.xml"   required="yes"/>
     <!--<xsl:import href="../../default_db.instance.xml/"/>-->
     <xsl:include href="escaped_html_to_xml.xsl"/>
     

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

@@ -542,7 +542,7 @@
             <!--<xsl:copy-of select="@*"/>-->
             <!--<xsl:apply-templates select="@*"/>-->
             <xsl:variable name="position" select="position()"/>
-            <xsl:variable name="position_related" >
+            <xsl:variable name="position_related">
                 <xsl:choose>
                     <xsl:when test="@feature_pos_parent"><xsl:value-of select="@feature_pos_parent"/></xsl:when>
                     <xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise>

+ 64 - 35
SE/schema/default_db_xml_cache.public/builds_to_ant.xsl

@@ -9,7 +9,9 @@
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
-    <xsl:include href="get_all_xsd.xsl"/><xsl:param name="temp" required="yes"/>
+    <xsl:include href="get_all_xsd.xsl"/>
+    
+    <xsl:param name="temp" required="yes"/>
     <xsl:param name="default_antfile"/>
     <!--<xsl:param name="loop_xpath" required="yes"/>-->
     <xsl:param name="loop_xpath_real" required="yes"/>
@@ -28,10 +30,11 @@
     <xsl:param name="process_locks"/>
     <xsl:param name="uuid" required="yes"/>
     <xsl:param name="debug" select="1"/>
-    
     <xsl:param name="xml_id" required="yes"/>
     <xsl:param name="recurse_ant_basedir.recurse_cache"/>
-    <xsl:param name="typeNameRoot" required="yes"/><xsl:variable name="xpath_query_test">
+    <xsl:param name="typeNameRoot" required="yes"/>
+    
+    <xsl:variable name="xpath_query_test">
         <xsl:choose>
             <xsl:when test="$xpath_query_test.xml">
                 <xsl:copy-of select="doc($xpath_query_test.xml)"/>
@@ -131,20 +134,21 @@
                                 <!--<ant antfile="{$temp}/{$loop_xpath}/{.}/build.xml" dir="." inheritall="false">
                                     <property name="parallel_pos" value="{position()}"/>
                                 </ant>--> <!-- CHANGED from ${temp}/{.} -->
-                                <sequential><java>
-                                    <xsl:attribute name="jar" select="$ant-launcher.jar"/>
-                                    <!--<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-->
-                                    <!--<xsl:attribute name="dir" select="'${basedir}'"/>-->
-                                    <xsl:attribute name="fork" select="'true'"/>
-                                    <xsl:attribute name="clonevm" select="'false'"/>
-                                    <xsl:attribute name="failonerror" select="'true'"/>
-                                    <!--<xsl:attribute name="append" select="'false'"/>-->
-                                    <!--<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-->
-                                    <!--<xsl:attribute name="output" select="concat($temp,'/',.,'_out.log')"/>-->
-                                    <arg value="-buildfile"/>
-                                    <arg value="{$temp}/{$loop_xpath}/{.}/build.xml"/>
-                                </java>
-                            <loadfile  property="builds_to_ant_cache_fid_ant{$loop_path_recurs}{$loop_xpath_real}{$xml_id}.{$feature_pos_parent}.{position()}" srcfile="{$temp}/{$loop_xpath}/{position()}.fid_parent.txt"/>
+                                <sequential>
+                                    <java>
+                                        <xsl:attribute name="jar" select="$ant-launcher.jar"/>
+                                        <!--<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-->
+                                        <!--<xsl:attribute name="dir" select="'${basedir}'"/>-->
+                                        <xsl:attribute name="fork" select="'true'"/>
+                                        <xsl:attribute name="clonevm" select="'false'"/>
+                                        <xsl:attribute name="failonerror" select="'true'"/>
+                                        <!--<xsl:attribute name="append" select="'false'"/>-->
+                                        <!--<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-->
+                                        <!--<xsl:attribute name="output" select="concat($temp,'/',.,'_out.log')"/>-->
+                                        <arg value="-buildfile"/>
+                                        <arg value="{$temp}/{$loop_xpath}/{.}/build.xml"/>
+                                    </java>
+                                    <loadfile  property="builds_to_ant_cache_fid_ant{$loop_path_recurs}{$loop_xpath_real}{$xml_id}.{$feature_pos_parent}.{position()}" srcfile="{$temp}/{$loop_xpath}/{position()}.fid_parent.txt"/>
                                     
                                     <!-- THIS SHOULD BE THE SAME AS IN build_recurse_ant.xsl/builds_to_ant.xsl (to be template) line 1000 name CACHE_COPY_TASK - EOF -->
                                     
@@ -176,7 +180,9 @@
                                     
                                     <!-- EOF THIS SHOULD BE THE SAME AS IN build_recurse_ant.xsl/builds_to_ant.xsl (to be template) line 1000 name CACHE_COPY_TASK  -->
                                     
-                                </sequential></xsl:for-each>
+                                </sequential>
+                                
+                            </xsl:for-each>
                         </parallel>
                         <!--<delete>
                             <xsl:attribute name="file" select="concat('${builds_to_ant_lock',$loop_path_recurs,$loop_xpath_real,'}')"/>
@@ -305,23 +311,46 @@
                                         <xsl:attribute name="line" select="concat('-Dparallel_pos=',position())"/>
                                     </xsl:element>
                                 </exec>-->
-                                <sequential><java>
-                                    <xsl:attribute name="jar" select="$ant-launcher.jar"/>
-                                    <!--<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-->
-                                    <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/',.)"/>
-                                    <xsl:attribute name="fork" select="'true'"/>
-                                    <xsl:attribute name="clonevm" select="'false'"/>
-                                    <xsl:attribute name="newenvironment" select="'true'"/>
-                                    <xsl:attribute name="failonerror" select="'true'"/>
-                                    <!--<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-->
-                                    <!--<xsl:attribute name="output" select="concat(.,'_out.log')"/>-->
-                                    <arg value="-buildfile"/>
-                                    <arg value="{$temp}/{$loop_xpath}/{.}/build_root.xml"/>
-                                    <xsl:element name="arg">
-                                        <xsl:attribute name="line" select="concat('-Dparallel_pos=',position())"/>
-                                    </xsl:element>
-                                </java>
-                            </sequential></xsl:for-each>
+                                <sequential>
+                                    <java>
+                                        <xsl:attribute name="jar" select="$ant-launcher.jar"/>
+                                        <!--<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-->
+                                        <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/',.)"/>
+                                        <xsl:attribute name="fork" select="'true'"/>
+                                        <xsl:attribute name="clonevm" select="'false'"/>
+                                        <xsl:attribute name="newenvironment" select="'true'"/>
+                                        <xsl:attribute name="failonerror" select="'true'"/>
+                                        <!--<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-->
+                                        <!--<xsl:attribute name="output" select="concat(.,'_out.log')"/>-->
+                                        <arg value="-buildfile"/>
+                                        <arg value="{$temp}/{$loop_xpath}/{.}/build_root.xml"/>
+                                        <xsl:element name="arg">
+                                            <xsl:attribute name="line" select="concat('-Dparallel_pos=',position())"/>
+                                        </xsl:element>
+                                    </java>
+                                    
+                                    <!--<loadfile  property="builds_to_ant_cache_fid_ant{$loop_path_recurs}{$loop_xpath_real}{$xml_id}.{$feature_pos_parent}.{position()}" srcfile="{$temp}/{$loop_xpath}/{position()}.fid_parent.txt"/>
+                                    <echo> #321 builds_to_ant detected fid *.fid_parent.txt <xsl:value-of select="concat('${builds_to_ant_cache_fid_ant',$loop_path_recurs,$loop_xpath_real,$xml_id,'.',$feature_pos_parent,'.', position(),'}')"/></echo>
+                                    <mkdir>
+                                        <xsl:attribute name="dir" select="concat($recurse_ant_basedir.recurse_cache,'/_ant__',system_cache__appinfo:escape_object_prefix_to_string($typeNameRoot),'.','${builds_to_ant_cache_fid_ant',$loop_path_recurs,$loop_xpath_real,$xml_id,'.',$feature_pos_parent,'.', position(),'}')"/>
+                                    </mkdir>
+                                    
+                                    <copy failonerror="false"> <!-\- we copy important files to cache. Recursed cached files should be already aliased in child process (smallest parts)  -\->
+                                        <xsl:attribute name="todir" select="concat($recurse_ant_basedir.recurse_cache,'/_ant__',system_cache__appinfo:escape_object_prefix_to_string($typeNameRoot),'.','${builds_to_ant_cache_fid_ant',$loop_path_recurs,$loop_xpath_real,$xml_id,'.',$feature_pos_parent,'.', position(),'}')"/>
+                                        <fileset dir="{$temp}/{$loop_xpath}/../" includes="{tokenize($loop_xpath_real,'/')[count(tokenize($loop_xpath_real,'/'))]}.*" />
+                                        <fileset dir="{$temp}/{$loop_xpath}/../" includes="{ $feature_pos}.fid_parent.txt" /><!-\- ostatni po / wartosc sciezki -\->
+                                    </copy>
+                                    
+                                    <mkdir>
+                                        <xsl:attribute name="dir" select="concat($recurse_ant_basedir.recurse_cache,'/_ant__',system_cache__appinfo:escape_object_prefix_to_string($typeNameRoot),'.','${builds_to_ant_cache_fid_ant',$loop_path_recurs,$loop_xpath_real,$xml_id,'.',$feature_pos_parent,'.', position(),'}','/',$xml_id,'.',$feature_pos_parent,'.', position())"/>
+                                    </mkdir>
+                                    <copy failonerror="false"> <!-\- we copy important files to cache. Recursed cached files should be already aliased in child process (smallest parts)  -\->
+                                        <xsl:attribute name="todir" select="concat($recurse_ant_basedir.recurse_cache,'/_ant__',system_cache__appinfo:escape_object_prefix_to_string($typeNameRoot),'.','${builds_to_ant_cache_fid_ant',$loop_path_recurs,$loop_xpath_real,$xml_id,'.',$feature_pos_parent,'.', position(),'}','/',$xml_id,'.',$feature_pos_parent,'.', position()  )"/>
+                                        <fileset dir="{$temp}/{$loop_xpath_real}" includes="*" /> <!-\- {@xml_id}. -\->
+                                    </copy>-->
+                                    
+                                </sequential>
+                            </xsl:for-each>
                         </parallel>
                         
                         

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

@@ -254,7 +254,7 @@
     
     <!-- to ignore -->
     <xsl:template match="*" mode="task"/>
-    
+    <!--<xsl:template match="*" />-->
     
     <xsl:template match="CRM_IMAGE_CRM_PROCES|CRM_IMAGE_CRM_LISTA_ZASOBOW|CRM_IMAGE_CRM_WSKAZNIK" mode="postprocess_images_unique">
         <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>

+ 48 - 30
SE/schema/default_db_xml_cache.public/default_db/images/images.xsl

@@ -2,43 +2,51 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
     exclude-result-prefixes="xs"
     version="2.0">
     
+    <!-- parsed by default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl 
+        by:  executed by WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml target name="default_db:PROCES_INIT:tree:dita"
+        and public_html/default_db_xml_cache.public/default_db/tree_to_dita.xsl
+    -->
+    
     <!-- Do parsowania <images>
-<image x="1" y="1">
-  <xmin>6525000.91100983333333333345</xmin>
-  <ymin>6012859.46859783333333333345</ymin>
-  <xmax>6525085.57767650000000000000</xmax>
-  <ymax>6012944.13526450000000000000</ymax>
-  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
-</image>
-<image x="2" y="1">
-  <xmin>6525080.57767650000000000000</xmin>
-  <ymin>6012859.46859783333333333345</ymin>
-  <xmax>6525165.24434316666666666655</xmax>
-  <ymax>6012944.13526450000000000000</ymax>
-  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-2.png</file>
-</image>
-<image x="1" y="2">
-  <xmin>6525000.91100983333333333345</xmin>
-  <ymin>6012939.13526450000000000000</ymin>
-  <xmax>6525085.57767650000000000000</xmax>
-  <ymax>6013023.80193116666666666655</ymax>
-  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-1.png</file>
-</image>
-<image x="2" y="2">
-  <xmin>6525080.57767650000000000000</xmin>
-  <ymin>6012939.13526450000000000000</ymin>
-  <xmax>6525165.24434316666666666655</xmax>
-  <ymax>6013023.80193116666666666655</ymax>
-  <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-2.png</file>
-</image>
-</images>  -->
+        <image x="1" y="1">
+            <xmin>6525000.91100983333333333345</xmin>
+            <ymin>6012859.46859783333333333345</ymin>
+            <xmax>6525085.57767650000000000000</xmax>
+            <ymax>6012944.13526450000000000000</ymax>
+            <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
+        </image>
+        <image x="2" y="1">
+          <xmin>6525080.57767650000000000000</xmin>
+          <ymin>6012859.46859783333333333345</ymin>
+          <xmax>6525165.24434316666666666655</xmax>
+          <ymax>6012944.13526450000000000000</ymax>
+          <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-2.png</file>
+        </image>
+        <image x="1" y="2">
+          <xmin>6525000.91100983333333333345</xmin>
+          <ymin>6012939.13526450000000000000</ymin>
+          <xmax>6525085.57767650000000000000</xmax>
+          <ymax>6013023.80193116666666666655</ymax>
+          <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-1.png</file>
+        </image>
+    <image x="2" y="2">
+      <xmin>6525080.57767650000000000000</xmin>
+      <ymin>6012939.13526450000000000000</ymin>
+      <xmax>6525165.24434316666666666655</xmax>
+      <ymax>6013023.80193116666666666655</ymax>
+      <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-2.png</file>
+    </image>
+</images>  
+    -->
     
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
+    
     <xsl:template match="*" mode="system_cache__dita:postprocess_image_convert">
         <xsl:param name="ext" select="substring-after(TYPE,'/')"/>
         <xsl:param name="fileindex" select="ID"/>
@@ -125,7 +133,17 @@
             </xsl:otherwise>
         </xsl:choose>
         
-    </xsl:template><xsl:template mode="system_cache__appinfo:images" match="images">
+    </xsl:template>
+    
+    
+    
+    
+    
+    
+    <!-- EOF IMAGES - gml!!! -->
+    
+    
+    <xsl:template mode="system_cache__appinfo:images" match="images">
         <xsl:param name="fileindex" required="yes"/> <!-- ex. 3161_IN7_MK_BAZA_DYSTRYBUCJI - is related dir in dita dir with images -->
         <xsl:apply-templates mode="system_cache__appinfo:images">
             <xsl:with-param name="fileindex" select="$fileindex"/>

+ 133 - 11
SE/schema/default_db_xml_cache.public/default_db/tree_to_dita.xsl

@@ -2,28 +2,143 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
     exclude-result-prefixes="xs"
     version="2.0">
+    <!-- file is executed by
+        WPS_Functions/default_db/recurse_ant/build_recurse_ant.xml target name="xml_recursed_from_tr_map_with_RelatedFeatureLoop_tree_to_dita"
+        WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml target name="default_db:PROCES_INIT:tree:dita"
+        
+        postprocess is handled by public_html/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl
+        
+    -->
+    <!-- add module howto
+    1) use this example for generate gml-images:
+     a) insert new <xsl:include href="CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>
+     b) register in this file <xsl:apply-templates select="." mode="preprocess_root_XXXXXXXX"/> in line #Register preprocess_root
+     c) use this example for generate gml-images: ( mode preprocess_root_XXXXXX _
+     <xsl:template mode="preprocess_root_XXXXXX" match="RelatedFeatureRoot">
+        <xsl:comment>preprocess_root_XXXXXXXX</xsl:comment>
+            <xsl:for-each-group select="//(INWESTYCJA_BUDOWA_SIECI|IN7_MK_BAZA_DYSTRYBUCJI)" group-by="ID">
+                <xsl:apply-templates mode="preprocess_gml_geometry_image_unique" select="."/>
+                <xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>
+            </xsl:for-each-group>
+            <xsl:for-each-group select="//*[ contains( name(),'Rozdzielcza_')]" group-by="concat(ID_ZASOB,the_geom/node()/name())">
+                    <xsl:variable name="fileindex" select="concat('Rozdzielcza_ID_ZASOB_',ID_ZASOB,'_',the_geom/node()/name())"/>
+                        <xsl:apply-templates mode="system_cache__appinfo:images__write" select=".">
+                            <xsl:with-param name="fileindex" select="$fileindex"/>
+                        </xsl:apply-templates>
+                        <xsl:result-document href="{$ditadir}/{$fileindex}.gml">
+                            <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" 
+                                xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" 
+                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                                xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
+                                <xsl:attribute name="local-name" select="local-name()"/>
+                                    <xsl:apply-templates mode="preprocess_gml_geometry_image_unique_group" select="current-group()/*"/>
+                            </wfs:FeatureCollection>
+                        </xsl:result-document>
+                    </xsl:for-each-group>
+     3) use this for images encoded in base64:
+      a) insert new <xsl:include href="XXXXXXXXXXXX/XXXXXXXXXX_tree_to_dita.xsl"/>
+      b) register in this file <xsl:apply-templates select="." mode="postprocess_root_XXXXXXXXXX"/> in line #Register postprocess_root
+      c) use this example for generate base64 images: ( mode postprocess_root_XXXXXXX     
+             <xsl:template match="CRM_IMAGE_CRM_PROCES|CRM_IMAGE_CRM_LISTA_ZASOBOW|CRM_IMAGE_CRM_WSKAZNIK" mode="postprocess_images_unique">
+                <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>
+                     <xsl:result-document href="{$temp}/{$uuid}/{ID}_image.base64.{$ext}" omit-xml-declaration="yes">
+                        <xsl:value-of select="IMAGE/text()"/>
+                    </xsl:result-document>
+                </xsl:template>
+             </xsl:template>
+       d) use this for use generated images inside .dita
+            <xsl:template match="CRM_IMAGE_CRM_PROCES|CRM_IMAGE_CRM_PROCES|CRM_IMAGE_CRM_LISTA_ZASOBOW|CRM_IMAGE_CRM_WSKAZNIK" mode="???????">
+             <xsl:variable name="ext" select="substring-after(TYPE,'/')"/>
+             <xsl:choose>
+                 <xsl:when test="number(WIDTH) &gt; 600">
+                     <image href="{ID}_image.{$ext}" width="500"></image>
+                 </xsl:when>
+                 <xsl:otherwise>
+                     <image href="{ID}_image.{$ext}" width="{WIDTH}"></image>
+                 </xsl:otherwise>
+             </xsl:choose>
+         </xsl:template>
+        
+       4) register in public_html/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl
+          example: 
+          <xsl:template mode="system_cache__appinfo:preprocess" match="gml_to_image|graph_to_image">
+        <xsl:choose>
+            <xsl:when test="@srcfile and @dstfile and @fileindex">
+                
+                <echo> convert gml 2 png for <xsl:value-of select="@srcfile"/> to <xsl:value-of select="@dstfile"/> , @fileindex=<xsl:value-of select="@fileindex"/>;  tymczasowy sposob mapowania do konfigu</echo>
+                <xsl:variable name="current_node" select="."/>
+                <xsl:variable name="postprocess_modules" select="doc($postprocess_modules.xml)"/>
+                <xsl:for-each select="$postprocess_modules/postprocess_modules/node()[name()= current()/name()]">
+                    <xsl:for-each select="*">
+                        <sequential>
+                        <xsl:element name="{name()}">
+                            <xsl:copy-of select="@*"/>
+                            <property name="basedir" value="{$basedir}"/>
+                            <xsl:for-each select="property">
+                                <xsl:element name="{name()}">
+                                    <xsl:attribute name="name" select="@name"/>
+                                    <xsl:attribute name="value" select="$current_node/@*[name()= current()/@name]"/>
+                                </xsl:element>
+                            </xsl:for-each>
+                        </xsl:element>
+                        </sequential>
+                    </xsl:for-each>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:message terminate="yes">#29 Not set @srcfile or @dstfile</xsl:message>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
     
+    5) register in  module for  <xsl:template mode="system_cache__appinfo:preprocess" match="gml_to_image|graph_to_image">
+      in WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml target name="default_db:PROCES_INIT:tree:dita"
+         <echoxml file="${postprocess_modules.xml}">
+                <postprocess_modules>
+                    <gml_to_image>
+                        <ant antfile="${mapserver_gml_to_png}" > 
+                            <property name="srcfile" value="@srcfile"/>
+                            <property name="dstfile" value="@dstfile"/>
+                            <property name="fileindex" value="@fileindex"/>
+                            <property name="ditadir" value="@ditadir"/>
+                        </ant>
+                    </gml_to_image>
+                    <graph_to_image>
+                        <ant antfile="${graph_gnuplot}" > 
+                            <property name="srcfile" value="@srcfile"/>
+                            <property name="dstfile" value="@dstfile"/>
+                            <property name="fileindex" value="@fileindex"/>
+                            <property name="ditadir" value="@ditadir"/>
+                        </ant>
+                    </graph_to_image>
+                </postprocess_modules>
+            </echoxml>  
+    -->
     
     
     
     <xsl:import href="../escaped_html_to_xml.xsl"/>
     <!--<xsl:import href="../dita_enter_to_ph.xsl"/>-->
     <xsl:include href="../default_db/enter_to_ph.xsl"/>
+    <xsl:include href="../truncate_special_and_do_uppercase.xsl"/>
     
-    <xsl:include href="../truncate_special_and_do_uppercase.xsl"/><xsl:include href="extract_text.xsl"/>
+    <xsl:include href="extract_text.xsl"/>
     <xsl:include href="images/images.xsl"/>
+    <xsl:include href="graph_gnuplot/graph_gnuplot.xsl"/>
     
-    <xsl:include href="graph_gnuplot/graph_gnuplot.xsl"/><xsl:include href="CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>
+    <xsl:include href="CRM_PROCES/PROCES_INIT_tree_to_dita.xsl"/>
     <xsl:include href="IN7_MK_BAZA_DYSTRYBUCJI/IN7_MK_BAZA_DYSTRYBUCJI_tree_to_dita.xsl"/>
     <xsl:include href="L_APPOITMENT_USER/L_APPOITMENT_USER_tree_to_dita.xsl"/>
+    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors/BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors_tree_to_dita.xsl"/>
+    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.xsl"/>
+    <xsl:include href="EXAMPLE/EXAMPLE_tree_to_dita.xsl"/>
     
     
     
-    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors/BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors_tree_to_dita.xsl"/>
-    <xsl:include href="BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_tree_to_dita.xsl"/>
-    <xsl:include href="EXAMPLE/EXAMPLE_tree_to_dita.xsl"/><xsl:output indent="yes"/>
+    <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
     <xsl:param name="temp" required="yes"/>
@@ -33,19 +148,24 @@
     
     <xsl:template mode="preprocess" match="RelatedFeatureRoot">
         <preprocess_dita>
+            <!-- #Register preprocess_root - line to register for preprocess gml images mainly -->
             <xsl:comment>#27 match RelatedFeatureRoot</xsl:comment>
-            <xsl:apply-templates select="." mode="preprocess_root_EXAMPLE"/><xsl:apply-templates select="." mode="preprocess_root_IN7_MK_BAZA_DYSTRYBUCJI"/>
-            <!--<xsl:apply-templates select="." mode="postprocess_root_PROCES_INIT"/>-->
-        <xsl:apply-templates select="." mode="preprocess_root_BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors"/>
+            <xsl:apply-templates select="." mode="preprocess_root_EXAMPLE"/>
+            <xsl:apply-templates select="." mode="preprocess_root_IN7_MK_BAZA_DYSTRYBUCJI"/>
+            <xsl:apply-templates select="." mode="preprocess_root_BI_audit_ENERGA_RUM_KONTRAHENCI_and_BI_audit_ENERGA_RUM_UMOWY_errors"/>
             <xsl:apply-templates select="." mode="preprocess_root_BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA"/>
-            <xsl:apply-templates select="." mode="postprocess_root_PROCES_INIT"/></preprocess_dita>
+            <xsl:apply-templates select="." mode="postprocess_root_PROCES_INIT"/>
+        </preprocess_dita>
     </xsl:template>
     
     <xsl:template mode="postprocess" match="RelatedFeatureRoot">
         <postprocess_dita>
             <xsl:comment>#25 match RelatedFeatureRoot</xsl:comment>
-            <xsl:apply-templates select="." mode="postprocess_root_EXAMPLE"/><xsl:apply-templates select="." mode="postprocess_root_IN7_MK_BAZA_DYSTRYBUCJI"/>
+            <!-- line for #Register postprocess_root -->
+            <xsl:apply-templates select="." mode="postprocess_root_EXAMPLE"/>
+            <xsl:apply-templates select="." mode="postprocess_root_IN7_MK_BAZA_DYSTRYBUCJI"/>
             <xsl:apply-templates select="." mode="postprocess_root_PROCES_INIT"/>
+            
         </postprocess_dita>
     </xsl:template>
     
@@ -58,4 +178,6 @@
     
     <xsl:template mode="ditamap" match="*"/>
     
-<xsl:template match="*" /></xsl:stylesheet>
+    <xsl:template match="*" />
+    
+</xsl:stylesheet>

+ 78 - 21
SE/schema/default_db_xml_cache.public/get_all_xsd.xsl

@@ -3,6 +3,7 @@
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     exclude-result-prefixes="xs hfp"
     version="2.0"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
     xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
     
@@ -13,11 +14,11 @@
     <xsl:param name="procesy5_system_schema_collection_dir" select="'../'"/>
     <xsl:param name="cache" select="'refresh'"/>
     <xsl:param name="targetNamespace_DEFAULTS" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db'"/>
-    
     <xsl:param name="external_schema" select="'/public_html/external_schema'"/>
     <xsl:param name="external_schema_id_namespace_prefix" select="'/public_html/external_schema_id_namespace_prefix'"/>
-    <xsl:param name="XMLSchema_prefix" select="'xs'"/><xsl:include href="../default_db_xml_cache.public/xml-schema-primitives.xsl"/>
+    <xsl:param name="XMLSchema_prefix" select="'xs'"/>
     
+    <xsl:include href="../default_db_xml_cache.public/xml-schema-primitives.xsl"/>
     <xsl:include href="system_cache__appinfo/external_schema_targetNamespace.xsl"/>
     
     
@@ -29,7 +30,9 @@
     <xsl:function name="system_cache__appinfo:document-uri-full_for_external_schema_id_namespace_prefix">
         <xsl:param name="system_cache__appinfo:document-uri_from_external_schema"/>
         <xsl:value-of select="replace($system_cache__appinfo:document-uri_from_external_schema,$external_schema,$external_schema_id_namespace_prefix  )"/>
-    </xsl:function><xsl:function name="system_cache__appinfo:clean_object_prefix">
+    </xsl:function>
+    
+    <xsl:function name="system_cache__appinfo:clean_object_prefix">
         <xsl:param name="name" />
         <xsl:choose>
             <xsl:when test="substring-after($name,':')">
@@ -134,7 +137,19 @@
         </xsl:call-template>
     </xsl:template>
     
-    <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" >
+    
+    <!-- BEGIN external schema templates -->
+    
+          <!--  <xsl:template match="get_all_xsd_list" 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 match="get_all_xsd|get_all_xsd_external_schema_id_namespace_prefix" 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: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 match="system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" >
                 <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
                 <xsl:variable name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix">
                     <var>
@@ -443,7 +458,14 @@
     <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@*">
         <xsl:param name="namespaces_cur" required="yes"/>
         <xsl:attribute name="{name()}" select="."/>
-    </xsl:template><xsl:template name="system_cache__appinfo:get_all_xsd">
+    </xsl:template>
+    
+    
+    
+    <!-- EOF external schema templates -->
+    
+    
+    <xsl:template name="system_cache__appinfo:get_all_xsd">
         <xsl:param name="path2collection" select="$procesy5_system_schema_collection_dir"/> 
         <xsl:param name="get_system_schemas"/>
         <xsl:param name="cache" select="$cache"/>
@@ -503,21 +525,23 @@
                                     </xsl:apply-templates>
                                 </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
                             </xsl:when>
-                            <xsl:otherwise><system_cache__appinfo:get_all_xsd>
-                            <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
-                            <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
-                            <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
-                                                <xsl:element name="{name()}">
-                                                    <xsl:for-each select="@*">
-                                                        <xsl:attribute name="{name()}" select="."/>
-                                                        <xsl:copy-of select="child::node()"/>
-                                                    </xsl:for-each>
-                                                </xsl:element>
-                                            </xsl:for-each>-->
-                            <xsl:copy-of select="/"/>
-                        </system_cache__appinfo:get_all_xsd>
-                    </xsl:otherwise>
-                        </xsl:choose></xsl:for-each>
+                            <xsl:otherwise>
+                                <system_cache__appinfo:get_all_xsd>
+                                    <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
+                                    <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
+                                    <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                                                    <xsl:element name="{name()}">
+                                                        <xsl:for-each select="@*">
+                                                            <xsl:attribute name="{name()}" select="."/>
+                                                            <xsl:copy-of select="child::node()"/>
+                                                        </xsl:for-each>
+                                                    </xsl:element>
+                                                </xsl:for-each>-->
+                                    <xsl:copy-of select="/"/>
+                                </system_cache__appinfo:get_all_xsd>
+                            </xsl:otherwise>
+                        </xsl:choose>
+                    </xsl:for-each>
                     <!-- -->
                       <xsl:message> schemat dla XML primitives  <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
                       <system_cache__appinfo:get_all_xsd>
@@ -541,6 +565,11 @@
                           <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
                           <xsl:copy-of select="$system_cache__appinfo:builtintypes.xsd"/>
                       </system_cache__appinfo:get_all_xsd>
+                      <!--<system_cache__appinfo:get_all_xsd>
+                          <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
+                          <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
+                          <xsl:copy-of select="$system_cache__appinfo:p5Type.xsd"/>
+                      </system_cache__appinfo:get_all_xsd>-->
                   </system_cache__appinfo:get_all_xsd_list>
                 </xsl:variable>
                 <!--<xsl:result-document href="{concat('../default_db.instance.xml/transformed/',$element-filename,'.xml')}">
@@ -551,7 +580,35 @@
         </xsl:choose>          
     </xsl:template>
     
-    
+    <!--TODO DISABLED TEMPORARY - IF IS USED? <xsl:template name="system_cache__appinfo:vrtfNamespaces"><!-\- consider namespaces for get_all_xsd_external_schema -\->
+        <xsl:variable name="procesy5_system_schema">
+            <xsl:call-template name="system_cache__appinfo:get_all_xsd">
+                <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
+                <xsl:with-param name="cache" select="'read'"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <system_cache__appinfo:vrtfNamespaces>
+            <xsl:for-each select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/system_cache__appinfo:get_all_xsd/schema/namespace::node()"
+                xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
+            </xsl:for-each>
+        </system_cache__appinfo:vrtfNamespaces>
+    </xsl:template>-->
+    
+    <!--<xsl:template name="system_cache__appinfo:vrtfNamespaces_external_schema">
+        <xsl:variable name="procesy5_system_schema">
+            <xsl:call-template name="system_cache__appinfo:get_all_xsd">
+                <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
+                <xsl:with-param name="cache" select="'read'"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <system_cache__appinfo:vrtfNamespaces_external_schema>
+            <xsl:for-each select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/system_cache__appinfo:get_all_xsd_external_schema/schema/namespace::node()"
+                xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
+            </xsl:for-each>
+        </system_cache__appinfo:vrtfNamespaces_external_schema>
+    </xsl:template>-->
     
     <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:vrtfNamespaces">
         <system_cache__appinfo:vrtfNamespaces>

+ 13 - 7
SE/schema/default_db_xml_cache.public/object_modeling_new_by_xml_schema.xsl

@@ -131,7 +131,8 @@
             <xsl:for-each select="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
                 <xsl:element name="{name()}">
                     <xsl:copy-of select="@*"/>
-                <xsl:apply-templates mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation"/></xsl:element>
+                    <xsl:apply-templates mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation"/>
+                </xsl:element>
             </xsl:for-each>
             <xsl:variable name="current" select="element"/>
             <xsl:for-each select="$merge_complexType/element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
@@ -143,13 +144,22 @@
                         <xsl:element name="{name()}">
                             <xsl:attribute name="name" select="@name"/>
                             <xsl:attribute name="type" select="$merge_complexType/ancestor::node()/simpleType[@name= substring-after(current()/@type,':')]/restriction/@base" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-                        <xsl:apply-templates mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation"/></xsl:element>
+                            <xsl:apply-templates mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation"/>
+                        </xsl:element>
                     </xsl:otherwise>
                 </xsl:choose>
             </xsl:for-each>
         </xsl:element>
     </xsl:template>
     
+    <xsl:template match="annotation" mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    
+    <xsl:template match="*|comment()|text()" mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
+        
+    
+    
     <!--<xsl:template mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="merge_complexType" required="yes"/>
         <xsl:element name="{name()}">
@@ -165,8 +175,4 @@
     </xsl:template>-->
     
     
-<xsl:template match="annotation" mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
-        <xsl:copy-of select="."/>
-    </xsl:template>
-    
-    <xsl:template match="*|comment()|text()" mode="system_cache__appinfo:object_modeling_new_add_xml_schema_child_annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:stylesheet>
+</xsl:stylesheet>

+ 2 - 0
SE/schema/default_db_xml_cache.public/system_cache__appinfo/TargetNamespaceBindings.xsl

@@ -10,6 +10,8 @@
     <xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/>
     <xsl:param name="targetNamespace_DEFAULTS_prefix_objects" select="'default_objects'"/>
     <xsl:param name="TargetNamespaceBindingsApiUrl" select="'https://biuro.biall-net.pl/SE/version-git/wfs-data.php'"/>
+     <!-- todo to override from config prefix etc -->
+    
     
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>

+ 8 - 2
SE/schema/default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl

@@ -2,11 +2,16 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
     exclude-result-prefixes="xs"
     version="2.0">
     <xsl:output indent="yes"/>
     <xsl:strip-space elements="*"/>
     
+    <!-- used by WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml target name="default_db:PROCES_INIT:tree:dita"
+        and public_html/default_db_xml_cache.public/default_db/tree_to_dita.xsl
+    -->
+    
     <xsl:param name="temp"  required="yes"/>
     <xsl:param name="uuid" required="yes"/>
     <xsl:param name="postprocess_modules.xml" required="yes"/>
@@ -57,7 +62,7 @@
         <xsl:choose>
             <xsl:when test="@srcfile and @dstfile and @fileindex">
                 
-                <echo> convert gml 2 png for <xsl:value-of select="@srcfile"/> to <xsl:value-of select="@dstfile"/> , @fileindex=<xsl:value-of select="@fileindex"/>; - tymczasowy sposob mapowania do konfigu</echo>
+                <echo> convert gml 2 png or graph_to_image  for <xsl:value-of select="@srcfile"/> to <xsl:value-of select="@dstfile"/> , @fileindex=<xsl:value-of select="@fileindex"/>; - tymczasowy sposob mapowania do konfigu</echo>
                 <xsl:variable name="current_node" select="."/>
                 <xsl:variable name="postprocess_modules" select="doc($postprocess_modules.xml)"/>
                 <xsl:for-each select="$postprocess_modules/postprocess_modules/node()[name()= current()/name()]">
@@ -66,7 +71,8 @@
                         <xsl:element name="{name()}">
                             <xsl:copy-of select="@*"/>
                             <property name="basedir" value="{$basedir}"/>
-                            <property name="uuid" value="{$uuid}"/><xsl:for-each select="property">
+                            <property name="uuid" value="{$uuid}"/>
+                            <xsl:for-each select="property">
                                 <xsl:element name="{name()}">
                                     <xsl:attribute name="name" select="@name"/>
                                     <xsl:attribute name="value" select="$current_node/@*[name()= current()/@name]"/>

+ 82 - 38
SE/schema/default_db_xml_cache.public/xml-schema-primitives.xsl

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:p5Type="https://biuro.biall-net.pl/wfs/p5Type"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
     xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
     exclude-result-prefixes="xs"
@@ -8,51 +9,79 @@
     
     
    <xsl:variable name="system_cache__appinfo:primitives.xsd">
+      
+      <!-- xmlns:p5="https://biuro.biall-net.pl/wfs" and xmlns:p5Type="https://biuro.biall-net.pl/wfs/p5Type" -->
+      
+      
         <xs:schema xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified"
            xml:lang="en"
            targetNamespace="http://www.w3.org/2001/XMLSchema">
+           <xs:simpleType name="string" id="string">
+              <xs:annotation>
+                 <xs:appinfo>
+                    <hfp:hasFacet name="length"/>
+                    <hfp:hasFacet name="minLength"/>
+                    <hfp:hasFacet name="maxLength"/>
+                    <hfp:hasFacet name="pattern"/>
+                    <hfp:hasFacet name="enumeration"/>
+                    <hfp:hasFacet name="whiteSpace"/>
+                    <hfp:hasFacet name="assertions"/>
+                    <hfp:hasProperty name="ordered" value="false"/>
+                    <hfp:hasProperty name="bounded" value="false"/>
+                    <hfp:hasProperty name="cardinality" value="countably infinite"/>
+                    <hfp:hasProperty name="numeric" value="false"/>
+                 </xs:appinfo>
+                 <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string">Built-in primitive type.
+                    The string datatype represents character strings in XML.</xs:documentation>
+              </xs:annotation>
+              
+              <xs:restriction base="xs:anyAtomicType">
+                 <xs:whiteSpace value="preserve" id="string.whiteSpace"/>
+              </xs:restriction>
+           </xs:simpleType>
 
-  <xs:annotation>
-      <xs:documentation>
-      This document contains XML elements which look like 
-      definitions for the primitive datatypes.  These definitions are for
-      information only; the real built-in definitions are magic.
-    </xs:documentation>
-      <xs:documentation>
-      For each built-in datatype in this schema (both primitive and
-      derived) can be uniquely addressed via a URI constructed
-      as follows:
-        1) the base URI is the URI of the XML Schema namespace
-        2) the fragment identifier is the name of the datatype
-
-      For example, to address the int datatype, the URI is:
-
-        http://www.w3.org/2001/XMLSchema#int
 
-      Additionally, each facet definition element can be uniquely
-      addressed via a URI constructed as follows:
-        1) the base URI is the URI of the XML Schema namespace
-        2) the fragment identifier is the name of the facet
-
-      For example, to address the maxInclusive facet, the URI is:
-
-        http://www.w3.org/2001/XMLSchema#maxInclusive
-
-      Additionally, each facet usage in a built-in datatype definition
-      can be uniquely addressed via a URI constructed as follows:
-        1) the base URI is the URI of the XML Schema namespace
-        2) the fragment identifier is the name of the datatype, followed
-           by a period (".") followed by the name of the facet
-
-      For example, to address the usage of the maxInclusive facet in
-      the definition of int, the URI is:
-
-        http://www.w3.org/2001/XMLSchema#int.maxInclusive
-
-    </xs:documentation>
-  </xs:annotation>
+            <xs:annotation>
+                <xs:documentation>
+                This document contains XML elements which look like 
+                definitions for the primitive datatypes.  These definitions are for
+                information only; the real built-in definitions are magic.
+              </xs:documentation>
+                <xs:documentation>
+                For each built-in datatype in this schema (both primitive and
+                derived) can be uniquely addressed via a URI constructed
+                as follows:
+                  1) the base URI is the URI of the XML Schema namespace
+                  2) the fragment identifier is the name of the datatype
+          
+                For example, to address the int datatype, the URI is:
+          
+                  http://www.w3.org/2001/XMLSchema#int
+          
+                Additionally, each facet definition element can be uniquely
+                addressed via a URI constructed as follows:
+                  1) the base URI is the URI of the XML Schema namespace
+                  2) the fragment identifier is the name of the facet
+          
+                For example, to address the maxInclusive facet, the URI is:
+          
+                  http://www.w3.org/2001/XMLSchema#maxInclusive
+          
+                Additionally, each facet usage in a built-in datatype definition
+                can be uniquely addressed via a URI constructed as follows:
+                  1) the base URI is the URI of the XML Schema namespace
+                  2) the fragment identifier is the name of the datatype, followed
+                     by a period (".") followed by the name of the facet
+          
+                For example, to address the usage of the maxInclusive facet in
+                the definition of int, the URI is:
+          
+                  http://www.w3.org/2001/XMLSchema#int.maxInclusive
+          
+              </xs:documentation>
+            </xs:annotation>
   <xs:simpleType name="string" id="string">
       <xs:annotation>
          <xs:appinfo>
@@ -3847,6 +3876,21 @@ use</xs:documentation>
          <xs:simpleType name="anyAtomicType"/>
             
          
+      </xs:schema>
+   </xsl:variable>
+   <xsl:variable name="system_cache__appinfo:p5Type.xsd">
+      <xs:schema 
+         xmlns:xs="http://www.w3.org/2001/XMLSchema"
+         xmlns:p5Type="http://biuro.biall-net.pl/p5/schema/types"
+         elementFormDefault="qualified"
+         xml:lang="en"
+         targetNamespace="http://biuro.biall-net.pl/p5/schema/types">
+         <xs:simpleType name="integer" id="integer" type="xs:int"/>
+         <xs:simpleType name="dateTime" id="dateTime" type="xs:dateTime"/>
+         <xs:simpleType name="string" id="string" type="xs:string"/>
+         <xs:simpleType name="date" id="date" type="xs:date"/>
+         
+         
       </xs:schema>
    </xsl:variable>