|
|
@@ -0,0 +1,807 @@
|
|
|
+<?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:wfs="http://www.opengis.net/wfs"
|
|
|
+ xmlns:gml="http://www.opengis.net/gml"
|
|
|
+ xmlns:ogc="http://www.opengis.net/ogc"
|
|
|
+ xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
|
|
|
+ xmlns:get_wfs_recurse_xsl="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/get_wfs_recurse_xsl.xsd"
|
|
|
+ xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
|
|
|
+ xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
|
|
|
+ exclude-result-prefixes="xs"
|
|
|
+ version="2.0">
|
|
|
+
|
|
|
+ <!-- TESTING for recurse get WFS using xsd schemas and/or retrieved xlinks -->
|
|
|
+
|
|
|
+ <xsl:output indent="yes"/>
|
|
|
+ <xsl:strip-space elements="*"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:param name="typeName" select="'p5_default_db:PROCES_INIT'"/>
|
|
|
+ <xsl:param name="xpath" select="'ID'"/>
|
|
|
+ <xsl:param name="xpath_value" select="'994'"/>
|
|
|
+ <xsl:param name="uuid" select="'PROCES_INIT_PID_994_ALL_test'"/>
|
|
|
+
|
|
|
+ <!--<xsl:param name="procesy5_system_schema_file" required="yes"/>-->
|
|
|
+ <!--<xsl:param name="vrtfNamespaces_file" required="yes"/>-->
|
|
|
+
|
|
|
+ <xsl:param name="username" select="'a.binder'"/>
|
|
|
+ <xsl:param name="username.pass" required="yes"/>
|
|
|
+ <xsl:param name="php_session_id_ok.string"/>
|
|
|
+ <xsl:param name="simpleSchema_dir" required="yes"/>
|
|
|
+
|
|
|
+ <xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/> <!-- TODO should be detected -->
|
|
|
+ <xsl:param name="debug" select="1"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:param name="api" select="'biuro.biall-net.pl/SE/version-git/wfs-data.php'"/>
|
|
|
+ <xsl:param name="protocol" select="'https://'"/>
|
|
|
+
|
|
|
+ <!--<xsl:variable name="vrtfNamespaces" select="doc($vrtfNamespaces_file)"/>
|
|
|
+ <xsl:variable name="procesy5_system_schema" select="doc($procesy5_system_schema_file)"/>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <xsl:param name="ignore_maxOccurs_0" select="'1'"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:GetsimpleSchema">
|
|
|
+ <xsl:param name="typeNameRealResource"/>
|
|
|
+ <xsl:variable name="featureID_name_dita" select="substring-after($typeNameRealResource,':')"/>
|
|
|
+ <xsl:variable name="simpleSchemaFile" select="concat($simpleSchema_dir,'/',$targetNamespace_DEFAULTS_prefix,'/',$featureID_name_dita,'.xml')"/>
|
|
|
+ <xsl:message>get_wfs_recurse_xsl:GetsimpleSchema: <xsl:value-of select="$simpleSchemaFile"/></xsl:message>
|
|
|
+ <xsl:copy-of select="doc($simpleSchemaFile)"/>
|
|
|
+ </xsl:function>
|
|
|
+
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:typeNameRealResource">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:GetsimpleSchema"/>
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource"/>
|
|
|
+ </xsl:function>
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:RelatedFilter">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:GetsimpleSchema"/>
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/(RelatedFeatureRoot|RelatedFeature)/RelatedFilter"/>
|
|
|
+ </xsl:function>
|
|
|
+
|
|
|
+ <xsl:template name="get_wfs_recurse_xsl:request_string">
|
|
|
+ <xsl:param name="protocol" select="$protocol"/>
|
|
|
+ <xsl:param name="api" select="$api"/>
|
|
|
+ <xsl:param name="targetNamespace_DEFAULTS_prefix" select="$targetNamespace_DEFAULTS_prefix"/>
|
|
|
+ <xsl:param name="username" select="$username"/>
|
|
|
+ <xsl:param name="username.pass" select="$username.pass"/>
|
|
|
+ <xsl:param name="REQUEST.SERVICE" select="'WFS'"/>
|
|
|
+ <xsl:param name="REQUEST.VERSION" select="'1.0.0'"/>
|
|
|
+ <xsl:param name="REQUEST.TYPE" select="'GetFeature'"/>
|
|
|
+ <xsl:param name="REQUEST.TYPENAME" required="yes"/>
|
|
|
+ <xsl:param name="OGC_Filter"/>
|
|
|
+ <xsl:param name="REQUEST.SRSNAME" select="'EPSG:3003'"/>
|
|
|
+ <xsl:variable name="php_session_id_ok.string">
|
|
|
+ <xsl:if test=" string-length($php_session_id_ok.string) > 0">
|
|
|
+ <xsl:value-of select="concat('&sid=',normalize-space($php_session_id_ok.string))"/>
|
|
|
+ </xsl:if>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="username_and_pass">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="string-length($php_session_id_ok.string) > 0"/>
|
|
|
+ <xsl:otherwise><xsl:value-of select="concat($username,':',$username.pass,'@')"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:if test="number($debug) > 0"><xsl:message>#76 req:<xsl:value-of select="$REQUEST.TYPENAME"/> filter <xsl:value-of select="$OGC_Filter//ogc:PropertyName/text()"/>/<xsl:value-of select="$OGC_Filter//ogc:Literal/text()"/></xsl:message></xsl:if>
|
|
|
+ <xsl:value-of select="concat($protocol,$username_and_pass,$api,'/',$targetNamespace_DEFAULTS_prefix,'/?SERVICE=',$REQUEST.SERVICE,'&VERSION=',$REQUEST.VERSION,'&REQUEST=',$REQUEST.TYPE,'&TYPENAME=',$REQUEST.TYPENAME,$php_session_id_ok.string,$OGC_Filter,'&SRSNAME=',$REQUEST.SRSNAME)"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:GetsimpleSchema"/>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/simpleTypeMakeOgcFilter"/>
|
|
|
+ </xsl:function>
|
|
|
+
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:xpath_dita">
|
|
|
+ <xsl:param name="xpath"/>
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:xpath"/>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" string-length($get_wfs_recurse_xsl:xpath) >0">
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:xpath"/>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#121 narzucam $xpath=(<xsl:value-of select="$get_wfs_recurse_xsl:xpath"/>) z wyzwolenia build.xml </xsl:message></xsl:if>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:value-of select="$xpath"/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:function>
|
|
|
+
|
|
|
+ <xsl:function name="get_wfs_recurse_xsl:xpath_value_dita">
|
|
|
+ <xsl:param name="xpath"/>
|
|
|
+ <xsl:param name="xpath_value"/>
|
|
|
+ <!--<xsl:param name="get_wfs_recurse_xsl:xpath_value"/>-->
|
|
|
+ <xsl:param name="input_obj_with_xpath"/>
|
|
|
+
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:xpath_value_dita">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$xpath_value">
|
|
|
+ <!--<xsl:variable name="xpath_value_tokens" select="tokenize(@xpath_value,'/')"/>-->
|
|
|
+ <!--<xsl:value-of select="'todo zapytanie xpath do przetworzenia'"/>-->
|
|
|
+ <!--<xsl:copy-of select="$xpath_value_tokens"></xsl:copy-of>-->
|
|
|
+ <!--<xsl:message>#67 probuje ustalic dla featureID_name=<xsl:value-of select="$featureID_name"/>; wartosc z @xpath_value=<xsl:value-of select="@xpath_value"/>; $input_obj_with_xpath/node()[@xpath="ID_BILLING_OWNER"] =<xsl:value-of select="$input_obj_with_xpath/node()[@xpath='ID_BILLING_OWNER']"/>; </xsl:message>-->
|
|
|
+ <!--<xsl:if test="$debug > 2"><xsl:message>#67.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message></xsl:if>-->
|
|
|
+ <!--<xsl:variable name="xpath_value_token">-->
|
|
|
+ <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:variable>-->
|
|
|
+ <!--<xsl:message>#73 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message>-->
|
|
|
+ <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
|
|
|
+ <!--<xsl:value-of select="$xpath_value_token"/>-->
|
|
|
+ </xsl:when>
|
|
|
+ <!--<xsl:when test="string-length($get_wfs_recurse_xsl:xpath_value) >0">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#67.0 $xpath_value=(<xsl:value-of select="$get_wfs_recurse_xsl:xpath_value"/>); narzucone pewnie z wyzwolenia build.xml</xsl:message></xsl:if>
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:xpath_value"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:xpath_value"/><!-\- parametr z template narzuca wartosc -\->
|
|
|
+ </xsl:otherwise>-->
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:xpath_value_dita"/>
|
|
|
+ </xsl:function>
|
|
|
+
|
|
|
+ <xsl:template match="And" mode="simpleTypeMakeOgcFilter_merge_apply">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="child::node()">
|
|
|
+ <xsl:value-of select="'<ogc:And>'"/>
|
|
|
+ <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
|
|
|
+ <xsl:value-of select="'</ogc:And>'"/>
|
|
|
+ </xsl:when>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template match="*" mode="simpleTypeMakeOgcFilter_merge_apply" xpath-default-namespace="http://www.opengis.net/ogc">
|
|
|
+ <xsl:value-of select="concat('<',name(),'>')"/>
|
|
|
+ <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
|
|
|
+ <xsl:value-of select="concat('</',name(),'>')"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="text()" mode="simpleTypeMakeOgcFilter_merge_apply">
|
|
|
+ <xsl:value-of select="."/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template name="simpleTypeMakeOgcFilter_merge"><!-- do zrobienia polaczonego filtru OGC -->
|
|
|
+ <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
|
|
|
+ <xsl:param name="xpath_dita" required="yes"/> <!-- @value -->
|
|
|
+ <xsl:param name="xpath_value_dita" required="yes"/> <!-- @xpath_value -->
|
|
|
+ <!-- <xsl:param name="get_wfs_recurse_xsl:xpath_dita" required="yes"/>
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:xpath_value_dita" required="yes"/>-->
|
|
|
+ <xsl:param name="RelatedFilter"/>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#1754 name="simpleTypeMakeOgcFilter_merge"
|
|
|
+ $simpleTypeMakeOgcFilter = <xsl:copy-of select="$simpleTypeMakeOgcFilter"></xsl:copy-of>
|
|
|
+ $get_wfs_recurse_xsl:xpath_dita = <xsl:copy-of select="$xpath_dita"/>
|
|
|
+ $get_wfs_recurse_xsl:xpath_value_dita = <xsl:copy-of select="$xpath_value_dita"/>
|
|
|
+ #EOF
|
|
|
+ </xsl:message>
|
|
|
+ </xsl:if>
|
|
|
+ <xsl:value-of select="'&Filter=<ogc:Filter>'"/>
|
|
|
+ <xsl:variable name="Filter">
|
|
|
+ <And>
|
|
|
+ <xsl:for-each select="$RelatedFilter">
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <And>
|
|
|
+ <xsl:for-each select="$simpleTypeMakeOgcFilter/*">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:for-each>
|
|
|
+ </And>
|
|
|
+ </And>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:apply-templates select="$Filter" mode="simpleTypeMakeOgcFilter_merge_apply"/>
|
|
|
+ <xsl:value-of select="'</ogc:Filter>'"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template name="xpath_filter_apply"> <!-- do przetworzenia filtra na podstawie danych wezla poprzedniego $input_obj_with_xpath oraz podanych parametrow @xpath i @xpath_value -->
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <xsl:param name="xpath" required="yes"/>
|
|
|
+ <xsl:param name="xpath_value" required="yes"/>
|
|
|
+ <xsl:variable name="xpath_value_token">
|
|
|
+ <xsl:for-each select=" tokenize($xpath_value,'/')">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#341 znalazlem dla=<xsl:value-of select="."/>; ; <xsl:value-of select="$input_obj_with_xpath/node()[@xpath=current()]"/></xsl:message></xsl:if>
|
|
|
+ <xsl:if test="$input_obj_with_xpath/node()[@xpath=current()]">
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath/node()[@xpath=current()]"/>
|
|
|
+ </xsl:if><!-- todo to jest bledne ale dziala tymczasowo-->
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#345 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message></xsl:if>
|
|
|
+ <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
|
|
|
+ <xsl:value-of select="$xpath_value_token"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!--${simpleSchema_dir}/${namespace_prefix_p5_tr_map}/${main_build_recurse_ant.tr_map_sed}.xml-->
|
|
|
+ <xsl:template name="main">
|
|
|
+ <xsl:param name="typeName" select="$typeName"/>
|
|
|
+ <xsl:param name="api" select="$api"/>
|
|
|
+ <xsl:param name="protocol" select="$protocol"/>
|
|
|
+ <xsl:param name="targetNamespace_DEFAULTS_prefix" select="$targetNamespace_DEFAULTS_prefix"/>
|
|
|
+ <!--<xsl:param name="xpath_value" select="$xpath_value"/>-->
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:xpath"/>
|
|
|
+ <xsl:variable name="input_obj_with_xpath"><input_obj_with_xpath/></xsl:variable>
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:GetsimpleSchema" select="get_wfs_recurse_xsl:GetsimpleSchema($typeName)"/>
|
|
|
+ <!--<xsl:copy-of select="$get_wfs_recurse_xsl:GetsimpleSchema"/>-->
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:typeNameRealResource" select="get_wfs_recurse_xsl:typeNameRealResource($get_wfs_recurse_xsl:GetsimpleSchema)"/>
|
|
|
+
|
|
|
+ <xsl:variable name="xpath_dita" select="$xpath"/>
|
|
|
+ <xsl:variable name="xpath_value_dita" select="$xpath_value"/>
|
|
|
+
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter" select="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter($get_wfs_recurse_xsl:GetsimpleSchema)"/>
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:RelatedFilter" select="get_wfs_recurse_xsl:RelatedFilter($get_wfs_recurse_xsl:GetsimpleSchema)"/>
|
|
|
+ <xsl:variable name="OGC_Filter">
|
|
|
+ <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
|
|
|
+ <xsl:with-param name="simpleTypeMakeOgcFilter" select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:with-param name="RelatedFilter" select="$get_wfs_recurse_xsl:RelatedFilter"/>
|
|
|
+
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value"/>
|
|
|
+ <!--<xsl:with-param name="get_wfs_recurse_xsl:xpath_dita" select="$xpath"/>-->
|
|
|
+ <!--<xsl:with-param name="get_wfs_recurse_xsl:xpath_value_dita" select="$xpath_value"/>-->
|
|
|
+
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:if test="$debug > 3">
|
|
|
+ <xpath_dita>
|
|
|
+ <xsl:value-of select="$xpath_dita"></xsl:value-of>
|
|
|
+ </xpath_dita>
|
|
|
+ <xpath_value_dita>
|
|
|
+ <xsl:value-of select="$xpath_value_dita"></xsl:value-of>
|
|
|
+ </xpath_value_dita>
|
|
|
+ <!-- <get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ </get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <Filter>
|
|
|
+ <xsl:copy-of select="$OGC_Filter"/>
|
|
|
+ </Filter>-->
|
|
|
+ </xsl:if>
|
|
|
+ <!--<xsl:variable name="request_string" select="concat('?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&SRSNAME=EPSG:3003')"/>--> <!-- &MAXFEATURES=15 -->
|
|
|
+
|
|
|
+ <xsl:variable name="request_string">
|
|
|
+ <xsl:call-template name="get_wfs_recurse_xsl:request_string">
|
|
|
+ <xsl:with-param name="OGC_Filter" select="$OGC_Filter"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPE" select="'GetFeature'"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPENAME" select="$get_wfs_recurse_xsl:typeNameRealResource"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <!--<xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>-->
|
|
|
+ <xsl:message>#265 test $php_session_id_ok.string=<xsl:value-of select="$php_session_id_ok.string"/>; $url_string=<xsl:value-of select="$request_string"/> </xsl:message>
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
|
|
|
+ <xsl:if test="$debug > 5">
|
|
|
+ <wfs_response>
|
|
|
+ <request>Retrieving <xsl:value-of select="$request_string"/></request>
|
|
|
+ <oryg>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&MAXFEATURES=15</oryg>
|
|
|
+ <test>https://a.binder:@biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:PROCES_INIT&SRSNAME=EPSG:3003&MAXFEATURES=15</test>
|
|
|
+
|
|
|
+ <!--<xsl:copy-of select="$wfs_response"/>-->
|
|
|
+
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </wfs_response>
|
|
|
+ </xsl:if>
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_vars" select="$get_wfs_recurse_xsl:GetsimpleSchema">
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!--<xsl:template match="RelatedFeature" mode="get_wfs_recurse_xsl:wfs_response">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:wfs_response" required="yes"/>
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:wfs_response">
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>-->
|
|
|
+
|
|
|
+ <!--<xsl:template match="simpleTypeMakeOgcFilter|RelatedFilter" mode="get_wfs_recurse_xsl:wfs_response"/>-->
|
|
|
+
|
|
|
+ <!--<xsl:template match="*" mode="get_wfs_recurse_xsl:wfs_response">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:wfs_response" required="yes"/>
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:wfs_response_simpleType" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature">
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>-->
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature" match="RelatedFeature">
|
|
|
+ <!--<xsl:param name="get_wfs_recurse_xsl:wfs_response" required="yes"/>-->
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:typeNameRealResource" select="@typeNameRealResource"/>
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <!--<xsl:param name="xpath" select="$xpath"/>-->
|
|
|
+ <!--<xsl:param name="xpath_value" select="$xpath_value"/>-->
|
|
|
+ <!--<xsl:variable name="input_obj_with_xpath">
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath" select="node()/*"/> <!-\- zeby nie wstawial do xpath nazwy feature - IN7_DZIENNIK_KORESP/ID itp -\->
|
|
|
+ </xsl:variable>-->
|
|
|
+ <xsl:variable name="xpath_dita" select="get_wfs_recurse_xsl:xpath_dita('',@xpath)"/>
|
|
|
+ <xsl:variable name="xpath_value_dita" select="get_wfs_recurse_xsl:xpath_value_dita(@xpath,@xpath_value,$input_obj_with_xpath)"/>
|
|
|
+ <!--<xsl:variable name="get_wfs_recurse_xsl:GetsimpleSchema" select="get_wfs_recurse_xsl:GetsimpleSchema($typeName)"/>-->
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:RelatedFilter" select="RelatedFilter"/>
|
|
|
+ <xsl:variable name="OGC_Filter">
|
|
|
+ <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
|
|
|
+ <xsl:with-param name="simpleTypeMakeOgcFilter" select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:with-param name="RelatedFilter" select="$get_wfs_recurse_xsl:RelatedFilter"/>
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+ <!-- <xsl:with-param name="get_wfs_recurse_xsl:xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:xpath_value_dita" select="$xpath_value_dita"/>-->
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <!--<input_obj_with_xpath><xsl:copy-of select="$input_obj_with_xpath"/></input_obj_with_xpath>-->
|
|
|
+ <xsl:if test="$debug > 4">
|
|
|
+ <xpath_dita>
|
|
|
+ <xsl:value-of select="$xpath_dita"/>/@xpath_value: <xsl:value-of select="@xpath_value"/>
|
|
|
+ </xpath_dita>
|
|
|
+ <xpath_value_dita>
|
|
|
+ <xsl:value-of select="$xpath_value_dita"></xsl:value-of>
|
|
|
+ </xpath_value_dita>
|
|
|
+ <!-- <get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ </get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <Filter>
|
|
|
+ <xsl:copy-of select="$OGC_Filter"/>
|
|
|
+ </Filter>-->
|
|
|
+ </xsl:if>
|
|
|
+ <!--<xsl:variable name="request_string" select="concat('?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&SRSNAME=EPSG:3003')"/>--> <!-- &MAXFEATURES=15 -->
|
|
|
+ <xsl:variable name="request_string">
|
|
|
+ <xsl:call-template name="get_wfs_recurse_xsl:request_string">
|
|
|
+ <xsl:with-param name="OGC_Filter" select="$OGC_Filter"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPE" select="'GetFeature'"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPENAME" select="$get_wfs_recurse_xsl:typeNameRealResource"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+ <!--<xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>-->
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
|
|
|
+ <xsl:if test="$debug > 5">
|
|
|
+ <wfs_response>
|
|
|
+ <request>Retrieving <xsl:value-of select="$request_string"/></request>
|
|
|
+ <oryg>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&MAXFEATURES=15</oryg>
|
|
|
+ <test>https://a.binder:@biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:PROCES_INIT&SRSNAME=EPSG:3003&MAXFEATURES=15</test>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response//gml:featureMember[1]"/>
|
|
|
+ </wfs_response>
|
|
|
+ </xsl:if>
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_vars" select="." >
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:wfs_response_RelatedFeatureLoop" match="RelatedFeature">
|
|
|
+ <!--<xsl:param name="get_wfs_recurse_xsl:wfs_response" required="yes"/>-->
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:typeNameRealResource" select="@typeNameRealResource"/>
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <xsl:param name="xpath" select="$xpath"/>
|
|
|
+ <xsl:param name="xpath_value" select="$xpath_value"/>
|
|
|
+ <!--<xsl:variable name="input_obj_with_xpath">
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath" select="node()/*"/> <!-\- zeby nie wstawial do xpath nazwy feature - IN7_DZIENNIK_KORESP/ID itp -\->
|
|
|
+ </xsl:variable>-->
|
|
|
+ <xsl:variable name="xpath_dita" select="get_wfs_recurse_xsl:xpath_dita('',$xpath)"/>
|
|
|
+ <xsl:variable name="xpath_value_dita" select="get_wfs_recurse_xsl:xpath_value_dita($xpath,$xpath_value,$input_obj_with_xpath)"/>
|
|
|
+ <!--<xsl:variable name="get_wfs_recurse_xsl:GetsimpleSchema" select="get_wfs_recurse_xsl:GetsimpleSchema($typeName)"/>-->
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:RelatedFilter" select="RelatedFilter"/>
|
|
|
+ <xsl:variable name="OGC_Filter">
|
|
|
+ <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
|
|
|
+ <xsl:with-param name="simpleTypeMakeOgcFilter" select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ <xsl:with-param name="RelatedFilter" select="$get_wfs_recurse_xsl:RelatedFilter"/>
|
|
|
+
|
|
|
+ <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
|
|
|
+
|
|
|
+ <!-- <xsl:with-param name="get_wfs_recurse_xsl:xpath_dita" select="$xpath_dita"/>
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:xpath_value_dita" select="$xpath_value_dita"/>-->
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <!--<input_obj_with_xpath><xsl:copy-of select="$input_obj_with_xpath"/></input_obj_with_xpath>-->
|
|
|
+ <xsl:if test="$debug > 4">
|
|
|
+ <debug>
|
|
|
+ <xsl:attribute name="typeNameRealResource" select="@typeNameRealResource"/>
|
|
|
+ <xsl:attribute name="typeName" select="@typeName"/>
|
|
|
+ <xpath_dita>
|
|
|
+ <xsl:value-of select="$xpath_dita"/>/@xpath_value: <xsl:value-of select="@xpath_value"/>
|
|
|
+ </xpath_dita>
|
|
|
+ <xpath_value_dita>
|
|
|
+ <xsl:value-of select="$xpath_value_dita"></xsl:value-of>
|
|
|
+ </xpath_value_dita>
|
|
|
+ </debug>
|
|
|
+ </xsl:if>
|
|
|
+ <!-- <get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <xsl:copy-of select="$get_wfs_recurse_xsl:simpleTypeMakeOgcFilter"/>
|
|
|
+ </get_wfs_recurse_xsl:simpleTypeMakeOgcFilter>
|
|
|
+ <Filter>
|
|
|
+ <xsl:copy-of select="$OGC_Filter"/>
|
|
|
+ </Filter>-->
|
|
|
+
|
|
|
+ <!--<xsl:variable name="request_string" select="concat('?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&SRSNAME=EPSG:3003')"/>--> <!-- &MAXFEATURES=15 -->
|
|
|
+ <xsl:variable name="request_string">
|
|
|
+ <xsl:call-template name="get_wfs_recurse_xsl:request_string">
|
|
|
+ <xsl:with-param name="OGC_Filter" select="$OGC_Filter"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPE" select="'GetFeature'"/>
|
|
|
+ <xsl:with-param name="REQUEST.TYPENAME" select="$get_wfs_recurse_xsl:typeNameRealResource"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+ <!--<xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>-->
|
|
|
+ <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
|
|
|
+ <xsl:if test="$debug > 4">
|
|
|
+ <wfs_response>
|
|
|
+ <request>Retrieving <xsl:value-of select="$request_string"/></request>
|
|
|
+ <oryg>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&MAXFEATURES=15</oryg>
|
|
|
+ <test>https://a.binder:@biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:PROCES_INIT&SRSNAME=EPSG:3003&MAXFEATURES=15</test>
|
|
|
+ <!-- <debug_child_loop>-->
|
|
|
+ <!--<xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>-->
|
|
|
+ <!--</debug_child_loop>-->
|
|
|
+ <!--<xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>-->
|
|
|
+ </wfs_response>
|
|
|
+ </xsl:if>
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_vars" select="." >
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:wfs_response_simpleType" match="*">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template match="wfs:FeatureCollection">
|
|
|
+ <xsl:apply-templates/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="gml:featureMember">
|
|
|
+ <xsl:apply-templates mode="gml:featureMember"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="*" mode="gml:featureMember">
|
|
|
+ <!-- TODO parse from prefx requested type -->
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- xpath -->
|
|
|
+
|
|
|
+ <xsl:template match="text()|comment()" mode="after_first_ant_assing_vars"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
|
|
|
+ <xsl:param name="loop_xpath" />
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:wfs_response" required="yes"/>
|
|
|
+ <!--<RelatedFeatureRoot>-->
|
|
|
+
|
|
|
+ <!-- first assign xpath to features from -->
|
|
|
+ <xsl:variable name="wfs_output_nodes" select="$get_wfs_recurse_xsl:wfs_response"/>
|
|
|
+ <xsl:variable name="current_RelatedFeature" select="*"/>
|
|
|
+ <xsl:variable name="xml_id" select="@xml_id"/>
|
|
|
+ <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
|
|
|
+
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>
|
|
|
+ {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #354 count($wfs_output_nodes//gml:featureMember) <xsl:value-of select="count($wfs_output_nodes//gml:featureMember)"/></xsl:message></xsl:if>
|
|
|
+ <!-- tutaj jest blad przetwarzania ze wrzuca po rekordzie do kolumny - trzeba przetworzyc dla kazdego feature member -->
|
|
|
+ <xsl:for-each select="$wfs_output_nodes//gml:featureMember">
|
|
|
+ <!--<wfs_record>
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </wfs_record>-->
|
|
|
+ <xsl:variable name="input_obj_with_xpath">
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath" select="node()/*"/> <!-- zeby nie wstawial do xpath nazwy feature - IN7_DZIENNIK_KORESP/ID itp -->
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="input_obj_fid" select="*"/> <!-- dla wykrycia @fid -->
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_vars_childs" select="$current_RelatedFeature">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ <xsl:with-param name="xml_id_parent" select="$xml_id"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:with-param name="feature_pos" select="position()"/><!-- wiecej features z relacji dokladamy pozycje -->
|
|
|
+ <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/> <!-- @2017-04 byly nadpisywane informacje - trzeba dorzucic jeszcze $feature_pos_parent w nazwie przetwarzania -->
|
|
|
+ <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ <!-- cache tasks ? -->
|
|
|
+ </xsl:for-each>
|
|
|
+ <!--</RelatedFeatureRoot>-->
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!--<xsl:template match="wfs:FeatureCollection|gml:featureMember" mode="after_first_ant_assing_xpath">
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath"/>
|
|
|
+ </xsl:template>-->
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="after_first_ant_assing_xpath" match="*">
|
|
|
+ <xsl:param name="curr_xpath"/>
|
|
|
+ <xsl:param name="loop_xpath"/>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="name()=$typeName">
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath">
|
|
|
+ <xsl:with-param name="curr_xpath" select="$curr_xpath"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:variable name="curr_xpath_tmpl">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$curr_xpath=''">
|
|
|
+ <xsl:value-of select="local-name()"/> <!-- bylo local-name() - trzeba dorzucic xpath przechodzacy aby budowal sie w kwestii -->
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:value-of select="concat($curr_xpath,'/',local-name())"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
|
|
|
+ <xsl:element name="{name()}">
|
|
|
+ <xsl:attribute name="xpath" select="$curr_xpath_tmpl"/>
|
|
|
+ <xsl:for-each select="@*">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="name()='fid'"/>
|
|
|
+ <xsl:otherwise><xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:value-of select="text()"/>
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_xpath">
|
|
|
+ <xsl:with-param name="curr_xpath" select="$curr_xpath_tmpl"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="text()" mode="after_first_ant_assing_xpath"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template match="simpleTypeMakeOgcFilter" mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#621 bypassing simpleTypeMakeOgcFilter in after_first_ant_assing_vars_childs</xsl:message></xsl:if>
|
|
|
+ </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"/>
|
|
|
+ <xsl:param name="loop_xpath" required="yes"/>
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <xsl:param name="feature_pos" required="yes"/>
|
|
|
+ <xsl:param name="feature_pos_parent" required="yes"/>
|
|
|
+ <xsl:param name="input_obj_fid" required="no"/>
|
|
|
+ <xsl:for-each select=".">
|
|
|
+ <xsl:choose>
|
|
|
+
|
|
|
+ <xsl:when test="1=2"/>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:element name="{local-name()}">
|
|
|
+ <!--<xsl:if test="$input_obj_fid">
|
|
|
+ <!-\-<xsl:attribute name="input_obj_fid_name" select="$input_obj_fid/name()"/>-\->
|
|
|
+ <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
|
|
|
+ </xsl:if>-->
|
|
|
+ <!--<xsl:copy-of select="namespace::node()"/>-->
|
|
|
+ <xsl:for-each select="@*">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="name()='fid'"/>
|
|
|
+ <xsl:when test="name()='xml_id'"/>
|
|
|
+ <xsl:when test="name()='xpath'">
|
|
|
+ <!--<xsl:attribute name="xpath_parsed" select="."/>-->
|
|
|
+ <!--1:<xsl:value-of select="$parent_obj//node()[@system_cache__appinfo:xpath=$xpath]/text()"/>-->
|
|
|
+ <!--<xsl:value-of select="$parent_obj//node()[local-name()=$xpath]/text()"/>-->
|
|
|
+ <!--V:<xsl:value-of select="$xpath"/>-->
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="@xpath">
|
|
|
+ <!--<xsl:variable name="enter_to_ph">-->
|
|
|
+ <xsl:choose>
|
|
|
+ <!--<xsl:when test="@xpath_token_filter and @xpath_token ">
|
|
|
+ <!-\- implementacja filtra dla czegos oddzielonego parametrem -\->
|
|
|
+ <xsl:variable name="xpath_token_filter" select="tokenize($input_obj_with_xpath/node()[local-name()=current()/@xpath],@xpath_token_filter)"/>
|
|
|
+ <xsl:for-each select=" tokenize(@xpath_token,' ')">
|
|
|
+ <xsl:variable name="xpath_token" select="number(.)"/>
|
|
|
+ <xsl:copy-of select="$xpath_token_filter[$xpath_token]"></xsl:copy-of>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:when>-->
|
|
|
+ <xsl:when test="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*">
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ <!--</xsl:variable>-->
|
|
|
+ <!--<xsl:copy-of select="$enter_to_ph"/>-->
|
|
|
+ </xsl:when>
|
|
|
+ </xsl:choose>
|
|
|
+ <!--<xsl:comment>#1938 value of text()</xsl:comment>-->
|
|
|
+ <!--XXXX <xsl:value-of select="text()"/>-->
|
|
|
+ <xsl:apply-templates mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ <xsl:with-param name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
|
|
|
+ <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#1638 ignored @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @typeName=<xsl:value-of select="@typeName"/>; @xml_id=<xsl:value-of select="@xml_id"/>; </xsl:message></xsl:if>
|
|
|
+ </xsl:template> <!-- to disable ignored maxOccurs=0 -->
|
|
|
+
|
|
|
+ <xsl:template match="RelatedFeature[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" 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" />
|
|
|
+ <xsl:param name="feature_pos" required="yes"/>
|
|
|
+ <xsl:param name="feature_pos_parent" required="yes"/>
|
|
|
+ <xsl:param name="input_obj_fid" required="yes"/>
|
|
|
+ <xsl:param name="xpath_query"/> <!-- + added test -->
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#411 $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></xsl:if>
|
|
|
+ <!-- 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,'/',$xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$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:variable name="test_xpath_query">
|
|
|
+ <xsl:call-template name="test_xpath_query">
|
|
|
+ <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
|
|
|
+ <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
|
|
|
+ <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
|
|
|
+ <xsl:with-param name="xpath_query" select="$xpath_query"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$test_xpath_query='1'">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ #1540 jest okazja do zrobienia bilda $feature_pos_parent = <xsl:value-of select="$feature_pos_parent"/> ; $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"/>; match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message></xsl:if>
|
|
|
+ <xsl:comment>#527 there we exec child dig</xsl:comment>
|
|
|
+ <!-- <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:attribute name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:attribute name="feature_pos_parent" select="$feature_pos_parent"/>
|
|
|
+ <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>-->
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature" select=".">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ <!--</xsl:element>-->
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message terminate="no">#389b
|
|
|
+ #
|
|
|
+ #
|
|
|
+ #
|
|
|
+ BYPASSED BY $test_xpath_query=<xsl:value-of select="$test_xpath_query"/>; 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:if>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="RelatedFeatureLoop" mode="after_first_ant_assing_vars_childs">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#1718 ignored @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @typeName=<xsl:value-of select="@typeName"/>; @xml_id=<xsl:value-of select="@xml_id"/>; </xsl:message></xsl:if>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template match="RelatedFeatureLoop[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" 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" />
|
|
|
+ <xsl:param name="feature_pos" required="yes"/>
|
|
|
+ <xsl:param name="feature_pos_parent" required="yes"/>
|
|
|
+ <xsl:param name="input_obj_fid" required="yes"/>
|
|
|
+ <xsl:param name="xpath_query"/> <!-- + added test -->
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#411 $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></xsl:if>
|
|
|
+ <!-- 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,'/',$xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$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:variable name="test_xpath_query">
|
|
|
+ <xsl:call-template name="test_xpath_query">
|
|
|
+ <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
|
|
|
+ <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
|
|
|
+ <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
|
|
|
+ <xsl:with-param name="xpath_query" select="$xpath_query"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$test_xpath_query='1'">
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ #1540 jest okazja do zrobienia bilda $feature_pos_parent = <xsl:value-of select="$feature_pos_parent"/> ; $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"/>; match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message></xsl:if>
|
|
|
+ <xsl:comment>#527 there we exec child dig</xsl:comment>
|
|
|
+ <!-- <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:attribute name="feature_pos" select="$feature_pos"/>
|
|
|
+ <xsl:attribute name="feature_pos_parent" select="$feature_pos_parent"/>
|
|
|
+ <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>-->
|
|
|
+ <xsl:comment>#710 opening new Loop recurse instance for <xsl:value-of select="@typeName"/></xsl:comment>
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:wfs_response_RelatedFeatureLoop" select="get_wfs_recurse_xsl:GetsimpleSchema(@typeName)">
|
|
|
+ <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:apply-templates>
|
|
|
+ <!--</xsl:element>-->
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message terminate="yes">#389b
|
|
|
+ #
|
|
|
+ #
|
|
|
+ #
|
|
|
+ BYPASSED BY $test_xpath_query=<xsl:value-of select="$test_xpath_query"/>; 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:if>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+
|
|
|
+ </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 name="test_xpath_query">
|
|
|
+ <!-- to verify if retrieve some node based on user requested tree limit filter -->
|
|
|
+ <xsl:param name="ignore_maxOccurs_0" required="yes"/>
|
|
|
+ <xsl:param name="xpath_query" required="yes"/>
|
|
|
+ <xsl:param name="featureID_name_dita" required="yes"/>
|
|
|
+ <xsl:param name="system_cache__appinfo:maxOccurs" required="yes"/>
|
|
|
+ <xsl:if test="$debug > 2"><xsl:message>#1290 $system_cache__appinfo:maxOccurs=<xsl:value-of select="$system_cache__appinfo:maxOccurs"/>; $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; $xpath_query=<xsl:value-of select="$xpath_query"/>; </xsl:message></xsl:if>
|
|
|
+ <xsl:if test="$ignore_maxOccurs_0"><xsl:if test="$debug > 2"><xsl:message terminate="no">#1344 test igrnore is true()=<xsl:value-of select="$ignore_maxOccurs_0"/>;</xsl:message></xsl:if></xsl:if>
|
|
|
+ <xsl:variable name="TestMaxOccurs">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$system_cache__appinfo:maxOccurs='0' and $ignore_maxOccurs_0"></xsl:when>
|
|
|
+ <xsl:otherwise>1</xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:value-of select="$TestMaxOccurs"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</xsl:stylesheet>
|