| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655 |
- <?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:p5="https://biuro.biall-net.pl/wfs"
- 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"
- xmlns:default_objects="https://biuro.biall-net.pl/wfs/default_objects"
- xmlns:xlink="http://www.w3.org/1999/xlink"
-
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA"
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"
- xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY"
- xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI"
- exclude-result-prefixes="xs"
- version="2.0">
-
- <!-- TESTING for recurse get WFS using xsd schemas and/or retrieved xlinks -->
-
- <xsl:import href="system_cache__appinfo/escape_functions.xsl"/>
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
-
-
-
- <xsl:param name="typeName" select="'p5_default_db:PROCES_INIT'"/>
- <xsl:param name="typeName.object" select="'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA'"/>
- <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="MAXFEATURES" select="1000"/>
-
- <!--<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="0"/>
-
-
- <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:param name="api_recurse"/> <!-- to use api resolveDepth -->
- <xsl:param name="resolveDepth" select="5"/>
- <xsl:param name="p5:links.recurse_level.limit" select="8"/>
- <xsl:param name="p5:links.next.recurse_level.limit" select="10"/>
- <xsl:param name="p5:links.loop.context.nodes.min.distance" select="4"/> <!-- when detected in @xlink or @next <get_wfs_recurse_xsl:context.nodes//@fid , we calculate when it is to be treated as loop, if above $p5:links.recurse_level.limit - to be optimized -->
-
-
-
- <xsl:function name="get_wfs_recurse_xsl:GetsimpleSchema">
- <xsl:param name="typeNameRealResource"/>
-
- <xsl:variable name="featureID_name_dita">
- <xsl:choose>
- <xsl:when test=" substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':')">
- <xsl:value-of select="$typeNameRealResource"/>
- </xsl:when>
- <xsl:when test=" substring-after($typeNameRealResource,':')">
- <xsl:value-of select="substring-after($typeNameRealResource,':')"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="$typeNameRealResource"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="simpleSchemaFile">
- <xsl:choose>
- <xsl:when test=" substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':')">
- <xsl:message>#74 this is object not simpleType element - selecting simpleSchema to <xsl:value-of select="concat($simpleSchema_dir,'/',substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':'),'/',substring-after($typeNameRealResource,':'),'.xml')"/></xsl:message>
- <xsl:value-of select="concat($simpleSchema_dir,'/',substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':'),'/',substring-after($typeNameRealResource,':'),'.xml')"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="concat($simpleSchema_dir,'/',$targetNamespace_DEFAULTS_prefix,'/',$featureID_name_dita,'.xml')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:message>#57 get_wfs_recurse_xsl:GetsimpleSchema: from $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>; <xsl:value-of select="$simpleSchemaFile"/> for featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>;</xsl:message>
-
-
- <xsl:if test="not( substring-before(system_cache__appinfo:translate_object_escaped_prefix_from_string(substring-before($typeNameRealResource,':')),':'))">
- <xsl:copy-of select="doc($simpleSchemaFile)"/>
- </xsl:if>
-
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:typeNameRealResource">
- <xsl:param name="get_wfs_recurse_xsl:GetsimpleSchema"/>
- <xsl:choose>
- <xsl:when test="$api_recurse">
- <!-- default_db:CRM_LISTA_ZASOBOW -->
- <xsl:choose>
- <xsl:when test="$typeName.object">
- <xsl:value-of select="$typeName.object"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="typeName.local" select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeName"/>
- <xsl:value-of select="concat( system_cache__appinfo:escape_object_prefix_to_string($typeName),':', system_cache__appinfo:clean_object_prefix($typeName))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource"/>
- </xsl:otherwise>
- </xsl:choose>
-
- </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.MAXFEATURES" />
- <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="api_recurse.request">
- <xsl:choose>
- <xsl:when test="$api_recurse">
- <xsl:value-of select="concat('&resolveDepth=',$resolveDepth,'&resolve=all')"/>
- </xsl:when>
- </xsl:choose>
- </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:variable name="REQUEST.MAXFEATURES">
- <xsl:choose>
- <xsl:when test=" string-length($REQUEST.MAXFEATURES) > 0">
- <xsl:value-of select="concat('&MAXFEATURES=',$REQUEST.MAXFEATURES)"/>
- </xsl:when>
- </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,$api_recurse.request,$OGC_Filter,'&SRSNAME=',$REQUEST.SRSNAME)"/>
- </xsl:template>
-
-
-
-
- <xsl:template match="*" mode="get_wfs_recurse_xsl:context.nodes">
- <xsl:for-each select=".//*[@fid]">
- <get_wfs_recurse_xsl:nodes fid="{@fid}" root.distance="{count( ancestor::node())}"/>
- </xsl:for-each>
- </xsl:template>
-
-
- <xsl:function name="get_wfs_recurse_xsl:context.PRIMARYKEY.merge">
- <xsl:param name="get_wfs_recurse_xsl:PRIMARYKEY.nodes"/>
- <xsl:param name="p5:fid"/>
- <xsl:choose>
- <xsl:when test=" string-length($p5:fid) >0">
- <get_wfs_recurse_xsl:context.nodes>
- <xsl:copy-of select="$get_wfs_recurse_xsl:PRIMARYKEY.nodes/get_wfs_recurse_xsl:PRIMARYKEY.nodes/*"/>
- <get_wfs_recurse_xsl:nodes fid="{$p5:fid}"/>
- </get_wfs_recurse_xsl:context.nodes>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$get_wfs_recurse_xsl:PRIMARYKEY.nodes"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
-
- <xsl:function name="get_wfs_recurse_xsl:context.nodes.merge">
- <xsl:param name="get_wfs_recurse_xsl:context.nodes"/>
- <xsl:param name="current.node"/>
- <get_wfs_recurse_xsl:context.nodes>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes/get_wfs_recurse_xsl:context.nodes/*"/>
- <xsl:for-each select="$current.node//*[@fid]">
- <get_wfs_recurse_xsl:nodes fid="{@fid}" root.distance="{count( ancestor::node())}" added="by_merge"/>
- </xsl:for-each>
- </get_wfs_recurse_xsl:context.nodes>
- </xsl:function>
-
- <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:function name="p5:get_get_from_url">
- <xsl:param name="p5:url"/> <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=d -->
- <xsl:param name="get"/><!-- which param from get - maybe REQUEST -->
- <xsl:choose>
- <xsl:when test="contains($p5:url,'?')">
- <xsl:variable name="result">
- <xsl:for-each select="tokenize( substring-after($p5:url,'?'),'&')">
- <xsl:if test="substring-before(.,'=') = $get"><xsl:value-of select="substring-after(.,'=')"/></xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length($result) > 0">
- <xsl:value-of select="$result"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">#263 p5:get_get_from_url - cannot get get value=<xsl:value-of select="$get"/> from url string = <xsl:value-of select="$p5:url"/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">#268 p5:get_get_from_url url=<xsl:value-of select="$p5:url"/> dont seems correct to extract get</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:function>
-
- <xsl:template match="@next" mode="p5:fid">
- <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=default_db__x3A__BI_audit_MSIG_name%3ABI_audit_MSIG_name&sid=p3s8biqkc8jd4q0ihbqqhr8ueeub7hka9g8nagh3haiqrep37fr6hngspi0m3155v4gl0g2te86dd2hosir0f6l83t7t0j8fsoqq3k2&resolveDepth=4&resolve=all&PRIMARYKEY=7666&SRSNAME=EPSG%3A3003&startIndex=50000&maxFeatures20 -->
- <xsl:variable name="TYPENAME" select="p5:get_get_from_url(.,'TYPENAME')"/>
- <xsl:variable name="PRIMARYKEY" select="p5:get_get_from_url(.,'PRIMARYKEY')"/>
- <xsl:variable name="TYPENAME">
- <xsl:choose>
- <xsl:when test="substring-after($TYPENAME,':')">
- <xsl:value-of select="substring-after($TYPENAME,':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$TYPENAME"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="concat($TYPENAME,'.',$PRIMARYKEY)"/>
- </xsl:template>
-
- <xsl:function name="p5:fid">
- <xsl:param name="p5:next"/>
- <xsl:choose>
- <xsl:when test="contains($p5:next,'PRIMARYKEY=')">
- <xsl:variable name="TYPENAME" select="p5:get_get_from_url($p5:next,'TYPENAME')"/>
- <xsl:variable name="PRIMARYKEY" select="p5:get_get_from_url($p5:next,'PRIMARYKEY')"/>
- <xsl:value-of select="concat($TYPENAME,'.',$PRIMARYKEY)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#312 cannot retrieve PRIMARYKEY from propably backreffed url=<xsl:value-of select="$p5:next"/></xsl:message>
- </xsl:otherwise>
-
- </xsl:choose>
- <!-- https://biuro.biall-net.pl/SE/version-git/wfs-data.php?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=default_db__x3A__BI_audit_MSIG_name%3ABI_audit_MSIG_name&sid=p3s8biqkc8jd4q0ihbqqhr8ueeub7hka9g8nagh3haiqrep37fr6hngspi0m3155v4gl0g2te86dd2hosir0f6l83t7t0j8fsoqq3k2&resolveDepth=4&resolve=all&PRIMARYKEY=7666&SRSNAME=EPSG%3A3003&startIndex=50000&maxFeatures20 -->
-
- </xsl:function>
-
- <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:message>#255 typeName = <xsl:value-of select="$typeName"/></xsl:message>
- <RelatedFeatureRoot>
- <!--<xsl:namespace name="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" select="'https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA'"/>-->
- <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"/>
- p5:links.recurse_level.limit = <xsl:value-of select="$p5:links.recurse_level.limit"/>
- p5:links.next.recurse_level.limit = <xsl:value-of select="$p5:links.next.recurse_level.limit"/>
- resolveDepth = <xsl:value-of select="$resolveDepth"/>
-
- </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:variable name="get_wfs_recurse_xsl:context.nodes">
- <get_wfs_recurse_xsl:context.nodes>
- <xsl:apply-templates mode="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:wfs_response"/>
- </get_wfs_recurse_xsl:context.nodes>
- </xsl:variable>
- <xsl:variable name="get_wfs_recurse_xsl:context.PRIMARYKEY">
- <get_wfs_recurse_xsl:context.PRIMARYKEY>
- <xsl:for-each select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*">
- <get_wfs_recurse_xsl:nodes>
- <xsl:attribute name="fid" select="@fid"/>
- </get_wfs_recurse_xsl:nodes>
- </xsl:for-each>
- </get_wfs_recurse_xsl:context.PRIMARYKEY>
- </xsl:variable>
- <xsl:if test="number($debug) > 3">
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$api_recurse">
- <xsl:if test="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
- <xsl:message terminate="yes"> Error with query <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//ServiceException/text()" xpath-default-namespace="http://www.opengis.net/ogc"/></xsl:message>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:wfs_response//p5:next">
- <xsl:message> #360 to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
- <!--<xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/namespace::node()"/> <!-\- [ not(contains( local-name(),'wfs'))] -\->
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/namespace::node()"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*/namespace::node()"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember//*/namespace::node()"/>-->
- <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs">
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*"/>
- <xsl:apply-templates mode="p5:links.evaluate" select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/gml:featureMember/*" xpath-default-namespace="http://www.opengis.net/wfs">
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <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:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </RelatedFeatureRoot>
- </xsl:template>
-
-
- <xsl:template match="*[@xlink:href]" mode="p5:links.evaluate" xpath-default-namespace="http://www.opengis.net/wfs">
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
- <xsl:variable name="p5:fid" select="get_wfs_recurse_xsl:REQUEST.fid(@xlink:href)"/>
- <!--<xlink:href.evaluate>-->
- <!-- <xsl:copy>
- <xsl:copy-of select="@*"/>-->
- <xsl:if test="number($debug) > 3">
- <xlink:href.debug509>
- <xsl:attribute name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
- </xlink:href.debug509>
- </xsl:if>
- <xsl:message>#516-A name()<xsl:value-of select="name()"/>; ORIGINAL_@xlink:href=<xsl:value-of select="@xlink:href"/>;</xsl:message>
- <xsl:comment>#516-A name()<xsl:value-of select="name()"/>; ORIGINAL_@xlink:href=<xsl:value-of select="@xlink:href"/>;</xsl:comment>
- <xsl:variable name="xlink:request_string">
- <xsl:apply-templates mode="xlink:request_string" select=".">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:message>#516-A anchestors.count(<xsl:value-of select="count(ancestor::node())"/>); context.PRIMARYKEY count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid])"/>); previous @fid=count(<xsl:value-of select="count(root()//*[@fid])"/>); get_wfs_recurse_xsl:context.nodes count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.nodes//*[@fid])"/>); debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#516-A anchestors.count(<xsl:value-of select="count(ancestor::node())"/>); context.PRIMARYKEY count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid])"/>); previous @fid=count(<xsl:value-of select="count(root()//*[@fid])"/>); get_wfs_recurse_xsl:context.nodes count(<xsl:value-of select="count($get_wfs_recurse_xsl:context.nodes//*[@fid])"/>); debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- <!--<xsl:message>#401 previous @fid
- <xsl:for-each select="root()//*[@fid]">
- <xsl:value-of select="@fid"/>
- </xsl:for-each>
- </xsl:message>-->
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:context.nodes//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]">
- <xsl:message>#398-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#398-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/> BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="root()//*[number(@root.distance) < number($p5:links.loop.context.nodes.min.distance) and @fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]">
- <xsl:message>#398-A2 match="*[@xlink:href]" - LOOP DETECTED for <xsl:value-of select="root()//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]/concat(@fid,' dist:',@root.distance)"/> at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#398-A2 match="*[@xlink:href]" - LOOP DETECTED for <xsl:value-of select="root()//*[@fid = get_wfs_recurse_xsl:REQUEST.fid( current()/@xlink:href)]/concat(@fid,' dist:',@root.distance)"/> at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/> BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="p5:links.recurse_level.limit($p5:links.recurse_level)">
- <xsl:message>#398-B match="*[@xlink:href]" HIT LIMIT p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#398-B match="*[@xlink:href]" HIT LIMIT p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING @xlink:href=<xsl:value-of select="@xlink:href"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- <xsl:copy-of select="."/>
- </xsl:when>
- <xsl:when test=" string-length($xlink:request_string) = 0">
- <xsl:message>#402-C match="*[@xlink:href]" stopped recursion due to ERROR in empty $xlink:request_string - DEBUGGING TODO 2018-01-5; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#402-C match="*[@xlink:href]" stopped recursion due to ERROR in empty $xlink:request_string - DEBUGGING TODO 2018-01-5; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#398-D match="*[@xlink:href]"-B count(.)=<xsl:value-of select="count(.)"/>; continuing still digging at @xlink:href xlink:request_string=<xsl:value-of select="$xlink:request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#398-D match="*[@xlink:href]"-B count(.)=<xsl:value-of select="count(.)"/>; continuing still digging at @xlink:href xlink:request_string=<xsl:value-of select="$xlink:request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
-
- <!--<xsl:variable name="xlink:request_string">
- <xsl:apply-templates mode="xlink:request_string" select="."/>
- </xsl:variable>-->
- <xsl:apply-templates select=" get_wfs_recurse_xsl:wfs_response($xlink:request_string)" mode="p5:links.evaluate">
- <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level) + 1"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="1"/> <!-- $p5:links.next.recurse_level TODO researching start from beginning -->
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$xlink:request_string"/>
- </xsl:apply-templates>
- </xsl:otherwise>
-
- </xsl:choose>
-
- <!--</xsl:copy>-->
- <!--</xlink:href.evaluate>-->
- </xsl:template>
-
-
- <xsl:template match="*" mode="p5:links.evaluate" xpath-default-namespace="http://www.opengis.net/wfs">
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
- <!-- <xsl:element name="{name()}" inherit-namespaces="yes">
- <xsl:copy-of select="namespace::node()"/>-->
- <xsl:choose>
- <xsl:when test="count($get_wfs_recurse_xsl:context.nodes//*[@fid = current()/@fid ]) > 1">
- <xsl:message>#613-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING current()/@fid=<xsl:value-of select="@fid"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#613-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING current()/@fid=<xsl:value-of select="@fid"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- <xsl:if test="number($debug) > 3">
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy><!-- debug -->
- <xsl:copy-of select="@*"/>
- <!--<xsl:attribute name="debug.566"> match=* mode=p5:links.evaluate</xsl:attribute>-->
- <xsl:apply-templates mode="xlink:href.evaluate" select="@xlink:href">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </xsl:apply-templates>
- <xsl:apply-templates mode="p5:links.evaluate">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </xsl:apply-templates>
- <!--</xsl:element>-->
- </xsl:copy>
- </xsl:otherwise>
- </xsl:choose>
-
-
- <!--<xsl:element name="{name()}" inherit-namespaces="yes" xpath-default-namespace="http://www.opengis.net/wfs">
-
- <xsl:apply-templates mode="p5:links.evaluate"/>
- </xsl:element>-->
-
- </xsl:template>
-
- <xsl:function name="p5:links.recurse_level.limit">
- <xsl:param name="p5:links.recurse_level"/>
- <xsl:choose>
- <xsl:when test="number($p5:links.recurse_level) >= number($p5:links.recurse_level.limit)">
- <xsl:value-of select="'limit hit'"/>
- <xsl:message>#431-R LIMIT HIT p5:links.recurse_level.limit($p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>);</xsl:message>
- <xsl:comment>#431-R LIMIT HIT p5:links.recurse_level.limit($p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>)</xsl:comment>
- </xsl:when>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="p5:links.next.recurse_level.limit">
- <xsl:param name="p5:links.next.recurse_level"/>
- <xsl:choose>
- <xsl:when test="number($p5:links.next.recurse_level.limit) > number($p5:links.next.recurse_level.limit)">
- <xsl:value-of select="'limit hit'"/>
- <xsl:message>#431-N LIMIT HIT p5:links.next.recurse_level.limit(<xsl:value-of select="$p5:links.next.recurse_level.limit"/>) at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
- <xsl:comment>#431-N LIMIT HIT p5:links.next.recurse_level.limit(<xsl:value-of select="$p5:links.next.recurse_level.limit"/>) at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:comment>
- </xsl:when>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:php_session_id_ok.string">
- <xsl:param 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:function>
-
- <xsl:function name="get_wfs_recurse_xsl:api_recurse.request">
- <xsl:param name="api_recurse"/>
- <xsl:param name="p5:links.recurse_level"/>
- <xsl:choose>
- <xsl:when test="$api_recurse and ( ( number($p5:links.recurse_level) + number($resolveDepth) ) > $p5:links.recurse_level.limit )">
- <xsl:message>#668 reducing $resolveDepth to $p5:links.recurse_level.limit-$p5:links.recurse_level == <xsl:value-of select="($p5:links.recurse_level.limit - $p5:links.recurse_level )"/> to not extend expected deep traverse </xsl:message>
- <xsl:value-of select="concat('&resolveDepth=',($p5:links.recurse_level.limit - $p5:links.recurse_level ),'&resolve=all')"/>
- </xsl:when>
- <xsl:when test="$api_recurse and number($p5:links.recurse_level)">
- <xsl:value-of select="concat('&resolveDepth=',$resolveDepth,'&resolve=all')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:api_recurse.request">
- <xsl:param name="api_recurse"/>
- <xsl:choose>
- <xsl:when test="$api_recurse">
- <xsl:value-of select="concat('&resolveDepth=',$resolveDepth,'&resolve=all')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:username_and_pass">
- <xsl:param name="php_session_id_ok.string"/>
- <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:function>
-
- <xsl:function name="get_wfs_recurse_xsl:api">
- <xsl:param name="xlink:href"/>
- <xsl:variable name="string_tokens" select="count(tokenize($xlink:href,'/'))"/>
- <xsl:variable name="get_wfs_recurse_xsl:api">
- <xsl:for-each select="tokenize($xlink:href,'/')[ position() < $string_tokens]">
- <xsl:value-of select="."/><xsl:text>/</xsl:text>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test=" contains( substring-after($get_wfs_recurse_xsl:api/text(),'://'), substring-before($api,'/'))">
- <xsl:message>#476 TODO using default parameter from $api=<xsl:value-of select="$api"/> instead of detected <xsl:value-of select="substring-after($get_wfs_recurse_xsl:api/text(),'://')"/> consider using binding $TargetNamespaceBindingsApiUrl</xsl:message>
- <xsl:value-of select="$api"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select=" substring-after($get_wfs_recurse_xsl:api/text(),'://')"/>
- </xsl:otherwise>
- </xsl:choose>
-
- <!--<xsl:value-of select="tokenize($xlink:href,'/')[ 1 to count(tokenize($xlink:href,'.'))]"/>-->
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:REQUEST.fid">
- <xsl:param name="xlink:href"/>
- <xsl:choose>
- <xsl:when test="substring-after($xlink:href,'#')">
- <xsl:value-of select=" substring-after($xlink:href,'#')"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:REQUEST.TYPE.PRIMARYKEY">
- <xsl:param name="xlink:href"/>
-
- <xsl:choose>
- <xsl:when test=" string-length(tokenize($xlink:href,'\.')[ count(tokenize($xlink:href,'\.'))]) > 0">
- <xsl:value-of select="concat('&PRIMARYKEY=',tokenize($xlink:href,'\.')[ count(tokenize($xlink:href,'\.')) ])"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="no">#495 ERROR with detecting get_wfs_recurse_xsl:REQUEST.TYPE.PRIMARYKEY from <xsl:value-of select="$xlink:href"/>
- tokens count=<xsl:value-of select="count(tokenize($xlink:href,'\.'))"/>
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="get_wfs_recurse_xsl:protocol">
- <xsl:param name="xlink:href"/>
- <xsl:value-of select=" concat(substring-before($xlink:href,'://'),'://')"/>
- </xsl:function>
-
- <xsl:template match="*[@xlink:href]" mode="xlink:request_string">
- <xsl:param name="protocol" select="get_wfs_recurse_xsl:protocol(@xlink:href)"/>
- <xsl:param name="api" select="get_wfs_recurse_xsl:api(@xlink:href)"/>
- <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.MAXFEATURES" />-->
- <xsl:param name="REQUEST.TYPENAME" select="name()"/>
- <xsl:param name="OGC_Filter"/>
- <xsl:param name="REQUEST.SRSNAME" select="'EPSG:3003'"/>
- <xsl:param name="p5:links.recurse_level"/>
- <xsl:param name="api.local_location" select="'SE/version-git/wfs-data.php/default_db/'"/>
- <xsl:variable name="php_session_id_ok.string" select="get_wfs_recurse_xsl:php_session_id_ok.string($php_session_id_ok.string)"/>
- <xsl:variable name="api_recurse.request" select="get_wfs_recurse_xsl:api_recurse.request($api_recurse)"/>
- <xsl:variable name="username_and_pass" select="get_wfs_recurse_xsl:username_and_pass($php_session_id_ok.string)"/>
- <xsl:variable name="REQUEST.TYPE.PRIMARYKEY" select="get_wfs_recurse_xsl:REQUEST.TYPE.PRIMARYKEY(@xlink:href)"/>
- <xsl:variable name="REQUEST.MAXFEATURES">
- <xsl:choose>
- <xsl:when test="contains(@xlink:href,'&maxFeatures=10')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(@xlink:href,'&maxFeatures=20')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(@xlink:href,'maxFeatures')"/>
- <xsl:otherwise><xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:if test="number($debug) > 3"><xsl:message>#497 detected $api = <xsl:value-of select="$api"/>; </xsl:message>
- <xsl:message>#497 REQUEST.TYPE.PRIMARYKEY=<xsl:value-of select="$REQUEST.TYPE.PRIMARYKEY"/>;</xsl:message>
- </xsl:if>
- <xsl:choose>
- <xsl:when test=" string-length($REQUEST.TYPE.PRIMARYKEY) > 0">
- <xsl:value-of select="concat($protocol,$username_and_pass,$api,'?SERVICE=',$REQUEST.SERVICE,'&VERSION=',$REQUEST.VERSION,'&REQUEST=',$REQUEST.TYPE,'&TYPENAME=',$REQUEST.TYPENAME,$php_session_id_ok.string,$api_recurse.request,$REQUEST.TYPE.PRIMARYKEY,'&SRSNAME=',$REQUEST.SRSNAME,$REQUEST.MAXFEATURES)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#532 ERROR with requests - debug it and stop recurse</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
-
- </xsl:template>
-
-
- <xsl:function name="get_wfs_recurse_xsl:wfs_response">
- <xsl:param name="request_string"/>
- <xsl:message>#741 quering wfs for request_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="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
- <xsl:message terminate="yes"> Error with query <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//ServiceException/text()" xpath-default-namespace="http://www.opengis.net/ogc"/></xsl:message>
- </xsl:if>
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>
- </xsl:function>
-
-
- <xsl:template match="@*" mode="p5:links.evaluate">
- <xsl:copy-of select="."/>
- </xsl:template>
- <xsl:template match="text()" mode="p5:links.evaluate">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="p5:links" mode="p5:links.evaluate">
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
- <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="api_recurse.request">
- <xsl:choose>
- <xsl:when test="$api_recurse">
- <xsl:value-of select="concat('&resolveDepth=',$resolveDepth,'&resolve=all')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>-->
- <!-- <xsl:copy>-->
- <p5:links><xsl:copy-of select="*"/></p5:links>
-
- <xsl:variable name="p5:fid" select="p5:fid(p5:next/text())"/>
- <xsl:message>#684 debug match="p5:links" detected $p5:fid = <xsl:value-of select="$p5:fid"/></xsl:message>
- <xsl:comment>#684 debug match="p5:links" detected $p5:fid = <xsl:value-of select="$p5:fid"/></xsl:comment>
- <xsl:if test="number($debug) > 3">
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:copy-of select="$get_wfs_recurse_xsl:context.nodes"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:context.nodes//*[@fid = $p5:fid ]">
- <xsl:message>#430-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING p5:next/text()=<xsl:value-of select="p5:next/text()"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#430-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/> BYPASSING p5:next/text()=<xsl:value-of select="p5:next/text()"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="number($p5:links.recurse_level) >= number($p5:links.recurse_level.limit)">
- <xsl:message>#430 STOPPED digging links by HIT $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
- <xsl:comment>#430 STOPPED digging links by HIT $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
- <xsl:message> #690 STOPPED match="p5:links" DETECTED PRIMARYKEY FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:message>
- <xsl:comment> #690 STOPPED match="p5:links" DETECTED PRIMARYKEY FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
- <xsl:message> #691 STOPPED match="p5:links" DETECTED FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:message>
- <xsl:comment> #691 STOPPED match="p5:links" DETECTED FUTURE LOOP BY PRIMARY KEY $p5:fid=<xsl:value-of select="$p5:fid"/>;</xsl:comment>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="MAXFEATURES.request">
- <xsl:choose>
- <xsl:when test="contains(p5:next/text(),'maxFeatures=10')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(p5:next/text(),'maxFeatures=20')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(p5:next/text(),'maxFeatures')"/>
- <xsl:otherwise><xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="request_string" select="concat(p5:next/text(),$php_session_id_ok.string,get_wfs_recurse_xsl:api_recurse.request($api_recurse,$p5:links.recurse_level),$MAXFEATURES.request)"/> <!-- ,'&maxFeatures=999' -->
- <xsl:message>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/> ; orig from next (<xsl:copy-of select="p5:next/@*"/>)</xsl:message>
- <xsl:comment>#415 $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting p5:links <xsl:value-of select="$request_string"/> ; orig from next (<xsl:copy-of select="p5:next/@*"/>)</xsl:comment>
- <!--<request_string>
- <xsl:copy-of select="$request_string"/>
- </request_string>-->
- <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
-
- <xsl:if test="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
- <xsl:message terminate="yes"> Error with query <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//ServiceException/text()" xpath-default-namespace="http://www.opengis.net/ogc"/></xsl:message>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/@next">
- <!--<debug.438>-->
- <xsl:comment>360-recurse-A $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
- <xsl:message> #360-recurse-A $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
- <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
- <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level)"/> <!-- + 1 --><!-- setting to 1 again to research child node -->
- <xsl:with-param name="p5:links.next.recurse_level" select="number($p5:links.next.recurse_level) + 1"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- <!--</debug.438>-->
- </xsl:when>
- <xsl:when test="$get_wfs_recurse_xsl:wfs_response//p5:next">
- <!--<debug.441>-->
- <xsl:comment> #360-recurse-B $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
- <xsl:message> #360-recurse-B $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
- <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/> <!-- + 1 ) -->
- <xsl:with-param name="p5:links.next.recurse_level" select=" number($p5:links.next.recurse_level) + 1"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- <!--</debug.441>-->
- </xsl:when>
- <xsl:otherwise>
- <!--<debug.447>-->
- <xsl:comment> #360-recurse-C $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:comment>
- <xsl:message> #360-recurse-C $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; to parse to retrieve links and merge xml <xsl:value-of select="$get_wfs_recurse_xsl:wfs_response//p5:next/text()"/></xsl:message>
- <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response/wfs:FeatureCollection/@*"/>
- <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/> <!-- +1 -->
- <xsl:with-param name="p5:links.next.recurse_level" select=" number($p5:links.next.recurse_level) + 1"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$request_string"/>
- </xsl:apply-templates>
- <!--</debug.447>-->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
-
- <!--</xsl:copy>-->
- </xsl:template>
-
-
- <xsl:template match="wfs:FeatureCollection[not(gml:featureMember/*)]" mode="p5:links.evaluate" >
- <xsl:message>#461 finished digging at <xsl:value-of select="@next"/></xsl:message>
- </xsl:template>
-
-
-
- <xsl:template match="wfs:FeatureCollection[@next and gml:featureMember/*]" mode="p5:links.evaluate" >
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
-
- <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="MAXFEATURES.request">
- <xsl:choose>
- <xsl:when test="contains(@next,'&maxFeatures=10')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(@next,'&maxFeatures=20')">
- <xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/>
- </xsl:when>
- <xsl:when test="contains(@next,'maxFeatures')"/>
- <xsl:otherwise><xsl:value-of select="concat('&maxFeatures=',$MAXFEATURES)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="request_string" select="concat(@next,$MAXFEATURES.request)"/>
-
- <!--<xsl:variable name="api_recurse.request">
- <xsl:choose>
- <xsl:when test="1=1"></xsl:when>
- <xsl:when test="$api_recurse">
- <xsl:value-of select="concat(@next,'&resolveDepth=',$resolveDepth,'&resolve=all')"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>-->
-
-
- <xsl:variable name="p5:fid">
- <xsl:choose>
- <xsl:when test="contains(@next,'PRIMARYKEY=')">
- <xsl:apply-templates select="@next" mode="p5:fid"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#833 cannot get PRIMARYKEY from Backreffed - check loop in another leaf from <xsl:value-of select="@next"/></xsl:message>
- <xsl:comment>#833 cannot get PRIMARYKEY from Backreffed - check loop in another leaf from <xsl:value-of select="@next"/></xsl:comment>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- ,'&maxFeatures=999' -->
- <xsl:message>#511 p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#511 p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; requesting @next <xsl:value-of select="$request_string"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- <!--<request_string>
- <xsl:copy-of select="$request_string"/>
- </request_string>-->
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:context.nodes//*[@fid = current()/@fid ]">
- <xsl:message>#692-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; BYPASSING current(); debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#692-A1 match="*[@xlink:href]" - LOOP CONTEXT.nodes DETECTED at p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; at p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/> BYPASSING current() debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="number($p5:links.recurse_level) > $p5:links.recurse_level.limit">
- <xsl:message>#692-R stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#692-R stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:when test="number($p5:links.next.recurse_level) > $p5:links.next.recurse_level.limit">
- <xsl:message>#692-L stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:message>
- <xsl:comment>#692-L stopped digging for new p5:fid=<xsl:value-of select="$p5:fid"/> $p5:links.recurse_level.limit at <xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- </xsl:when>
- <xsl:otherwise>
-
- <xsl:comment>debug.current lower; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level) + 1"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </xsl:apply-templates>
- <xsl:comment>debug.current upper / debug.reffered lower; debug.last_wfs_request=<xsl:value-of select="$debug.last_wfs_request"/>;</xsl:comment>
-
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:context.PRIMARYKEY//*[@fid = $p5:fid]">
- <xsl:message>#797 detected FUTURE LOOP for fid=<xsl:value-of select="$p5:fid"/> in match="wfs:FeatureCollection[@next </xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($request_string)"/>
- <xsl:choose>
- <xsl:when test="$get_wfs_recurse_xsl:wfs_response//gml:featureMember/*">
- <xsl:apply-templates mode="#current" select="$get_wfs_recurse_xsl:wfs_response">
- <xsl:with-param name="p5:links.recurse_level" select="number($p5:links.recurse_level)"/> <!-- + 1 -->
- <xsl:with-param name="p5:links.next.recurse_level" select="number($p5:links.next.recurse_level) + 1"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="get_wfs_recurse_xsl:context.nodes.merge($get_wfs_recurse_xsl:context.nodes,$get_wfs_recurse_xsl:wfs_response)"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="get_wfs_recurse_xsl:context.PRIMARYKEY.merge($get_wfs_recurse_xsl:context.PRIMARYKEY,$p5:fid)"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-
- <xsl:message>#498 not any childs</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
-
-
- <!--</debug_reffered>-->
- <!--</debug.470>-->
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template match="wfs:FeatureCollection" mode="p5:links.evaluate" >
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
- <xsl:message>#538 match wfs:FeatureCollection $p5:links.recurse_level=<xsl:value-of select="$p5:links.recurse_level"/>; p5:links.next.recurse_level=<xsl:value-of select="$p5:links.next.recurse_level"/>;</xsl:message>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="p5:links.recurse_level" select="(number($p5:links.recurse_level) + 1)"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </xsl:apply-templates>
- </xsl:template>
-
- <xsl:template match="gml:featureMember" mode="p5:links.evaluate">
- <xsl:param name="p5:links.recurse_level" select="1"/>
- <xsl:param name="p5:links.next.recurse_level" select="1"/>
- <xsl:param name="get_wfs_recurse_xsl:context.nodes" required="yes"/>
- <xsl:param name="get_wfs_recurse_xsl:context.PRIMARYKEY" required="yes"/>
- <xsl:param name="debug.last_wfs_request" required="yes"/>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="p5:links.recurse_level" select="$p5:links.recurse_level"/>
- <xsl:with-param name="p5:links.next.recurse_level" select="$p5:links.next.recurse_level"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.nodes" select="$get_wfs_recurse_xsl:context.nodes"/>
- <xsl:with-param name="get_wfs_recurse_xsl:context.PRIMARYKEY" select="$get_wfs_recurse_xsl:context.PRIMARYKEY"/>
- <xsl:with-param name="debug.last_wfs_request" select="$debug.last_wfs_request"/>
- </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:copy>
- <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:copy>
- <!--</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><xsl:value-of select="1"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$TestMaxOccurs"/>
- </xsl:template>
-
- <xsl:template match="RelatedFeatureRoot" mode="anonimize_for_devel">
- <wfs:FeatureCollection>
- <xsl:apply-templates mode="anonimize_for_devel.featureMember" />
- </wfs:FeatureCollection>
- </xsl:template>
-
-
- <xsl:template match="*" mode="anonimize_for_devel.featureMember">
- <gml:featureMember>
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="anonimize_for_devel.child"/>
- </xsl:copy>
- </gml:featureMember>
- </xsl:template>
-
-
-
- <xsl:template match="p5:links" mode="anonimize_for_devel.child"/>
- <xsl:template match="default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI[ parent::default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA]|default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY[ parent::default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA]" priority="9" mode="anonimize_for_devel.child">
- <xsl:message>#1600 debug hidden name()=<xsl:value-of select="name()"/>;</xsl:message>
- </xsl:template>
-
-
- <xsl:template match="get_wfs_recurse_xsl:context.PRIMARYKEY|get_wfs_recurse_xsl:context.nodes" mode="anonimize_for_devel.child"/>
- <xsl:template match="text()" mode="anonimize_for_devel.child"/>
-
- <xsl:template match="comment()" mode="anonimize_for_devel.child">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="*" mode="anonimize_for_devel.child">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="text()"/>
- <xsl:apply-templates mode="#current"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="*[ local-name()='krs' or local-name()='pesel' or local-name()='nazwa' or local-name()='nazwisko' or local-name()='NIP' or local-name()='REGON' or local-name()='KRS' or local-name()='Pelna_nazwa_kontrahenta' or
- local-name()='Ulica' or local-name()='Miejscowosc' or local-name()='Kod_pocztowy' or local-name()='TERYT_SYM_UL' or local-name()='TERYT_SYM' or local-name()='Numer_budynku']" mode="anonimize_for_devel.child">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@*"/>
- <xsl:value-of select="concat(substring(text(),1,2),'*****',string-length(text()))"/>
- </xsl:copy>
- </xsl:template>
-
-
-
-
-
-
- </xsl:stylesheet>
|