|
|
@@ -26,13 +26,82 @@
|
|
|
-->
|
|
|
|
|
|
<xsl:template match="joins2ways_z_ID_Way">
|
|
|
- <xsl:variable name="EdgeWayJoinsPair_cand">
|
|
|
+ <!--<xsl:variable name="EdgeWayJoinsPair_cand">
|
|
|
<xsl:apply-templates mode="joins"/>
|
|
|
- </xsl:variable>
|
|
|
- <xsl:variable name="joins2ways_z_ID_Way" select="."/>
|
|
|
+ </xsl:variable>-->
|
|
|
+ <!--<xsl:variable name="joins2ways_z_ID_Way" select="."/>-->
|
|
|
+ <!--<xsl:copy-of select="$EdgeWayJoinsPair_cand"></xsl:copy-of>-->
|
|
|
+ <!--<xsl:choose>
|
|
|
+ <xsl:when test="$EdgeWayJoinsPair_cand/EdgeWayJoinsPair_cand[@ID_Way=current()/@ID_Way]">
|
|
|
+ <JESTOK></JESTOK>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>-->
|
|
|
+ <!--<xsl:copy-of select="$EdgeWayJoinsPair_cand/no_EdgeWayJoinsPair"></xsl:copy-of>-->
|
|
|
|
|
|
<EdgeWayJoins>
|
|
|
- <xsl:for-each-group select="$EdgeWayJoinsPair_cand/EdgeWayJoinsPair_cand" group-by="@ID_Way">
|
|
|
+ <!--<xsl:for-each-group select="$EdgeWayJoinsPair_cand/no_EdgeWayJoinsPair" group-by="@ID_Way">
|
|
|
+ <EdgeWayJoinsPair>
|
|
|
+ <xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
+ <xsl:variable name="ID_Way" select="@ID_Way"/>
|
|
|
+ <xsl:variable name="Joins_miss">
|
|
|
+ <xsl:for-each select="$joins2ways_z_ID_Way/item[@ID_Way=$ID_Way and count( child::node())>1 ]">
|
|
|
+ <!-\- szukamy joinsa ktory ma joina do innego waysa-\->
|
|
|
+ <xsl:variable name="Join_ID" select="@id"/>
|
|
|
+ <xsl:for-each select="item">
|
|
|
+ <ways>
|
|
|
+ <xsl:attribute name="id_join" select="$Join_ID"/>
|
|
|
+ <xsl:attribute name="id_way" select="text()"/>
|
|
|
+ </ways>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:copy-of select="$Joins_miss"/>
|
|
|
+ <xsl:variable name="Ways_miss">
|
|
|
+ <xsl:for-each select="$Joins_miss/ways">
|
|
|
+ <xsl:variable name="id_join" select="@id_join"/>
|
|
|
+ <xsl:variable name="id_way_test" select="@id_way"/>
|
|
|
+ <xsl:for-each select="$ways2joins/ways2joins/item[@id=$id_way_test]/item">
|
|
|
+ <found_joins_in_ways>
|
|
|
+ <xsl:attribute name="id_join" select="$id_join"/>
|
|
|
+ <xsl:attribute name="id_join_found" select="text()"/>
|
|
|
+ </found_joins_in_ways>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:copy-of select="$Ways_miss"/>
|
|
|
+ <xsl:for-each select="$Ways_miss/found_joins_in_ways"> <!-\- [not(@id_join_found=$EdgeJoinFound)]-\->
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="not($Joins_miss/ways[@id_join=current()/@id_join_found])">
|
|
|
+ <!-\-<missed>-\->
|
|
|
+ <!-\-<xsl:attribute name="Joins" select="@id_join"/>-\->
|
|
|
+ <bp:Joins>
|
|
|
+ <xsl:attribute name="Joins" select="current()/@id_join_found"/>
|
|
|
+ </bp:Joins>
|
|
|
+ <!-\-</missed>-\->
|
|
|
+ </xsl:when>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </EdgeWayJoinsPair>
|
|
|
+ </xsl:for-each-group>-->
|
|
|
+ <xsl:for-each-group select="item" group-by="@ID_Way">
|
|
|
+ <EdgeWayJoinsPair>
|
|
|
+ <xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
+ <xsl:variable name="ID_Way" select="@ID_Way"/>
|
|
|
+ <xsl:for-each select="current-group()">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test=" position()=1 or position()=last()">
|
|
|
+ <bp:Joins>
|
|
|
+ <xsl:attribute name="Joins" select="@id"/>
|
|
|
+ </bp:Joins>
|
|
|
+ </xsl:when>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </EdgeWayJoinsPair>
|
|
|
+ </xsl:for-each-group>
|
|
|
+ <!--<xsl:for-each-group select="$EdgeWayJoinsPair_cand/EdgeWayJoinsPair_cand" group-by="@ID_Way">
|
|
|
<EdgeWayJoinsPair>
|
|
|
<xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
<xsl:variable name="ID_Way" select="@ID_Way"/>
|
|
|
@@ -46,7 +115,7 @@
|
|
|
<bp:Joins>
|
|
|
<xsl:variable name="Joins_miss">
|
|
|
<xsl:for-each select="$joins2ways_z_ID_Way/item[@ID_Way=$ID_Way and count( child::node())=2 ]">
|
|
|
- <!-- szukamy joinsa ktory ma joina do innego waysa-->
|
|
|
+ <!-\- szukamy joinsa ktory ma joina do innego waysa-\->
|
|
|
<xsl:variable name="Join_ID" select="@id"/>
|
|
|
<xsl:for-each select="item">
|
|
|
<ways>
|
|
|
@@ -56,7 +125,7 @@
|
|
|
</xsl:for-each>
|
|
|
</xsl:for-each>
|
|
|
</xsl:variable>
|
|
|
- <!--<xsl:copy-of select="$Joins_miss"></xsl:copy-of>-->
|
|
|
+ <!-\-<xsl:copy-of select="$Joins_miss"></xsl:copy-of>-\->
|
|
|
<xsl:variable name="Ways_miss">
|
|
|
<xsl:for-each select="$Joins_miss/ways">
|
|
|
<xsl:variable name="id_join" select="@id_join"/>
|
|
|
@@ -69,14 +138,14 @@
|
|
|
</xsl:for-each>
|
|
|
</xsl:for-each>
|
|
|
</xsl:variable>
|
|
|
- <!--<xsl:copy-of select="$Ways_miss"/>-->
|
|
|
+ <!-\-<xsl:copy-of select="$Ways_miss"/>-\->
|
|
|
<xsl:for-each select="$Ways_miss/found_joins_in_ways[not(@id_join_found=$EdgeJoinFound)]">
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="not($Joins_miss/ways[@id_join=current()/@id_join_found])">
|
|
|
- <!--<missed>-->
|
|
|
- <!--<xsl:attribute name="Joins" select="@id_join"/>-->
|
|
|
+ <!-\-<missed>-\->
|
|
|
+ <!-\-<xsl:attribute name="Joins" select="@id_join"/>-\->
|
|
|
<xsl:attribute name="Joins" select="current()/@id_join_found"/>
|
|
|
- <!--</missed>-->
|
|
|
+ <!-\-</missed>-\->
|
|
|
</xsl:when>
|
|
|
</xsl:choose>
|
|
|
</xsl:for-each>
|
|
|
@@ -85,7 +154,7 @@
|
|
|
</xsl:choose>
|
|
|
</xsl:for-each>
|
|
|
</EdgeWayJoinsPair>
|
|
|
- </xsl:for-each-group>
|
|
|
+ </xsl:for-each-group>-->
|
|
|
</EdgeWayJoins>
|
|
|
</xsl:template>
|
|
|
|
|
|
@@ -95,14 +164,29 @@
|
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template match="item" mode="joins">
|
|
|
+ <!--<xsl:param name="second_turn" />-->
|
|
|
<xsl:choose>
|
|
|
+ <!--<xsl:when test="count(item[@ID_WAY=current()/@ID_Way])>1">
|
|
|
+ <xsl:element name="EdgeWayJoinsPair_cand">
|
|
|
+ <xsl:attribute name="joins" select="@id"/>
|
|
|
+ <xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
+ <xsl:attribute name="ways" select="item/text()"/>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:when>-->
|
|
|
<xsl:when test="count(item)=1">
|
|
|
<xsl:element name="EdgeWayJoinsPair_cand">
|
|
|
+ <xsl:attribute name="pos" select="position()"/>
|
|
|
<xsl:attribute name="joins" select="@id"/>
|
|
|
<xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
<xsl:attribute name="ways" select="item/text()"/>
|
|
|
</xsl:element>
|
|
|
</xsl:when>
|
|
|
+ <!--<xsl:when test="count(../item[@ID_Way=current()/@ID_Way]) and count( child::node()=1)">
|
|
|
+ <xsl:element name="no_EdgeWayJoinsPair">
|
|
|
+ <xsl:attribute name="ID_Way" select="@ID_Way"/>
|
|
|
+ </xsl:element>
|
|
|
+
|
|
|
+ </xsl:when>-->
|
|
|
<!--<xsl:when test="count(item)=2">
|
|
|
<xsl:element name="EdgeWayJoinsPair_cand">
|
|
|
<xsl:attribute name="joins" select="@id"/>
|