|
|
@@ -22,14 +22,17 @@
|
|
|
<!-- TESTING for recurse get WFS using xsd schemas and/or retrieved xlinks -->
|
|
|
|
|
|
<xsl:import href="system_cache__appinfo/escape_functions.xsl"/>
|
|
|
+
|
|
|
+ <xsl:include href="default_db/enter_to_ph.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="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'"/>
|
|
|
@@ -42,6 +45,7 @@
|
|
|
<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="simpleSchema.xml" /> <!-- Optionally force simpleSchema to build map -->
|
|
|
|
|
|
<xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/> <!-- TODO should be detected -->
|
|
|
<xsl:param name="debug" select="0"/>
|
|
|
@@ -61,7 +65,28 @@
|
|
|
<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:param name="noRelatedFeatureRoot"/>
|
|
|
+
|
|
|
+ <!-- Plik XML z query XML <GetFeature xmlns="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="2.0.2"><wfs:Query>
|
|
|
+ <wfs:PropertyName>ID</wfs:PropertyName>
|
|
|
+ <wfs:PropertyName>PARENT_ID</wfs:PropertyName>
|
|
|
+ <wfs:PropertyName>TYPE</wfs:PropertyName>
|
|
|
+ <wfs:PropertyName>DESC</wfs:PropertyName>
|
|
|
+ <wfs:PropertyName resolve="all" resolveDepth="2">default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW</wfs:PropertyName>
|
|
|
+ <ogc:Filter>
|
|
|
+ <ogc:Or>
|
|
|
+ <ogc:PropertyIsEqualTo>
|
|
|
+ <ogc:PropertyName>ID</ogc:PropertyName>
|
|
|
+ <ogc:Literal>1003</ogc:Literal>
|
|
|
+ </ogc:PropertyIsEqualTo>
|
|
|
+ <ogc:PropertyIsEqualTo>
|
|
|
+ <ogc:PropertyName>ID</ogc:PropertyName>
|
|
|
+ <ogc:Literal>608</ogc:Literal>
|
|
|
+ </ogc:PropertyIsEqualTo>
|
|
|
+ </ogc:Or>
|
|
|
+ </ogc:Filter>
|
|
|
+</wfs:Query></GetFeature>
|
|
|
+ -->
|
|
|
|
|
|
|
|
|
<xsl:function name="get_wfs_recurse_xsl:GetsimpleSchema">
|
|
|
@@ -103,17 +128,28 @@
|
|
|
<xsl:when test="$api_recurse">
|
|
|
<!-- default_db:CRM_LISTA_ZASOBOW -->
|
|
|
<xsl:choose>
|
|
|
- <xsl:when test="$typeName.object">
|
|
|
+ <xsl:when test="string-length($typeName.object) > 0">
|
|
|
+ <xsl:message>#128-A set $typeName.object = <xsl:value-of select="$typeName.object"/></xsl:message>
|
|
|
<xsl:value-of select="$typeName.object"/>
|
|
|
</xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
+ <xsl:message>#128-A set $typeName.local = <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeName"/></xsl:message>
|
|
|
<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:message>#128-A-2 set result get_wfs_recurse_xsl:typeNameRealResource = <xsl:value-of select="concat( system_cache__appinfo:escape_object_prefix_to_string($typeName),':', system_cache__appinfo:clean_object_prefix($typeName))"/></xsl:message>
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
</xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
- <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource"/>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource">
|
|
|
+ <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:message terminate="yes">#145 SET $get_wfs_recurse_xsl:GetsimpleSchema/RelatedFeature/@typeNameRealResource param!</xsl:message>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
|
|
|
@@ -343,10 +379,12 @@
|
|
|
<!-- <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>
|
|
|
@@ -402,13 +440,35 @@
|
|
|
<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:message>#255 $typeName = <xsl:value-of select="$typeName"/>; $typeName.object = <xsl:value-of select="$typeName.object"/> </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:variable name="get_wfs_recurse_xsl:GetsimpleSchema" >
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" string-length($simpleSchema.xml) > 1">
|
|
|
+ <xsl:message>#435 USING doc($simpleSchema.xml) </xsl:message>
|
|
|
+ <xsl:copy-of select="doc($simpleSchema.xml)"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:when test=" string-length($typeName.object) > 1"/>
|
|
|
+ <xsl:otherwise><!-- todo copy of or value of ? -->
|
|
|
+ <xsl:copy-of select="get_wfs_recurse_xsl:GetsimpleSchema($typeName)"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
<!--<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="get_wfs_recurse_xsl:typeNameRealResource" >
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" string-length($typeName.object) > 1">
|
|
|
+ <xsl:message>#448-B USING $typeName.object as get_wfs_recurse_xsl:typeNameRealResource </xsl:message>
|
|
|
+ <xsl:value-of select="$typeName.object"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:message>#448-C USING get_wfs_recurse_xsl:typeNameRealResource($get_wfs_recurse_xsl:GetsimpleSchema) to detect get_wfs_recurse_xsl:typeNameRealResource = detected=<xsl:value-of select="get_wfs_recurse_xsl:typeNameRealResource($get_wfs_recurse_xsl:GetsimpleSchema)"/> , from get_wfs_recurse_xsl:GetsimpleSchema = <xsl:value-of select="$get_wfs_recurse_xsl:GetsimpleSchema"/></xsl:message>
|
|
|
+ <xsl:value-of select="get_wfs_recurse_xsl:typeNameRealResource($get_wfs_recurse_xsl:GetsimpleSchema)"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
|
|
|
<xsl:variable name="xpath_dita" select="$xpath"/>
|
|
|
<xsl:variable name="xpath_value_dita" select="$xpath_value"/>
|
|
|
@@ -419,9 +479,9 @@
|
|
|
<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="Query.xml.local" select="$Query.xml.local"/>--><!-- Conditionally force query based on XML -->
|
|
|
<!--<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>
|
|
|
@@ -487,43 +547,89 @@
|
|
|
<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:when test=" string-length($api_recurse) > 0">
|
|
|
+ <xsl:if test="$get_wfs_recurse_xsl:wfs_response/ServiceExceptionReport" xpath-default-namespace="http://www.opengis.net/ogc">
|
|
|
+ <xsl:message terminate="yes">ServiceException! 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:choose>
|
|
|
+ <xsl:when test="$noRelatedFeatureRoot">
|
|
|
+ <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>
|
|
|
+ <RelatedFeatureRoot>
|
|
|
+ <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>
|
|
|
+ </RelatedFeatureRoot>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$noRelatedFeatureRoot">
|
|
|
+ <xsl:if test="$debug > 3"><xsl:message>#533 going after wfs:FeatureCollection/gml:featureMember/*...</xsl:message></xsl:if>
|
|
|
+ <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:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <RelatedFeatureRoot>
|
|
|
+ <xsl:if test="$debug > 3"><xsl:message>#533 going after wfs:FeatureCollection/gml:featureMember/*...</xsl:message></xsl:if>
|
|
|
+ <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>
|
|
|
+ </RelatedFeatureRoot>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:message>#563 applying root without $api_recurse. </xsl:message>
|
|
|
<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:when test="$noRelatedFeatureRoot">
|
|
|
+ <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: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>
|
|
|
+ <RelatedFeatureRoot>
|
|
|
+ <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>
|
|
|
+ </RelatedFeatureRoot>
|
|
|
</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>
|
|
|
+ <!--</RelatedFeatureRoot>-->
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
@@ -1122,6 +1228,11 @@
|
|
|
<!--<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:choose>
|
|
|
+ <xsl:when test="@typeNameRealResource"/>
|
|
|
+ <xsl:otherwise><xsl:message terminate="yes">#1174 NOT SET @typeNameRealResource at <xsl:value-of select="name()"/>; </xsl:message></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ <xsl:if test="$debug > 4"><xsl:message>#1172 @typeNameRealResource = <xsl:value-of select="@typeNameRealResource"/> = Set to $get_wfs_recurse_xsl:typeNameRealResource</xsl:message></xsl:if>
|
|
|
<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)"/>-->
|
|
|
@@ -1401,6 +1512,7 @@
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="name()='fid'"/>
|
|
|
<xsl:when test="name()='xml_id'"/>
|
|
|
+ <xsl:when test="name()='format'"/>
|
|
|
<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()"/>-->
|
|
|
@@ -1426,7 +1538,56 @@
|
|
|
<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:choose>
|
|
|
+ <!--TODO <xsl:when test="@format = 'enter_to_ph'">
|
|
|
+ <xsl:variable name="node">
|
|
|
+ <xsl:element name="{name()}">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="enter_to_ph">
|
|
|
+ <xsl:apply-templates mode="enter_to_ph" select="$node">
|
|
|
+ <xsl:with-param name="count" select="count(.)"/>
|
|
|
+ <xsl:with-param name="element" select="name()"/>
|
|
|
+ <!-\-<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np ' ' -\->
|
|
|
+ <!-\-<xsl:with-param name="xpath_token" select="@xpath_token"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np 1 -\->
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:variable>
|
|
|
+ <formated>
|
|
|
+ <node>
|
|
|
+ <xsl:copy-of select="$node"/>
|
|
|
+ </node>
|
|
|
+ <xsl:copy-of select="$enter_to_ph" copy-namespaces="no"/>
|
|
|
+ </formated>
|
|
|
+ </xsl:when>-->
|
|
|
+ <xsl:when test="@format = 'enter_to_ph'">
|
|
|
+ <xsl:variable name="node">
|
|
|
+ <xsl:element name="{name()}">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="node-name" select="local-name()"/>
|
|
|
+ <xsl:variable name="node-count" select="count(../*[ local-name() = $node-name])"/>
|
|
|
+ <xsl:message>#1562 TODO @format = 'enter_to_ph' ; element=<xsl:value-of select="name()"/>; count()=<xsl:value-of select="$node-count"/> ; </xsl:message>
|
|
|
+ <xsl:variable name="node-set">
|
|
|
+ <xsl:element name="{$node-name}">
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="enter_to_ph">
|
|
|
+ <xsl:apply-templates mode="enter_to_ph" select="$node-set">
|
|
|
+ <xsl:with-param name="count" select="$node-count"/>
|
|
|
+ <xsl:with-param name="element" select="$node-name"/>
|
|
|
+ <!--<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>--><!-- mozliwosc wybrania pierwszego wyrazu np ' ' -->
|
|
|
+ <!--<xsl:with-param name="xpath_token" select="@xpath_token"/>--><!-- mozliwosc wybrania pierwszego wyrazu np 1 -->
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:copy-of select="$enter_to_ph" copy-namespaces="no"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
<!--</xsl:variable>-->
|