|
|
@@ -51,9 +51,10 @@
|
|
|
|
|
|
<xsl:param name="xml_id_parent" select="@xml_id"/>
|
|
|
<xsl:param name="build_recurse_ant.xsl" required="yes"/>
|
|
|
- <xsl:param name="temp" select="'temp'"/>
|
|
|
+ <xsl:param name="temp" required="yes"/>
|
|
|
<xsl:param name="builds_to_ant.xsl" required="yes"/>
|
|
|
<xsl:param name="cookie_curl_option" required="yes"/>
|
|
|
+ <xsl:param name="loop_path_recurs" required="yes" /> <!-- loop path dla gromadzenia plikow dla RelatedFeatureLoop do przetworzen w rekurencji - domysmnie pusty, potem sie dobudowuje po wyzwoleniu anta w glab -->
|
|
|
<!-- second step fist loop - with data -->
|
|
|
<!--<xsl:param name="wfs_output.xml"/>--> <!-- to be set in second step by ant build generated by this style to fill by its data childs -->
|
|
|
|
|
|
@@ -87,6 +88,7 @@
|
|
|
<xsl:param name="loop_xpath_save" select="$loop_xpath_save"/><!-- tutaj zapisal sie build z wezla z parent -->
|
|
|
<xsl:param name="input_obj_with_xpath" /> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
|
|
|
<xsl:param name="feature_pos" select="1"/> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"-->
|
|
|
+ <xsl:param name="loop_path_recurs" select="$loop_path_recurs"/> <!-- przekazany z RelatedFeatureLoop z mode="after_first_ant_assing_vars_childs" -->
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="name()='RelatedFeature'">
|
|
|
<xsl:variable name="RelatedFeatureCount" select="last()"/>
|
|
|
@@ -112,9 +114,22 @@
|
|
|
<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')"/>
|
|
|
<!--<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.','.dita.xml')"/>-->
|
|
|
<!-- dane z oczekiwanego template .dita -->
|
|
|
- <xsl:variable name="xpath_dita" select="@xpath"/>
|
|
|
+ <xsl:variable name="xpath_dita">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" string-length($xpath) >0">
|
|
|
+ <xsl:value-of select="$xpath"/>
|
|
|
+ <xsl:message>#121 narzucam $xpath=(<xsl:value-of select="$xpath"/>) z wyzwolenia build.xml </xsl:message>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:value-of select="@xpath"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
<xsl:variable name="xpath_value_dita">
|
|
|
<xsl:choose>
|
|
|
+ <xsl:when test="string-length($xpath_value) >0">
|
|
|
+ <xsl:message>#67.0 $xpath_value=(<xsl:value-of select="$xpath_value"/>); narzucone pewnie z wyzwolenia build.xml</xsl:message>
|
|
|
+ <xsl:value-of select="$xpath_value"/>
|
|
|
+ </xsl:when>
|
|
|
<xsl:when test="@xpath_value">
|
|
|
<!--<xsl:variable name="xpath_value_tokens" select="tokenize(@xpath_value,'/')"/>-->
|
|
|
<!--<xsl:value-of select="'todo zapytanie xpath do przetworzenia'"/>-->
|
|
|
@@ -150,6 +165,10 @@
|
|
|
<xsl:attribute name="name" select="'passwordBase64Basic'"/>
|
|
|
<xsl:attribute name="value" select="$passwordBase64Basic"/>
|
|
|
</xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'php_session_id'"/>
|
|
|
+ <xsl:attribute name="value" select="$cookie_curl_option"/>
|
|
|
+ </xsl:element>
|
|
|
<xsl:element name="property">
|
|
|
<xsl:attribute name="name" select="'url'"/>
|
|
|
<xsl:attribute name="value" select="$url"/>
|
|
|
@@ -170,6 +189,11 @@
|
|
|
<xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
|
|
|
<xsl:attribute name="value" select="$builds_to_ant.xsl"/>
|
|
|
</xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'loop_path_recurs'"/>
|
|
|
+ <xsl:attribute name="value" select="$loop_path_recurs"/>
|
|
|
+ </xsl:element>
|
|
|
+
|
|
|
<xsl:comment>
|
|
|
Important variables:
|
|
|
typeName=<xsl:value-of select="$typeName"/>;
|
|
|
@@ -177,7 +201,6 @@
|
|
|
xpath_value=<xsl:value-of select="$xpath_value"/>;
|
|
|
$passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
|
|
|
</xsl:comment>
|
|
|
-
|
|
|
<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"/>
|
|
|
@@ -242,6 +265,9 @@
|
|
|
<xsl:with-param name="uuid" select="$uuid"/>
|
|
|
<xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
<xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
|
|
|
</xsl:apply-templates>
|
|
|
</xsl:element>
|
|
|
<!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
|
|
|
@@ -251,6 +277,235 @@
|
|
|
<!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
|
|
|
</project>
|
|
|
</xsl:when>
|
|
|
+ <xsl:when test="name()='RelatedFeatureLoop'">
|
|
|
+ <xsl:message>#255 RelatedFeatureLoop - try to execute child ant in loop_path=xml_id(<xsl:value-of select="@xml_id"/>)</xsl:message>
|
|
|
+ <xsl:variable name="RelatedFeatureCount" select="last()"/>
|
|
|
+ <xsl:variable name="RelatedFeaturePos" select="position()"/>
|
|
|
+ <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
|
|
|
+ <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
|
|
|
+ <xsl:variable name="loop_xpath">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$loop_xpath='root'">
|
|
|
+ <xsl:value-of select="concat($loop_xpath,'_x2f_.',@xml_id,'.',$featureID_name)"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:value-of select="$loop_xpath"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="typeName_dita" select="@typeName"/>
|
|
|
+ <xsl:variable name="featureID_name_dita" select="substring-after($typeName_dita,':')"/>
|
|
|
+ <xsl:variable name="xml_id" select="@xml_id"/>
|
|
|
+ <xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath)"/>
|
|
|
+ <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.xml')"/>
|
|
|
+ <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')"/>
|
|
|
+ <xsl:variable name="xpath_dita" select="@xpath"/>
|
|
|
+ <xsl:variable name="xpath_value_dita">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="@xpath_value">
|
|
|
+ <xsl:message>#265.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message>
|
|
|
+ <xsl:call-template name="xpath_filter_apply">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ <xsl:with-param name="xpath" select="@xpath"/>
|
|
|
+ <xsl:with-param name="xpath_value" select="@xpath_value"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:value-of select="$xpath_value"/><!-- parametr z template narzuca wartosc -->
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:comment>
|
|
|
+ RelatedFeatureLoop:
|
|
|
+ $typeName_dita= <xsl:value-of select="$typeName_dita"/>
|
|
|
+ $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>
|
|
|
+ $wfs_output= <xsl:value-of select="$wfs_output"/>
|
|
|
+ $wfs_output.xml= <xsl:value-of select="$wfs_output.xml"/>
|
|
|
+ $wfs_output.dita= <xsl:value-of select="$wfs_output.dita"/>
|
|
|
+ $xpath_dita= <xsl:value-of select="$xpath_dita"/>
|
|
|
+ $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
|
|
|
+ </xsl:comment>
|
|
|
+ <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}">
|
|
|
+ <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,""","")'/>--><!-- oczyszczenie z apostrofow -->
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'uuid'"/>
|
|
|
+ <xsl:attribute name="value" select="$uuid"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'passwordBase64Basic'"/>
|
|
|
+ <xsl:attribute name="value" select="$passwordBase64Basic"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'php_session_id'"/>
|
|
|
+ <xsl:attribute name="value" select="$cookie_curl_option"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'php_session_id_tested'"/>
|
|
|
+ <xsl:attribute name="value" select="$cookie_curl_option"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'url'"/>
|
|
|
+ <xsl:attribute name="value" select="$url"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property">
|
|
|
+ <xsl:attribute name="name" select="'webRootUrl'"/>
|
|
|
+ <xsl:attribute name="value" select="$webRootUrl"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="property"> <!--- powinien miec domyslnie sciezke narzucona-->
|
|
|
+ <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
|
|
|
+ <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
|
|
|
+ </xsl:element>
|
|
|
+ <!--<xsl:element name="property"> <!-\-\- powinien miec domyslnie narzucona sciezke-\->
|
|
|
+ <xsl:attribute name="name" select="'temp'"/>
|
|
|
+ <xsl:attribute name="value" select="$temp"/>
|
|
|
+ </xsl:element>-->
|
|
|
+ <xsl:element name="property"><!-- - powinien miec sciezke domyslnie narzucona-->
|
|
|
+ <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
|
|
|
+ <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
|
|
|
+ </xsl:element>
|
|
|
+ <property name="typeName" value="{$typeName}"/>
|
|
|
+ <property name="xpath" value="{$xpath_dita}"/>
|
|
|
+ <property name="xpath_value" value="{$xpath_value_dita}"/>
|
|
|
+<!-- DtypeName=p5_default_db:CRM_PROCES -Dxpath=ID -Dxpath_value=5247 -->
|
|
|
+ <property name="loop_path_recurs" value="{$loop_path_recurs}"/>
|
|
|
+ <xsl:comment>
|
|
|
+ Important variables:
|
|
|
+ typeName=<xsl:value-of select="$typeName"/>;
|
|
|
+ xpath=<xsl:value-of select="$xpath"/>;
|
|
|
+ xpath_value=<xsl:value-of select="$xpath_value"/>;
|
|
|
+ $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
|
|
|
+ </xsl:comment>
|
|
|
+ <!--<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"/>
|
|
|
+ <xsl:with-param name="wfs_output" select="$wfs_output"/>
|
|
|
+ <xsl:with-param name="wfs_output.xml" select="$wfs_output.xml"/>
|
|
|
+ <xsl:with-param name="wfs_output.dita" select="$wfs_output.dita"/>
|
|
|
+ <xsl:with-param name="xpath" select="$xpath"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="featureID_name" select="$featureID_name"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ <xsl:with-param name="RelatedFeatureCount" select="$RelatedFeatureCount"/>
|
|
|
+ <xsl:with-param name="RelatedFeaturePos" select="$RelatedFeaturePos"/>
|
|
|
+ <xsl:with-param name="typeName" select="$typeName"/>
|
|
|
+ <xsl:with-param name="xpath_value" select="$xpath_value"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
|
|
|
+ <!-\-<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-\->
|
|
|
+ <xsl:with-param name="xml_id" select="$xml_id"/>
|
|
|
+ <!-\-<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-\->
|
|
|
+ <xsl:with-param name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ </xsl:apply-templates>-->
|
|
|
+ <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
|
|
|
+ <xsl:comment>template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"
|
|
|
+ robi result-document href="build_{$loop_xpath}.{$uuid}.xml
|
|
|
+ wiec powinnismy uruchomic ant ten plik w ciemno znajac jego nizsze wezly</xsl:comment>
|
|
|
+ <xsl:variable name="featureID_name_child" select="substring-after($typeName,':')"/>
|
|
|
+ <xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>
|
|
|
+ <xsl:message>#142 ustalamy $loop_xpath_child=<xsl:value-of select="$loop_xpath_child"/></xsl:message>
|
|
|
+
|
|
|
+ <!-- warunek dla ograniczenia zapetlenia TODO do optymalizacji aby nie potrzebnie nie robilo zapytania czy jest wezel zaglebiony -->
|
|
|
+
|
|
|
+ <xsl:element name="target">
|
|
|
+ <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_check')"/>
|
|
|
+ <!--<tempfile property="test_child_curl_ouptut.xml"/>--> <!-- todo deleteonexit=yes -->
|
|
|
+ <xsl:element name="tempfile">
|
|
|
+ <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp')" />
|
|
|
+ <xsl:attribute name="destdir" select="$temp"/>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:variable name="OGC_Filter">
|
|
|
+ <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
|
|
|
+ <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="url">
|
|
|
+ <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeName_dita"/>&SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:element name="exec">
|
|
|
+ <xsl:attribute name="executable" select="'curl'"/>
|
|
|
+ <xsl:attribute name="output" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
|
|
|
+ <xsl:element name="arg">
|
|
|
+ <xsl:attribute name="line"> <xsl:value-of select="$cookie_curl_option"/> "<xsl:value-of select="$url"/>"</xsl:attribute>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:element>
|
|
|
+ <xsl:element name="loadfile">
|
|
|
+ <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg')"/>
|
|
|
+ <xsl:attribute name="srcFile" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')" />
|
|
|
+ </xsl:element>
|
|
|
+ <echo> $msg ${<xsl:value-of select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg')"/>} </echo>
|
|
|
+ <xsl:element name="condition">
|
|
|
+ <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_test')"/>
|
|
|
+ <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs)"/>
|
|
|
+ <xsl:element name="contains">
|
|
|
+ <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg}')"/>
|
|
|
+ <xsl:attribute name="substring" select="'featureMember'"/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:element>
|
|
|
+ <!--<target name="check_if_child">
|
|
|
+ <exec executable="curl"
|
|
|
+ output="/Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/d3e16/prezes1.root_x2f_.d3e1.CRM_PROCES_x2f_.d3e21.CRM_PROCES.1.1.xml_exists"
|
|
|
+ errorproperty="wfs_error"
|
|
|
+ resultproperty="wfs_result">
|
|
|
+ <arg line=" -b /Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/prezes1.cookie "https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:CRM_PROCES&SRSNAME=EPSG:3003&Filter=<ogc:Filter><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName>IID</ogc:PropertyName><ogc:Literal>995</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>TYPE</ogc:PropertyName><ogc:Literal>PROCES</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or></ogc:And></ogc:Filter>""/>
|
|
|
+ </exec>
|
|
|
+
|
|
|
+ <loadfile property="msg" srcFile="/Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/d3e16/prezes1.root_x2f_.d3e1.CRM_PROCES_x2f_.d3e21.CRM_PROCES.1.1.xml_exists" />
|
|
|
+ <echo> MSG to ${msg} </echo>
|
|
|
+ <condition property="test" taskname="get_related_feature_run_child_antroot_x2f_.d3e1.CRM_PROCES_x2f_.d3e16.CRM_PROCES_/d3e16" >
|
|
|
+ <contains string="${msg}" substring="featureMember"/>
|
|
|
+ </condition>
|
|
|
+
|
|
|
+ </target>-->
|
|
|
+
|
|
|
+ <xsl:element name="target">
|
|
|
+ <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs)"/>
|
|
|
+ <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_check')"/>
|
|
|
+ <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_test}')"/>
|
|
|
+ <!--<xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos,$loop_xpath_real,'_',$loop_path_recurs)"/>-->
|
|
|
+ <!--<xsl:choose>
|
|
|
+ <xsl:when test=".//(RelatedFeature|RelatedFeatureRoot)">
|
|
|
+ <xsl:for-each select=".//RelatedFeature[ not(child::node()/name()='RelatedFeature')]">
|
|
|
+ <xsl:variable name="loop_xpath_child_ant" select="concat($loop_xpath_save,'_x2f_.',@xml_id,'.',$featureID_name)"/>
|
|
|
+ <xsl:message>#148 ustalamy $loop_xpath_child_ant=<xsl:value-of select="$loop_xpath_child_ant"/></xsl:message>
|
|
|
+ <!-\- <xsl:element name="target">
|
|
|
+ <xsl:attribute name="name" select="$loop_xpath_child_ant"/><!-\\-'get_related_feature_run_child_ant'-\\->
|
|
|
+ <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>-\->
|
|
|
+ <!-\-<ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>-\->
|
|
|
+ <ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>
|
|
|
+
|
|
|
+ <!-\-</xsl:element>-\->
|
|
|
+ <xsl:if test=" position()=last()">
|
|
|
+ <xsl:comment>Tu task z related</xsl:comment>
|
|
|
+ </xsl:if>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:comment>#135 nie ma wiecej //RelatedFeature</xsl:comment>
|
|
|
+ <!-\-<xsl:element name="target">
|
|
|
+ <xsl:attribute name="name" select="'get_related_feature_run_child_ant'"/>
|
|
|
+ <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>
|
|
|
+ </xsl:element>-\->
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>-->
|
|
|
+ <!-- wstawienie subanta dla biezacych dzieci only -->
|
|
|
+ <!--<xsl:apply-templates mode="place_subant_RelatedFeatureLoop"> - ten nie potrzebuje generowac subantow - powinien go obsluzyc glowny
|
|
|
+ <xsl:with-param name="uuid" select="$uuid"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
|
|
|
+ <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
|
|
|
+ </xsl:apply-templates>-->
|
|
|
+ <ant antfile="{$basedir}/build.xml" target="xml_recursed_from_tr_map"/>
|
|
|
+ </xsl:element>
|
|
|
+ <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
|
|
|
+ <!-- task do polaczenia zaglebien -->
|
|
|
+ <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
|
|
|
+ </project>
|
|
|
+ </xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
<xsl:apply-templates mode="child_nodes"/>
|
|
|
</xsl:otherwise>
|
|
|
@@ -262,21 +517,23 @@
|
|
|
<xsl:copy-of select="."/>
|
|
|
</xsl:template>
|
|
|
|
|
|
+ <!--<xsl:template mode="child_nodes" match="simpleTypeMakeOgcFilter">
|
|
|
+ <xsl:message>#266 bypassing temporary simpleTypeMakeOgcFilter of problem with output </xsl:message>
|
|
|
+ </xsl:template>-->
|
|
|
+
|
|
|
<xsl:template mode="place_subant" match="RelatedFeature">
|
|
|
<xsl:param name="uuid" required="yes"/>
|
|
|
<xsl:param name="loop_xpath" required="yes"/>
|
|
|
<xsl:param name="loop_xpath_real" required="yes"/>
|
|
|
<!-- wygenerujemy liste ant -->
|
|
|
-
|
|
|
<echo> #235 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>
|
|
|
- <fileset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="temp" includes="{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.*.xml" />
|
|
|
-
|
|
|
+ <fileset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="{$temp}" includes="{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.*.xml" />
|
|
|
<property name="builds_to_ant{$loop_xpath_real}{@xml_id}" refid="builds_to_ant{$loop_xpath_real}{@xml_id}"/>
|
|
|
<!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
|
|
|
<xsl:element name="tempfile">
|
|
|
<xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_xpath_real,@xml_id)"/>
|
|
|
<xsl:attribute name="deleteonexit" select="'no'"/>
|
|
|
- <xsl:attribute name="destdir" select="'temp'"/>
|
|
|
+ <xsl:attribute name="destdir" select="$temp"/>
|
|
|
<xsl:attribute name="suffix" select="'.xml'"/>
|
|
|
<xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-',@xml_id,'-')"/>
|
|
|
</xsl:element>
|
|
|
@@ -284,7 +541,7 @@
|
|
|
<xsl:element name="tempfile">
|
|
|
<xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_xpath_real,@xml_id)"/>
|
|
|
<xsl:attribute name="deleteonexit" select="'no'"/>
|
|
|
- <xsl:attribute name="destdir" select="'temp'"/>
|
|
|
+ <xsl:attribute name="destdir" select="$temp"/>
|
|
|
<xsl:attribute name="suffix" select="'.xml'"/>
|
|
|
<xsl:attribute name="prefix" select="concat('${uuid}.build_to_ant_file-',@xml_id,'-')"/>
|
|
|
</xsl:element>
|
|
|
@@ -305,7 +562,6 @@
|
|
|
<!--<attribute name="http://saxon.sf.net/feature/initialMode"
|
|
|
value="after_first_ant_assing_vars"/>-->
|
|
|
</factory>
|
|
|
-
|
|
|
<param name="temp" expression="{$temp}"/>
|
|
|
<param name="loop_xpath_real" expression="{$loop_xpath_real}{@xml_id}"/>
|
|
|
<!--<xsl:element name="param">
|
|
|
@@ -315,23 +571,54 @@
|
|
|
<param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/>
|
|
|
<classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
</xsl:element>
|
|
|
-
|
|
|
<!--<ant antfile="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>-->
|
|
|
-
|
|
|
<xsl:element name="ant">
|
|
|
<xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
|
|
|
</xsl:element>
|
|
|
<!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
|
|
|
-
|
|
|
</xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="place_subant" match="RelatedFeatureLoop">
|
|
|
+ <xsl:param name="uuid" required="yes"/>
|
|
|
+ <xsl:param name="loop_xpath" required="yes"/>
|
|
|
+ <xsl:param name="loop_xpath_real" required="yes"/>
|
|
|
+ <xsl:param name="xpath_dita" required="yes"/>
|
|
|
+ <xsl:param name="xpath_value_dita" required="yes"/>
|
|
|
+ <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
|
|
|
+ <!-- wygenerujemy liste ant -->
|
|
|
+ <echo> #523 RelatedFeatureLoop ant bede odpalac w podkatalogu:@xml_id=(<xsl:value-of select="@xml_id"/>)
|
|
|
+ <xsl:value-of select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/> </echo>
|
|
|
+ <xsl:message>#591 todo executing by exec instead of ant without inheritAll because it's looping!!! </xsl:message>
|
|
|
+ <exec command="/opt/local/bin/ant" dir="{$temp}" failifexecutionfails="true">
|
|
|
+ <!--<arg line="-f ${builds_to_ant_file.xml}"/>-->
|
|
|
+ <xsl:element name="arg">
|
|
|
+ <xsl:attribute name="line" select="concat('-f ',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
|
|
|
+ </xsl:element>
|
|
|
+ </exec>
|
|
|
+ <!--<xsl:element name="ant">
|
|
|
+ <xsl:attribute name="antfile" select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
|
|
|
+ <xsl:attribute name="inheritAll" select="'false'"/>
|
|
|
+ <xsl:attribute name="inheritRefs" select="'false'"/>
|
|
|
+ <property name="xpath" value="{$xpath_dita}"/>
|
|
|
+ <property name="xpath_value_dita" value="{$xpath_value_dita}"/>
|
|
|
+ </xsl:element>-->
|
|
|
+ <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
<xsl:template mode="place_subant" match="*">
|
|
|
<xsl:param name="uuid" required="yes"/>
|
|
|
<xsl:param name="loop_xpath" required="yes"/>
|
|
|
<xsl:param name="loop_xpath_real" required="yes"/>
|
|
|
+ <xsl:param name="xpath_dita" required="yes"/>
|
|
|
+ <xsl:param name="xpath_value_dita" required="yes"/>
|
|
|
+ <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
|
|
|
<xsl:apply-templates mode="place_subant">
|
|
|
<xsl:with-param name="uuid" select="$uuid"/>
|
|
|
<xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
<xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
|
|
|
</xsl:apply-templates>
|
|
|
</xsl:template>
|
|
|
<xsl:template mode="place_subant" match="text()|comment()"/>
|
|
|
@@ -398,20 +685,25 @@
|
|
|
-->
|
|
|
<!-- sprawdzamy czy template pasuje do zadania wyzwolenia czy xpath=xpath_dita oraz czy typeName=typeName_dita-->
|
|
|
<xsl:choose>
|
|
|
- <xsl:when test="string($xpath_dita)= string($xpath) and string($featureID_name)=string($featureID_name_dita)">
|
|
|
+ <xsl:when test="string($featureID_name)=string($featureID_name_dita)"> <!-- bylo string($xpath_dita)= string($xpath) - ale nie jest to konieczne przy recurse ! - jest to bledne zalozenie -->
|
|
|
<!-- calculate query to api default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:IN7_DZIENNIK_KORESP&SRSNAME=EPSG:3003&featureID=IN7_DZIENNIK_KORESP.1000'-->
|
|
|
<!--<property name="OGC_Filter">%26lt;ogc:Filter%26gt;%26lt;ogc:PropertyIsNull%26gt;%26lt;ogc:PropertyName%26gt;the_geom%26lt;/ogc:PropertyName%26gt;%26lt;/ogc:PropertyIsNull%26gt;%26lt;/ogc:Filter%26gt;</property>-->
|
|
|
-
|
|
|
<!--<xsl:variable name="OGC_Filter">&Filter=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></xsl:variable>-->
|
|
|
-
|
|
|
-
|
|
|
+ <!--<xsl:variable name="OGC_Filter">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="RelatedFilter" copy-namespaces="no"/></xsl:message>&Filter=<ogc:Filter><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></ogc:Filter></xsl:when>
|
|
|
+ <xsl:otherwise>&Filter=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>-->
|
|
|
<xsl:variable name="OGC_Filter">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="RelatedFilter" copy-namespaces="no"/></xsl:message>&Filter=<ogc:Filter><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></ogc:Filter></xsl:when>
|
|
|
- <xsl:otherwise>&Filter=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
+ <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
|
|
|
+ <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ </xsl:call-template>
|
|
|
</xsl:variable>
|
|
|
- <xsl:message>#410 final OGC_Filter is <xsl:value-of select="$OGC_Filter"/>; </xsl:message>
|
|
|
+ <xsl:message>#410 final OGC_Filter is <xsl:value-of select="$OGC_Filter"/>;</xsl:message>
|
|
|
<xsl:variable name="url">
|
|
|
<!--<xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeName_dita"/>&SRSNAME=EPSG:3003&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&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeName_dita"/>&SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
|
|
|
@@ -424,12 +716,11 @@
|
|
|
<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">
|
|
|
<xsl:attribute name="executable" select="'curl'"/>
|
|
|
- <xsl:attribute name="output" select="concat('temp/',$wfs_output.xml)"/>
|
|
|
+ <xsl:attribute name="output" select="concat($temp,'/',$wfs_output.xml)"/>
|
|
|
<xsl:attribute name="errorproperty" select="'wfs_error'"/>
|
|
|
<xsl:attribute name="resultproperty" select="'wfs_result'"/>
|
|
|
<xsl:element name="arg">
|
|
|
@@ -451,16 +742,17 @@
|
|
|
<antcall target="build_recurse_ant.{position()+1}.xml"/>
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
- <echo> related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;</echo>
|
|
|
+ <echo> related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;
|
|
|
+ $temp is <xsl:value-of select="$temp"/>;</echo>
|
|
|
<xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik w kolejnym wyzwoleniu ant</xsl:comment>
|
|
|
- <delete file="temp/{$wfs_output.dita}.vals.dita"/>
|
|
|
- <xslt basedir="./" style="{$build_recurse_ant.xsl}" in="temp/{$wfs_output.dita}" destdir="./" out="temp/{$wfs_output.dita}.vals.dita" >
|
|
|
+ <delete file="{$temp}/{$wfs_output.dita}.vals.dita"/>
|
|
|
+ <xslt basedir="./" style="{$build_recurse_ant.xsl}" in="{$temp}/{$wfs_output.dita}" destdir="./" out="{$temp}/{$wfs_output.dita}.vals.dita" >
|
|
|
<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="after_first_ant_assing_vars"/>
|
|
|
</factory>
|
|
|
<classpath location="/opt/local/share/java/saxon9he.jar"/>
|
|
|
- <param name="wfs_output" expression="{$basedir}/temp/{$wfs_output.xml}"/>
|
|
|
+ <param name="wfs_output" expression="{$temp}/{$wfs_output.xml}"/>
|
|
|
<param name="xpath" expression="{$xpath}" /> <!-- kontrolnie - nie potrzebne -->
|
|
|
<param name="xpath_value" expression="{$xpath_value}" /> <!-- kontrolnie - nie potrzebne -->
|
|
|
<param name="loop_xpath" expression="{$loop_xpath}"/>
|
|
|
@@ -476,6 +768,7 @@
|
|
|
<param name="builds_to_ant.xsl" expression="{$builds_to_ant.xsl}"/>
|
|
|
<param name="cookie_curl_option" expression="{$cookie_curl_option}"/>
|
|
|
<param name="api_url" expression="{$api_url}"/>
|
|
|
+ <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
|
|
|
</xslt>
|
|
|
</xsl:element>
|
|
|
<!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych -->
|
|
|
@@ -514,8 +807,7 @@
|
|
|
<xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>
|
|
|
<echo message="OUTPUT__START"/>
|
|
|
<echo>
|
|
|
- Current template doesnt fit the requested data - TODO search for another template! string($xpath_dita)(<xsl:value-of select="$xpath_dita"/>)= string($xpath)(<xsl:value-of select="$xpath"/>) and string($featureID_name)(<xsl:value-of select="$featureID_name"/>)=string($featureID_name_dita)(<xsl:value-of select="$featureID_name_dita"/>)
|
|
|
-
|
|
|
+ Current template doesnt fit the requested data - TODO search for another template! string($xpath_dita)(<xsl:value-of select="$xpath_dita"/>) != string($xpath)(<xsl:value-of select="$xpath"/>) and string($featureID_name)(<xsl:value-of select="$featureID_name"/>) !=string($featureID_name_dita)(<xsl:value-of select="$featureID_name_dita"/>)
|
|
|
</echo>
|
|
|
<echo message="OUTPUT__END"/>
|
|
|
</error>
|
|
|
@@ -525,9 +817,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <!-- second step from local ant leaf -->
|
|
|
|
|
|
+ <xsl:template name="simpleTypeMakeOgcFilter_merge"><!-- do zrobienia polaczonego filtru OGC -->
|
|
|
+ <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
|
|
|
+ <xsl:param name="xpath_dita" required="yes"/>
|
|
|
+ <xsl:param name="xpath_value_dita" required="yes"/>
|
|
|
+ <xsl:param name="RelatedFilter"/>&Filter=<ogc:Filter><ogc:And><xsl:choose><xsl:when test="RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="RelatedFilter" copy-namespaces="no"/></xsl:message><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></xsl:when><xsl:otherwise><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter"><ogc:Or><xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="ogc:PropertyName/text()"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="ogc:Literal/text()"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:Or></xsl:if></ogc:And></ogc:Filter></xsl:template>
|
|
|
|
|
|
+ <!-- second step from local ant leaf -->
|
|
|
<xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
|
|
|
<xsl:param name="loop_xpath" select="$loop_xpath"/>
|
|
|
<RelatedFeatureRoot>
|
|
|
@@ -612,6 +909,12 @@
|
|
|
|
|
|
<xsl:template match="text()" mode="after_first_ant_assing_xpath"/>
|
|
|
|
|
|
+
|
|
|
+ <xsl:template match="simpleTypeMakeOgcFilter" mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:message>#621 bypassing simpleTypeMakeOgcFilter in after_first_ant_assing_vars_childs</xsl:message>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
<!-- przetwarzanie kolejne w celu podstawienia wartosci i wystawienia build dla kolejnych wezlow - problem z obsluga rownorzednie zagniezdzonych wezlow poprzez inne wezly -->
|
|
|
<xsl:template match="*" mode="after_first_ant_assing_vars_childs">
|
|
|
<xsl:param name="xml_id_parent" required="yes"/>
|
|
|
@@ -717,8 +1020,7 @@
|
|
|
</xsl:choose>
|
|
|
</xsl:variable>-->
|
|
|
<xsl:message>#389 jest okazja do zrobienia bilda $feature_pos=<xsl:value-of select="$feature_pos"/> $xml_id_parent=<xsl:value-of select="$xml_id_parent"/>; $xml_id=<xsl:value-of select="$xml_id"/>; result-document=<xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'.xml')"/> match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message>
|
|
|
-
|
|
|
- <xsl:result-document href="{$uuid}.build_{$loop_xpath}.{$feature_pos}.xml">
|
|
|
+ <xsl:result-document href="{$temp}/{$uuid}.build_{$loop_xpath}.{$feature_pos}.xml">
|
|
|
<xsl:apply-templates select=".">
|
|
|
<xsl:with-param name="typeName" select="@typeName"/>
|
|
|
<xsl:with-param name="xpath" select="@xpath"/>
|
|
|
@@ -729,6 +1031,7 @@
|
|
|
<xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" />
|
|
|
<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
|
|
|
<xsl:with-param name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
|
|
|
<!--<xsl:with-param name="wfs_output.xml" />-->
|
|
|
</xsl:apply-templates>
|
|
|
</xsl:result-document>
|
|
|
@@ -737,18 +1040,65 @@
|
|
|
<xsl:attribute name="featureID_name" select="$featureID_name"/>
|
|
|
<xsl:attribute name="loop_xpath" select="$loop_xpath"/>
|
|
|
</xsl:element>
|
|
|
-
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
+ <xsl:template match="RelatedFeatureLoop" mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <xsl:param name="xml_id_parent" required="yes"/>
|
|
|
+ <xsl:param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:param name="feature_pos" required="yes"/>
|
|
|
+ <xsl:message>#411-817 $feature_pos=<xsl:value-of select="$feature_pos"/>; mode after_first_ant_assing_vars_childs bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:message>
|
|
|
+ <!-- jest okazja do zrobienia bilda aby sciagnal rzeczy nizej -->
|
|
|
+ <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
|
|
|
+ <xsl:variable name="xml_id" select="@xml_id"/>
|
|
|
+ <xsl:variable name="loop_xpath" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>
|
|
|
+ <!--<xsl:variable name="loop_xpath_save" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>--> <!-- tutaj zapisal sie build z wezla z parent -->
|
|
|
+ <!--<debug_358_RelatedFeature>
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath"/>
|
|
|
+ </debug_358_RelatedFeature>-->
|
|
|
+ <!--<xsl:variable name="feature_pos">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$feature_pos=1"/>
|
|
|
+ <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>-->
|
|
|
+ <xsl:message>#832 RelatedFeatureLoop jest okazja do zrobienia bilda $feature_pos=<xsl:value-of select="$feature_pos"/> $xml_id_parent=<xsl:value-of select="$xml_id_parent"/>; $xml_id=<xsl:value-of select="$xml_id"/>; result-document=<xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'.xml')"/> match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message>
|
|
|
+ <xsl:variable name="loop_path_recurs">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" string-length($loop_path_recurs) <1">
|
|
|
+ <xsl:value-of select="concat('/',@xml_id)"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:value-of select="concat($loop_path_recurs,'/',@xml_id)"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:result-document href="{$temp}/{@xml_id}/{$uuid}.build_{$loop_xpath}.{$feature_pos}.xml" >
|
|
|
+ <xsl:apply-templates select=".">
|
|
|
+ <xsl:with-param name="typeName" select="@typeName"/>
|
|
|
+ <xsl:with-param name="xpath" select="@xpath"/>
|
|
|
+ <xsl:with-param name="xpath_value" select="@xpath_value"/>
|
|
|
+ <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath"/>-->
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" />
|
|
|
+ <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
|
|
|
+ <xsl:with-param name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
|
|
|
+ <!--<xsl:with-param name="wfs_output.xml" />-->
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:result-document>
|
|
|
+ <xsl:element name="RelatedFeature">
|
|
|
+ <xsl:copy-of select="@*"/>
|
|
|
+ <xsl:attribute name="featureID_name" select="$featureID_name"/>
|
|
|
+ <xsl:attribute name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
<xsl:template match="text()" mode="after_first_ant_assing_vars_childs"/>
|
|
|
<xsl:template match="comment()" mode="after_first_ant_assing_vars_childs"/>
|
|
|
<!-- pozbieranie do kupy wszystkich xmli i zlozenie dity -->
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<xsl:template match="*" mode="enter_to_ph">
|
|
|
<xsl:param name="count"/>
|
|
|
<xsl:param name="element"/>
|