Ver Fonte

poprawa

a.binder há 9 anos atrás
pai
commit
e09ab3527e
1 ficheiros alterados com 15 adições e 7 exclusões
  1. 15 7
      SE/dev/php-cli/edge_joins_filled_paths.xsl

+ 15 - 7
SE/dev/php-cli/edge_joins_filled_paths.xsl

@@ -17,6 +17,9 @@
         <xsl:variable name="PE_track">
             <xsl:apply-templates/>
         </xsl:variable>
+        <!--<PE_track>
+            <xsl:copy-of select="$PE_track"/>
+        </PE_track>-->
         <xsl:variable name="PE_track">
             <xsl:for-each select="$PE_track/LINESTRING">
                 <LINESTRING>
@@ -27,20 +30,25 @@
                     <bp:Path_Point>
                         <xsl:copy-of select="@*"/>
                          <xsl:attribute name="Pos" select="position()"/>
-                         <xsl:attribute name="X" select="pos[@pos=2]"/>
-                         <xsl:attribute name="Y" select="pos[@pos=3]"/>
+                        <xsl:choose>
+                            <xsl:when test=" string-length(pos[@pos=1]/text())&gt;1">
+                                <xsl:attribute name="X" select="pos[@pos=1]"/>
+                                <xsl:attribute name="Y" select="pos[@pos=2]"/>
+                            </xsl:when>
+                            <xsl:otherwise>
+                                <xsl:attribute name="X" select="pos[@pos=2]"/>
+                                <xsl:attribute name="Y" select="pos[@pos=3]"/>
+                            </xsl:otherwise>
+                        </xsl:choose>
                     </bp:Path_Point>
                     </xsl:for-each>
                 </LINESTRING>
             </xsl:for-each>
         </xsl:variable>
         <!--<edge_paths_with_PE>-->
-            <PE_track>
-                <xsl:copy-of select="$PE_track"/>
-            </PE_track>
-            <SRC>
+            <!--<SRC>
             <xsl:copy-of select="$PE_track"/>
-            </SRC>
+            </SRC>-->
             <PE_candidates_dump>
                 <xsl:call-template name="PE_candidates_dump">
                     <xsl:with-param name="edge_paths_with_PE" select="$PE_track"/>