|
|
@@ -345,11 +345,18 @@
|
|
|
</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:value-of select="concat('<',name())"/>
|
|
|
+ <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply" select="@*"/>
|
|
|
+ <xsl:value-of select="'>'"/>
|
|
|
<xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
|
|
|
<xsl:value-of select="concat('</',name(),'>')"/>
|
|
|
</xsl:template>
|
|
|
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_apply" match="@wildCard|@singleChar|@escapeChar">
|
|
|
+ <xsl:value-of select="encode-for-uri(' ')" disable-output-escaping="yes"/><xsl:value-of select="concat(name(),'="')"/><xsl:value-of select="encode-for-uri(.)" disable-output-escaping="yes"/><xsl:value-of select="'"'"/>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_apply" match="@*"/>
|
|
|
+
|
|
|
<xsl:template match="text()" mode="simpleTypeMakeOgcFilter_merge_apply">
|
|
|
<xsl:value-of select="."/>
|
|
|
</xsl:template>
|
|
|
@@ -421,6 +428,7 @@
|
|
|
<!-- <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:param name="input_obj_with_xpath" tunnel="yes"/>
|
|
|
|
|
|
<xsl:if test="number($debug) > 2"><xsl:message>#1754 name="simpleTypeMakeOgcFilter_merge"
|
|
|
$simpleTypeMakeOgcFilter = <xsl:copy-of select="$simpleTypeMakeOgcFilter"></xsl:copy-of>
|
|
|
@@ -443,17 +451,74 @@
|
|
|
<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>
|
|
|
+
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$simpleTypeMakeOgcFilter/*[2]">
|
|
|
+ <And>
|
|
|
+ <!--<xsl:for-each select="$simpleTypeMakeOgcFilter/*">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:for-each>-->
|
|
|
+ <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" select="$simpleTypeMakeOgcFilter">
|
|
|
+ <xsl:with-param name="xpath_dita"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </And>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <!--<xsl:for-each select="$simpleTypeMakeOgcFilter/*">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:for-each>-->
|
|
|
+ <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" select="$simpleTypeMakeOgcFilter"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
</And>
|
|
|
</xsl:variable>
|
|
|
<xsl:apply-templates select="$Filter" mode="simpleTypeMakeOgcFilter_merge_apply"/>
|
|
|
<xsl:value-of select="'</ogc:Filter>'"/>
|
|
|
</xsl:template>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="simpleTypeMakeOgcFilter">
|
|
|
+ <xsl:param name="input_obj_with_xpath" tunnel="yes"/>
|
|
|
+ <xsl:apply-templates mode="#current"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="*[@xpath]">
|
|
|
+ <xsl:message terminate="yes">#489 NOT EXPECTED @xpath = <xsl:value-of select="."/> on element <xsl:value-of select="name()"/>; </xsl:message>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="*[@xpath_value]">
|
|
|
+ <xsl:param name="input_obj_with_xpath" tunnel="yes" required="yes"/>
|
|
|
+ <!--
|
|
|
+ <ogc:PropertyIsLike wildCard="%2A" singleChar="%23" escapeChar="%21">
|
|
|
+ <ogc:PropertyName>DATE</ogc:PropertyName>
|
|
|
+ <ogc:Literal>2019-<foreign xpath_value="../L_APPOITMENT_USER"/>*</ogc:Literal>
|
|
|
+ </ogc:PropertyIsLike>-->
|
|
|
+ <xsl:value-of select="get_wfs_recurse_xsl:xpath_value_dita('',@xpath_value,$input_obj_with_xpath)"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="*">
|
|
|
+ <xsl:param name="input_obj_with_xpath" tunnel="yes" />
|
|
|
+ <xsl:copy>
|
|
|
+ <xsl:apply-templates mode="#current" select="@*"/>
|
|
|
+ <xsl:apply-templates mode="#current"/>
|
|
|
+ </xsl:copy>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="text()">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="comment()"/>
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template mode="simpleTypeMakeOgcFilter_merge_extract_xpath_associated_context" match="@*">
|
|
|
+ <xsl:message terminate="no">#4933 unexpected attr = <xsl:value-of select="name()"/> == <xsl:value-of select="."/>;</xsl:message>
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </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"/>
|
|
|
@@ -1364,10 +1429,54 @@
|
|
|
</xsl:template>-->
|
|
|
|
|
|
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature" match="RelatedFeature[typeName|typeNameRealResource]">
|
|
|
+ <xsl:param name="get_wfs_recurse_xsl:typeNameRealResource" select="@typeNameRealResource"/>
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes"/>
|
|
|
+ <xsl:param name="resolveDepth.current" required="yes"/>
|
|
|
+ <xsl:message terminate="no">#1433 TESTING match="RelatedFeature[typeName|typeNameRealResource]"
|
|
|
+ typeName/=<xsl:copy-of select="typeName"/>
|
|
|
+
|
|
|
+ typeNameRealResource/=<xsl:copy-of select="typeNameRealResource"/>
|
|
|
+
|
|
|
+ ;
|
|
|
+ </xsl:message>
|
|
|
+
|
|
|
+ <xsl:variable name="typeNameRealResource">
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:typeNameRealResource_extract_associated_context" select="typeNameRealResource">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath" tunnel="yes"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="typeNameRealResource">
|
|
|
+ <xsl:apply-templates mode="get_wfs_recurse_xsl:typeNameRealResource_extract_associated_context" select="typeNameRealResource">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath" tunnel="yes"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:variable>
|
|
|
+
|
|
|
+ <xsl:message>#1445 detected $typeNameRealResource == <xsl:value-of select="$typeNameRealResource"/> ;... continuing</xsl:message>
|
|
|
+ <xsl:call-template name="get_wfs_recurse_xsl:wfs_response_RelatedFeature">
|
|
|
+ <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
|
|
|
+ <xsl:with-param name="get_wfs_recurse_xsl:typeNameRealResource" select="$typeNameRealResource"/>
|
|
|
+ <xsl:with-param name="resolveDepth.current" select="$resolveDepth.current"/>
|
|
|
+
|
|
|
+ </xsl:call-template>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:typeNameRealResource_extract_associated_context" match="*">
|
|
|
+ <xsl:apply-templates mode="#current"/>
|
|
|
+ </xsl:template>
|
|
|
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:typeNameRealResource_extract_associated_context" match="*[@xpath_value]">
|
|
|
+ <xsl:param name="input_obj_with_xpath" required="yes" tunnel="yes"/>
|
|
|
+ <xsl:value-of select="get_wfs_recurse_xsl:xpath_value_dita('',@xpath_value,$input_obj_with_xpath)"/>
|
|
|
+ <xsl:apply-templates mode="#current"/>
|
|
|
+ </xsl:template>
|
|
|
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:typeNameRealResource_extract_associated_context" match="text()">
|
|
|
+ <xsl:copy-of select="."/>
|
|
|
+ </xsl:template>
|
|
|
|
|
|
- <xsl:template mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature" match="RelatedFeature">
|
|
|
+
|
|
|
+ <xsl:template mode="get_wfs_recurse_xsl:wfs_response_RelatedFeature" name="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"/>
|
|
|
@@ -1378,6 +1487,7 @@
|
|
|
<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="$get_wfs_recurse_xsl:typeNameRealResource"/>
|
|
|
<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>
|
|
|
@@ -1395,6 +1505,7 @@
|
|
|
<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="input_obj_with_xpath" select="$input_obj_with_xpath" tunnel="yes"/>
|
|
|
<!-- <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>
|
|
|
@@ -1424,6 +1535,34 @@
|
|
|
<xsl:with-param name="REQUEST.MAXFEATURES" select="$REQUEST.MAXFEATURES"/>
|
|
|
</xsl:call-template>
|
|
|
</xsl:variable>
|
|
|
+ <xsl:message>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #1447 $OGC_Filter
|
|
|
+
|
|
|
+ <xsl:value-of select="$OGC_Filter"/>
|
|
|
+
|
|
|
+
|
|
|
+ $request_string
|
|
|
+
|
|
|
+ <xsl:value-of select="$request_string"/>
|
|
|
+
|
|
|
+ @xpath==<xsl:value-of select="@xpath"/>
|
|
|
+
|
|
|
+ @xpath_value==<xsl:value-of select="@xpath_value"/>
|
|
|
+
|
|
|
+ $xpath_dita
|
|
|
+ <xsl:copy-of select="$xpath_dita"/>
|
|
|
+
|
|
|
+
|
|
|
+ $xpath_value_dita
|
|
|
+ <xsl:copy-of select="$xpath_value_dita"/>
|
|
|
+
|
|
|
+ <!--$input_obj_with_xpath - kontekstowy rekord
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath"/>-->
|
|
|
+
|
|
|
+ </xsl:message>
|
|
|
<!--<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="number($debug) > 5">
|