|
@@ -0,0 +1,62 @@
|
|
|
|
|
+<?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:param name="ways_as_Text_z_ID_xml.xml" select="'ways_as_Text_z_ID_xml.xml'"/>
|
|
|
|
|
+ <xsl:variable name="ways_asText_z_ID_xml" select="doc($ways_as_Text_z_ID_xml.xml)"/>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:param name="joins_asText_xml.xml" select="'joins_asText_xml.xml'"/>
|
|
|
|
|
+ <xsl:variable name="joins_asText_xml" select="doc($joins_asText_xml.xml)"/>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:output indent="yes"/>
|
|
|
|
|
+ <xsl:strip-space elements="*"/>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template match="EdgeWayJoins">
|
|
|
|
|
+ <edge_joins_filled_paths>
|
|
|
|
|
+ <xsl:attribute name="stylesheet" select="'edge_joins_filled_paths_make.xsl'"/>
|
|
|
|
|
+ <xsl:apply-templates/>
|
|
|
|
|
+ </edge_joins_filled_paths>
|
|
|
|
|
+ </xsl:template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:template match="EdgeWayJoinsPair">
|
|
|
|
|
+ <item>
|
|
|
|
|
+ <xsl:attribute name="id" select="@ID_Way"/>
|
|
|
|
|
+ <xsl:variable name="ID_Way" select="@ID_Way"/>
|
|
|
|
|
+ <asText>
|
|
|
|
|
+ <xsl:variable name="bp:Joins">
|
|
|
|
|
+ <xsl:for-each select="bp:Joins">
|
|
|
|
|
+ <bp:Joins>
|
|
|
|
|
+ <xsl:copy-of select="@*"/>
|
|
|
|
|
+ <xsl:copy-of select="$joins_asText_xml/joins_asText_xml/item[@id= current()/@id]/bp:Path_Point/@X"/>
|
|
|
|
|
+ <xsl:copy-of select="$joins_asText_xml/joins_asText_xml/item[@id= current()/@id]/bp:Path_Point/@Y"/>
|
|
|
|
|
+ <xsl:attribute name="position" select="position()"/>
|
|
|
|
|
+ </bp:Joins>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="Join_X1" select="$bp:Joins/bp:Joins[@position=1]/@X"/>
|
|
|
|
|
+ <xsl:variable name="Join_Y1" select="$bp:Joins/bp:Joins[@position=1]/@Y"/>
|
|
|
|
|
+ <xsl:variable name="Join_X2" select="$bp:Joins/bp:Joins[@position=2]/@X"/>
|
|
|
|
|
+ <xsl:variable name="Join_Y2" select="$bp:Joins/bp:Joins[@position=2]/@Y"/>
|
|
|
|
|
+ <!-- na podstawie joina ustalamy jego wspolrzedne -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- teraz trzeba wiedziec ktory punkt wziac z drogi - czy pierwszy czy drugi jaki pasuje do pary -->
|
|
|
|
|
+ <Ways>
|
|
|
|
|
+ <xsl:for-each select="$ways_asText_z_ID_xml/ways_asText_z_ID_xml/item[@ID_Way=$ID_Way]/bp:Path_Point">
|
|
|
|
|
+ <bp:Path_Point>
|
|
|
|
|
+ <xsl:copy-of select="@*"/>
|
|
|
|
|
+ </bp:Path_Point>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </Ways>
|
|
|
|
|
+ </asText>
|
|
|
|
|
+ </item>
|
|
|
|
|
+ </xsl:template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+</xsl:stylesheet>
|