a.binder 6 лет назад
Родитель
Сommit
eb204ca4ef

+ 146 - 7
SE/schema/WPS_Functions/get_wfs_recurse_xsl/get_wfs_recurse_xsl.xsl

@@ -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('&lt;',name(),'&gt;')"/>
+        <xsl:value-of select="concat('&lt;',name())"/>
+        <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply" select="@*"/>
+        <xsl:value-of select="'&gt;'"/>
         <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
         <xsl:value-of select="concat('&lt;/',name(),'&gt;')"/>
     </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(),'=&quot;')"/><xsl:value-of  select="encode-for-uri(.)" disable-output-escaping="yes"/><xsl:value-of select="'&quot;'"/>
+    </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) &gt; 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="'&lt;/ogc:Filter&gt;'"/>
     </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) &gt; 5">

+ 2 - 1
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/pismo/ADMIN_USERS.dita

@@ -100,7 +100,6 @@
                       </RelatedFeature>
                       
                       <RelatedFeature  xpath="TABLE_2_ID" xpath_value="../ID_ZASOB" typeName="p5_default_db:ITEM_LINKS" typeNameRealResource="p5_default_db:ITEM_LINKS">
-                        <li>
                         <simpleTypeMakeOgcFilter  ><!-- name="CRM_AUTH_PROFILE" -->
                           <ogc:And>
                             <ogc:PropertyIsEqualTo>
@@ -113,6 +112,8 @@
                             </ogc:PropertyIsEqualTo>
                           </ogc:And>
                         </simpleTypeMakeOgcFilter>
+                        <li>
+                        
                         <RelatedFeature  xpath="ID" xpath_value="../LINKS_TYPE_ID" typeName="p5_default_db:ITEM_LINK_TYPES" typeNameRealResource="p5_default_db:ITEM_LINK_TYPES">
                           <sub>Uprawnienia udostępnione w kontekście <b xpath="OPIS"/>: </sub>
                         </RelatedFeature>

+ 98 - 2
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/pismo/GRAFIK_PRACY_view.dita

@@ -87,6 +87,18 @@
         </thead>
         <tbody>
           <RelatedFeature xpath="L_APPOITMENT_USER" xpath_value="../L_APPOITMENT_USER" typeName="p5_default_db:GRAFIK_PRACY" typeNameRealResource="p5_default_db:GRAFIK_PRACY">
+            <simpleTypeMakeOgcFilter>
+              <ogc:And>
+                <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
+                  <ogc:PropertyName>DATE</ogc:PropertyName>
+                  <ogc:Literal>*-<foreign xpath_value="miesiac"/>*-*</ogc:Literal>
+                </ogc:PropertyIsLike>
+              <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
+                <ogc:PropertyName>DATE</ogc:PropertyName>
+                <ogc:Literal><foreign xpath_value="rok"/>-*-*</ogc:Literal>
+              </ogc:PropertyIsLike>
+              </ogc:And>
+            </simpleTypeMakeOgcFilter>
             <row>
               <entry ><sub xpath="DATE"/></entry>
               <entry xpath="WEEK"/>
@@ -104,6 +116,10 @@
               
               <entry ><sub xpath="A_RECORD_UPDATE_DATE"/></entry>
             </row>
+            <row>
+              <entry >Działanmi</entry>
+              <entry namest="c2" nameend="c12">link</entry>
+            </row>
           </RelatedFeature>
           
           
@@ -201,7 +217,7 @@
         </thead>
         <tbody>
           <row>
-            <entry ><sub xpath="GODZIN_PLANOWO"/></entry>
+            <entry ><sub xpath="GODZIN_PLANOWO"/> </entry>
             <entry ><sub xpath="GODZIN_SPOZNIEN"/></entry>
             <entry ><sub xpath="GODZIN_FAKTYCZNIE"/></entry>
             <entry ><sub xpath="GODZIN_WYJSC_PRZED_CZASEM"/></entry>
@@ -220,7 +236,87 @@
         </tbody>
       </tgroup>
     </table>
-    <p/>
+    <p>
+      <table frame="all" id="podsumowanie_ANALIZA_HISTORII_ALL">
+        <title>Raport działań-czynności w okresie dniowy-godzinowy</title>
+        <tgroup cols="4">
+          <colspec colname="c1" colnum="1" colwidth="2.9*"/>
+          <colspec colname="c2" colnum="2" colwidth="1*"/>
+          <colspec colname="c3" colnum="3" colwidth="1.72*"/>
+          <colspec colname="c4" colnum="4" colwidth="1.72*"/>
+          <!--<colspec colname="c5" colnum="5" colwidth="1.72*"/>-->
+         <!-- <colspec colname="c6" colnum="6" colwidth="1*"/>
+          
+          <colspec colname="c7" colnum="7" colwidth="1*"/>
+          <colspec colname="c8" colnum="8" colwidth="1*"/>
+          <colspec colname="c9" colnum="9" colwidth="1*"/>
+          
+          <colspec colname="c10" colnum="10" colwidth="1*"/>
+          <colspec colname="c11" colnum="11" colwidth="1*"/>
+          <colspec colname="c12" colnum="12" colwidth="1*"/>-->
+          <thead>
+            <row>
+              <entry ><sub >Tabela [ID]</sub></entry>
+              <!--<entry ><sub >Nr Rek</sub></entry>-->
+              <entry ><sub >Pole</sub></entry>
+              <entry ><sub >Wartosc</sub></entry>
+              
+              <entry ><sub >Czas akcji</sub></entry>
+             
+            </row>
+          </thead>
+          <tbody>
+            <RelatedFeature xpath="A_RECORD_UPDATE_AUTHOR" xpath_value="../L_APPOITMENT_USER" typeName="p5_default_db:_ANALIZA_HISTORII_ALL" typeNameRealResource="p5_default_db:_ANALIZA_HISTORII_ALL">
+              <simpleTypeMakeOgcFilter>
+                <ogc:And>
+                  <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
+                    <ogc:PropertyName>A_RECORD_UPDATE_DATE</ogc:PropertyName>
+                    <ogc:Literal>*-<foreign xpath_value="miesiac"/>*-*</ogc:Literal>
+                  </ogc:PropertyIsLike>
+                  <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
+                    <ogc:PropertyName>A_RECORD_UPDATE_DATE</ogc:PropertyName>
+                    <ogc:Literal><foreign xpath_value="rok"/>-*-*</ogc:Literal>
+                  </ogc:PropertyIsLike>
+                </ogc:And>
+              </simpleTypeMakeOgcFilter>
+              <row>
+                <entry ><sub xpath="TABLE_NAME"/> <sub>[</sub><sub xpath="TABLE_ID"/><sub>]</sub> </entry>
+                
+                <entry ><sub xpath="FIELD"/></entry>
+                <entry ><sub xpath="VALUE"/></entry>
+                
+                
+                
+                <entry ><sub xpath="A_RECORD_UPDATE_DATE"/></entry>
+               <!-- <entry ><sub xpath="ILOSC_PRZERW"/></entry>
+                <entry ><sub xpath="DNI_W_PRACY"/></entry>
+                <entry ><sub xpath="ILOSC_DNI"/></entry>
+                <entry ><sub xpath="NADGODZINY"/></entry>
+                <entry ><sub xpath="GODZIN_W_NOCY"/></entry>
+                <entry ><sub xpath="GODZIN_PRZYJSC_PRZED_CZASEM"/></entry>
+                <entry ><sub xpath="GODZIN_WYJSC_PO_CZASIE"/></entry>-->
+              </row>
+              <!-- przejscie po relacji z nazwa kontekstowa -->
+              
+              <RelatedFeature xpath="ID" 
+                xpath_value="../TABLE_ID">
+                <typeName><foreign>p5_default_db:</foreign><foreign xpath_value="TABLE_NAME"/></typeName>
+                <typeNameRealResource><foreign>p5_default_db:</foreign><foreign xpath_value="TABLE_NAME"/></typeNameRealResource>
+                <row>
+                  <entry><sub>Dane kontekst.</sub></entry>
+                  <entry namest="c2" nameend="c4">
+                    Opis <sub xpath="M_DIST_DESC"/>
+                  </entry>
+                </row>
+              </RelatedFeature>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p>
+    
+    
+    
     <p><sup>wygenerowano przez procesy5.pl</sup></p>
   </body>
 </topic>

+ 1 - 1
SE/superedit-ANALIZA_HISTORII_ALL.php

@@ -482,7 +482,7 @@ if(V::get('DBG', '', $_GET)){echo'<pre style="max-height:200px;overflow:auto;bor
 								if(($value!='')and($value!='NULL')and($value!='N/S;')and($field!='_action_time')and($field!='_action_type')and($field!='the_geom' and $value!='')) {
 								if(strlen($value>10000)) $value='DATA OVER 10000bytes';
 								$sql="insert ignore into _ANALIZA_HISTORII_ALL( TABLE_NAME, TABLE_ID,FIELD,VALUE,A_RECORD_CREATE_DATE,A_RECORD_CREATE_AUTHOR,A_RECORD_UPDATE_DATE,A_RECORD_UPDATE_AUTHOR ) values (
-								  '{$RTH_A['TABLE_HIST']}','{$h->ID_USERS2}','{$field}','".DB::_($value)."','{$h->A_RECORD_CREATE_DATE}','{$h->A_RECORD_CREATE_AUTHOR}','{$h->A_RECORD_UPDATE_DATE}','{$h->A_RECORD_UPDATE_AUTHOR}' )";
+								  '{$RTH_A['TABLE']}','{$h->ID_USERS2}','{$field}','".DB::_($value)."','{$h->A_RECORD_CREATE_DATE}','{$h->A_RECORD_CREATE_AUTHOR}','{$h->A_RECORD_UPDATE_DATE}','{$h->A_RECORD_UPDATE_AUTHOR}' )";
 								  //echo "<br>".$sql;
 								  if(V::get('DBG', '', $_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">$sql (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';echo $sql;echo'</pre>';}
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
SE/superedit-DB_PROCEDURES_CREATE.php


Некоторые файлы не были показаны из-за большого количества измененных файлов