Ver código fonte

blad byl z child::

a.binder 9 anos atrás
pai
commit
49b2b47caf

+ 1 - 1
SE/dev/php-cli/edge_joins_filled_paths_make.xsl

@@ -161,7 +161,7 @@
                             <LineString>
                                 <xsl:copy-of select="@*"/>
                                 <xsl:attribute name="id_path" select="position()"/>
-                                <xsl:copy-of select="."/>
+                                <xsl:copy-of select="child::node()"/>
                             </LineString>
                         </xsl:for-each>
                     </xsl:variable>

+ 5 - 4
SE/dev/php-cli/edge_paths_with_PE_controll.xsl

@@ -80,9 +80,9 @@
             <xsl:variable name="len" select="@len"/>
         <!--<xsl:variable name="edge_joins_filled_paths" select="collection( 'edge_joins_filled_paths?select=*.xml;recurse=yes')"/>-->
         
-        <!--<EdgeWayJoinsPair>
+        <EdgeWayJoinsPair>
             <xsl:copy-of select="$edge_joins_filled_path"></xsl:copy-of>
-        </EdgeWayJoinsPair>-->
+        </EdgeWayJoinsPair>
         
         <!-- liczmy najwieksza roznice odleglosci miedzy punktami -->
         
@@ -90,16 +90,17 @@
         <!-- rozmieszczamy prawidlowo PE na danej trasie -->
         <xsl:variable name="EconomicDistanceCut">
             <EconomicDistanceCut>
-                    <xsl:for-each select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString">
+                <xsl:for-each select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString">
                         <distance>
                             <xsl:attribute name="pos" select="position()"/>
                             <xsl:attribute name="not_id" select="@not_id"/>
                             <xsl:attribute name="len" select="@len"/>
                             <xsl:attribute name="id_path" select="@id_path"/>
+                            <xsl:attribute name="Points" select="count(Points)"/>
                             <xsl:variable name="Points" select="count(Points)"/>
                             <xsl:variable name="Ways" select="count(Ways)"/>
                         <xsl:choose>
-                            <xsl:when test="Points or Ways">
+                            <xsl:when test="$Ways or $Points">
                                 <xsl:attribute name="point_count" select="$Points + $Ways"/>
                             </xsl:when>
                         </xsl:choose>