Ver Fonte

do debugu todo

a.binder há 9 anos atrás
pai
commit
9ec16b0ebb
1 ficheiros alterados com 151 adições e 0 exclusões
  1. 151 0
      SE/dev/php-cli/debug_biale_plamy.xsl

+ 151 - 0
SE/dev/php-cli/debug_biale_plamy.xsl

@@ -0,0 +1,151 @@
+<?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:bp="https://procesy5.pl/biale_plamy-schema.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    
+    <xsl:variable name="biale_plamy_class_regenerate.php" select="biale_plamy_class_regenerate.php"/>
+    
+    <!--<xsl:variable name="ways_as_Text_z_ID_xml.xsl" select="ways_as_Text_z_ID_xml.xsl"/>-->
+    <xsl:variable name="ways_as_Text_z_ID_xml.xml" select="ways_as_Text_z_ID_xml.xml"/>
+    
+    <xsl:variable name="biale_plamy_class_findWay.php" select="biale_plamy_class_findWay.php"/><!--<xsl:variable name="biale_plamy-find_ways.php" select="biale_plamy-find_ways.php"/>-->
+    <xsl:variable name="joins_asText.xml" select="joins_asText.xml"/>
+    <xsl:variable name="joins2ways.xml" select="joins2ways.xml"/>
+    <xsl:variable name="points2ID_Way.xml" select="points2ID_Way.xml"/>
+    <xsl:variable name="ways2drogi.xml" select="ways2drogi.xml"/><!--<xsl:variable name="ways_2ID_Way.xml" select="ways_2ID_Way.xml"/>-->
+    
+    
+    <xsl:variable name="ways_asText.xml" select="ways_asText.xml"/>
+    
+    <xsl:variable name="waysLengths.xmll" select="waysLengths.xml"/>
+    <!--<xsl:variable name="joins2ways_z_ID_Way.xsl" select="joins2ways_z_ID_Way.xsl"/>-->
+    <xsl:variable name="joins2ways_z_ID_Way.xml" select="joins2ways_z_ID_Way.xml"/>
+    <!--<xsl:variable name="biale_plamy_joins2ways_do_paths.xsl" select="biale_plamy_joins2ways_do_paths.xsl"/>-->
+    
+    <!--<xsl:variable name="edge_joins_filled_paths_make.xsl" select="edge_joins_filled_paths_make.xsl"/>-->
+    
+    
+    <xsl:variable name="points_asText.xml" select="points_asText.xml"/>
+    <xsl:variable name="points2joins.xml" select="points2joins.xml"/>
+    <xsl:variable name="edge_joins.xml" select="edge_joins.xml"/>
+    
+    <!--<xsl:variable name="joins_asText_xml.xsl" select="joins_asText_xml.xsl"/>-->
+    <xsl:variable name="joins_asText_xml.xml" select="joins_asText_xml.xml"/> 
+    <!-- sciezki -->
+    <xsl:variable name="edge_joins_filled_paths.xml" select="edge_joins_filled_paths.xml"/>
+    
+    <!--<xsl:variable name="edge_paths_with_PE.xsl" select="edge_paths_with_PE.xsl"/>--><!-- stary-->
+    <!--<xsl:variable name="edge_paths_with_PE_controll_to_PE.xsl" select="edge_paths_with_PE_controll_to_PE.xsl"/>-->
+    <!--<xsl:variable name="edge_paths_with_PE_controll.xsl" select="edge_paths_with_PE_controll.xsl"/>--><!-- nowy point matrix-->   
+    <xsl:variable name="edge_paths_with_PE_controll_temp" select="edge_paths_with_PE_controll_temp"/> <!-- do oszukania silnika aby korzystac z petli i przekazywac dane do siebie -->
+    <xsl:variable name="edge_paths_with_PE_controll_temp.alias" select="edge_paths_with_PE_controll_temp.alias"/>
+    
+    <xsl:variable name="edge_paths_with_PE_controll.xml" select="edge_paths_with_PE_controll.xml"/>  
+    
+    <xsl:variable name="edge_paths_with_PE.xml" select="edge_paths_with_PE.xml"/><!--     biale_plamy_from_paths_php_to_place_PE-->
+    
+    <xsl:variable name="biale_put_PE_to_mysql.php" select="biale_put_PE_to_mysql.php"/>
+    <!--<xsl:variable name="cables_from_joins_to_PE.xsl" select="cables_from_joins_to_PE.xsl"/>-->
+    <xsl:variable name="cables_from_joins_to_PE.xml" select="cables_from_joins_to_PE.xml"/><!-- xml do wygenerowania  -->
+    <!--<xsl:variable name="biale_put_Cables_to_PE.php" select="biale_put_Cables_to_PE.php"/>-->
+    
+    
+    
+    <xsl:variable name="test_count">
+       <rows> 
+        <row id="1">asd</row>
+           <row id="2">1asd</row>
+           <row id="3">2asd</row>
+           <row id="4">3asd</row>
+           <row id="5">4asd</row>
+           <row id="6">5asd</row>
+           <row id="7" not="1">6asd</row>
+           <row id="8" not="1">7asd</row>
+           <row id="9">8asd</row>
+           <row id="10">9asd</row>
+           <row id="11">10asd</row>
+           <row id="12">11asd</row>
+           <row id="13">12asd</row>
+           <row id="14">13asd</row>
+           <row id="15">14asd</row>
+           <row id="16">15asd</row>
+           <row id="17">16asd</row>
+       </rows>
+    </xsl:variable>
+    
+    
+    <xsl:template name="main">
+        <!-- sprawdzenie ilosci wezlow na drodze -->
+        
+        <!-- for each group mod 16 test -->
+            <xsl:variable name="test_2">
+                <test_2>
+                <xsl:for-each select="$test_count/rows/*">
+                    <row>
+                        <xsl:copy-of select="@*"/>
+                        <xsl:attribute name="pos" select="position()"/>
+                        <xsl:choose>
+                            <xsl:when test="position() mod 3 = 0">
+                                <xsl:attribute name="pos_gr" select="1"/>
+                            </xsl:when>
+                            <xsl:otherwise><xsl:attribute name="pos_gr" select="0"/></xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:choose>
+                            <xsl:when test="@not"/>
+                            <xsl:otherwise><xsl:attribute name="not" select="0"/></xsl:otherwise>
+                        </xsl:choose>
+                        <xsl:copy-of select=" text()"/>
+                    </row>
+                </xsl:for-each>
+            </test_2>
+            </xsl:variable>
+        
+        <xsl:copy-of select="$test_2"/>
+        
+        <xsl:variable name="test_3">
+            <test_3>
+                <xsl:for-each select="$test_2/test_2/*">
+                <row>
+                    <xsl:copy-of select="@*"/>
+                    <xsl:variable name="cur_pos" select="@pos"/>
+                    <xsl:attribute name="gr_id" select="sum($test_2/test_2/row[ number(@pos) &lt; $cur_pos]/number(@id)) - sum($test_2/test_2/row[ number(@pos) &lt; $cur_pos]/number(@not))"/>
+                    <xsl:attribute name="test_id" select="@test"/>
+                        <!--<co_jest_nizej>
+                            <xsl:copy-of select="$test_2/test_2/row[number(@pos) &lt; number($cur_pos)]"/>
+                        </co_jest_nizej>-->
+                    <xsl:copy-of select=" text()"/>
+                </row>
+            </xsl:for-each>
+            </test_3>
+        </xsl:variable>
+        
+        
+        <xsl:copy-of select="$test_3"></xsl:copy-of>
+        
+        <test_4>
+            <xsl:for-each-group select="$test_3/test_3" group-by="sum(@pos_gr)">
+                <group>
+                    <xsl:for-each select="current-group()">
+                        <row>
+                            <xsl:copy-of select="."/>
+                        </row>
+                    </xsl:for-each>
+                </group>
+            </xsl:for-each-group>    
+        </test_4>
+        
+        
+    </xsl:template>
+    
+    
+    
+    
+    
+    
+</xsl:stylesheet>