Browse Source

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

Piotr Labudda 9 years ago
parent
commit
fa481aebc3

+ 132 - 7
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -5,6 +5,7 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
+    xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
     xmlns:wfs="http://www.opengis.net/wfs"
     xmlns:ogc="http://www.opengis.net/ogc"
     xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
@@ -84,7 +85,6 @@
                  to wyzwolenie podstawia dane do dita.vals.xml w celu zlozenia pliku wyjsciowego
                  to wyzwolenie powinno juz zrobic ant_buildy "dla kolejnego X'
                  to wyzwolenie korzysta z apply-templates wyzwolenia glownego, w celu przygotowania ant_build 
-
         -->
     <xsl:template match="*"> 
         <xsl:param name="typeName"  select="$typeName" />
@@ -165,7 +165,11 @@
                     </xsl:choose>
                 </xsl:variable>
                 <xsl:message>#71 wstawiam projekt $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message>
-                <project basedir="../." name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant{$loop_xpath_real}"><!-- get_related_feature_run_child_ant{$loop_xpath_real} -->
+                <project basedir="../." name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant_if{$loop_xpath_real}">
+                    
+                    <!--  
+                    get_related_feature_run_child_ant{$loop_xpath_real} - domyslny przed 2017-03-28-->
+                    <!-- get_related_feature_run_child_ant{$loop_xpath_real} -->
                     <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
                     <echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo>
                     <!--<xsl:variable name="typeName" select='replace($typeName,"&quot;","")'/>--><!-- oczyszczenie z apostrofow -->
@@ -295,6 +299,63 @@
                     
                     
                     
+                    <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
+                    <echo> #302 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
+                    <target name="get_related_feature_run_child_ant_check{$loop_xpath_real}">
+                        <xsl:element name="tempfile">
+                            <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml')"/>
+                            <xsl:attribute name="deleteonexit" select="'no'"/>
+                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="suffix" select="'.xml'"/>
+                            <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_',$featureID_name_dita)"/>
+                        </xsl:element>
+                        <xsl:element name="echoxml">
+                            <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml}')"/>
+                            <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></xsl:element>
+                        </xsl:element>
+                        <xsl:element name="tempfile">
+                            <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml')"/>
+                            <xsl:attribute name="deleteonexit" select="'no'"/>
+                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="suffix" select="'.xml'"/>
+                            <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_out_',$featureID_name_dita)"/>
+                        </xsl:element>
+                        <xsl:element name="xslt">
+                            <xsl:attribute name="basedir" select="'./'"/>
+                            <xsl:attribute name="style" select="$xpath_query.xsl"/>
+                            <xsl:attribute name="in" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml}')"/>
+                            <xsl:attribute name="destdir" select="'./'"/>
+                            <xsl:attribute name="out" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.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="xpath_query_test"/>
+                            </factory>
+                            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+                            <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
+                        </xsl:element>
+                        
+                        <xsl:element name="loadfile">
+                            <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml')"/>
+                            <xsl:attribute name="srcfile" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml}')"/>
+                        </xsl:element>
+                        <condition taskname="get_related_feature_run_child_ant_if{$loop_xpath_real}">
+                            <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml')"/>
+                            <xsl:element name="contains">
+                                <xsl:attribute name="string" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml}')"/>
+                                <xsl:attribute name="substring" select="'OK'"/>
+                            </xsl:element>
+                        </condition>
+                    </target>
+                    <target name="get_related_feature_run_child_ant_if{$loop_xpath_real}" depends="get_related_feature_run_child_ant_check{$loop_xpath_real}">
+                        <xsl:attribute name="if" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml}')"/>
+                        <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}"/>
+                    </target>  
+                    <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
+                    
+                    
+                    
+                    
+                    
                     <xsl:apply-templates mode="ant_target" select=".">
                         <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
                         <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
@@ -432,7 +493,9 @@
                 
                
                 
-                <project basedir="{$basedir}" name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs}" default="get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs}"> <!-- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs} -->
+                <project basedir="{$basedir}" name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs}" default="get_related_feature_run_child_ant_if_query_{$loop_xpath_real}_{$loop_path_recurs}"> <!-- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs -->
+                    <!-- default przed 2017-03-28 concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs) 
+                        get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs} -->
                     <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
                     <echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo>
                     <!--<xsl:variable name="typeName" select='replace($typeName,"&quot;","")'/>--><!-- oczyszczenie z apostrofow -->
@@ -527,6 +590,64 @@
                     
 
                     
+                    <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
+                    <echo> #592 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
+                    <target>
+                        <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath_real,'_',$loop_path_recurs)"/>
+                        <xsl:element name="tempfile">
+                            <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
+                            <xsl:attribute name="deleteonexit" select="'no'"/>
+                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="suffix" select="'.xml'"/>
+                            <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_',$featureID_name_dita)"/>
+                        </xsl:element>
+                        <xsl:element name="echoxml">
+                            <xsl:attribute name="file" select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                            <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></xsl:element>
+                        </xsl:element>
+                        <xsl:element name="tempfile">
+                            <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
+                            <xsl:attribute name="deleteonexit" select="'no'"/>
+                            <xsl:attribute name="destdir" select="$temp"/>
+                            <xsl:attribute name="suffix" select="'.xml'"/>
+                            <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_out_',$featureID_name_dita)"/>
+                        </xsl:element>
+                        <xsl:element name="xslt">
+                            <xsl:attribute name="basedir" select="'./'"/>
+                            <xsl:attribute name="style" select="$xpath_query.xsl"/>
+                            <xsl:attribute name="in" select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                            <xsl:attribute name="destdir" select="'./'"/>
+                            <xsl:attribute name="out" select="concat('${get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                            <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="xpath_query_test"/>
+                            </factory>
+                            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+                            <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
+                        </xsl:element>
+                        
+                        <xsl:element name="loadfile">
+                            <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
+                            <xsl:attribute name="srcfile" select="concat('${get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                        </xsl:element>
+                        <condition >
+                            <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs)"/>
+                            <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
+                            <xsl:element name="contains">
+                                <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                                <xsl:attribute name="substring" select="'OK'"/>
+                            </xsl:element>
+                        </condition>
+                    </target>
+                    <target>
+                        <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs)"/>
+                        <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath_real,'_',$loop_path_recurs)"/>
+                        <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
+                        <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs}"/>
+                    </target>  
+                    <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
+                    
+                    
                     
                     
                     <!-- warunek dla ograniczenia zapetlenia TODO do optymalizacji aby nie potrzebnie nie robilo zapytania czy jest wezel zaglebiony -->
@@ -620,7 +741,7 @@
         <xsl:param name="featureID_name_dita" required="yes"/>
         
         <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
-        <echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query </echo>
+        <echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/> </echo>
         <xsl:element name="tempfile">
             <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id)"/>
             <xsl:attribute name="deleteonexit" select="'no'"/>
@@ -730,7 +851,7 @@
         
         
         <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
-        <echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query </echo>
+        <echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
         <xsl:element name="tempfile">                   
             <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id)"/>
             <xsl:attribute name="deleteonexit" select="'no'"/>
@@ -763,9 +884,7 @@
             <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
         </xsl:element>
         
-        
         <!-- Lista do wyzwolenia dzieci w podkalagach na bazie params-->
-
         <echo> #596 ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
         <dirset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="{$temp}" includes="{@xml_id}.{$uuid}.*" />
         <property name="builds_to_ant{$loop_xpath_real}{@xml_id}" refid="builds_to_ant{$loop_xpath_real}{@xml_id}"/>
@@ -948,6 +1067,8 @@
                          <!--<xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeName_dita"/>&amp;SRSNAME=EPSG:3003&amp;featureID=<xsl:value-of select="$featureID_name_dita"/>.<xsl:value-of select="$xpath_value_dita"/>-->
                          <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeNameRealResource"/>&amp;SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
                      </xsl:variable>
+                   
+                     
                             <xsl:element name="target">
                                 <xsl:attribute name="name" select="concat('get_related_feature.',position(),$loop_xpath_real)"/>
                                 <xsl:choose>
@@ -956,6 +1077,10 @@
                                         <xsl:attribute name="depends" select="concat('get_related_feature.',position()-1),$loop_xpath_real"/>
                                     </xsl:otherwise>
                                 </xsl:choose>
+                                
+                               
+                                
+                                
                                 <!--<tempfile property="out_task.dita" deleteonexit="no"  destdir="temp"/>-->
                                     <!--<tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  suffix=".xml" />-->
                                     <xsl:element name="exec">

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

@@ -338,7 +338,8 @@
         <xsl:param name="loop_xpath" required="yes"/>
         <xsl:param name="feature_pos_child" required="yes"/>
         <!--<xsl:param name="dita_with_id" required="yes"/>-->
-        <xsl:element name="{name()}">
+        <xsl:element name="{local-name()}" inherit-namespaces="yes">
+            <xsl:copy-of select="namespace::node()"/>
             <!--<xsl:copy-of select="@*"/>-->
             <xsl:apply-templates select="@*"/>
             <xsl:apply-templates mode="RelatedFeatureChild">

+ 3 - 1
SE/schema/default_db_xml_cache.public/main_build_recurse_ant.dita_with_id.xsl

@@ -170,7 +170,9 @@
             <xsl:attribute name="xml_id" select="generate-id()"/>
                  <!-- tymczasowe wymuszenie relacji do obiektu glownego na podstawie $detect_resource_type -->
                  <!-- <xsl:attribute name="typeName" select="p5_tr_map:force_local_typeName(@system_cache__appinfo:ref)"/>-->
-            
+            <!--<xsl:if test="string-length($detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name) = 0">
+                <xsl:message terminate="yes">#174 Bad not found expected for <xsl:value-of select="@system_cache__appinfo:ref"/>; @system_cache__appinfo:get_default_db_obj_url_table_name ! </xsl:message>
+            </xsl:if>-->
                  <xsl:attribute name="typeNameRealResource" select="concat($namespace_prefix,':',$detect_resource_type//system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type/@system_cache__appinfo:get_default_db_obj_url_table_name)" />
             <xsl:attribute name="typeName" select="concat($namespace_prefix,':',substring-after(@system_cache__appinfo:ref,':'))"/> 
                 <!--<xsl:attribute name="xpath" select="@flat_relation_cache_name"/>-->