edge_paths_with_PE_fixed.xsl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:bp="https://procesy5.pl/biale_plamy-schema.xsd"
  5. xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
  6. exclude-result-prefixes="xs"
  7. version="2.0">
  8. <xsl:output indent="yes"/>
  9. <xsl:strip-space elements="*"/>
  10. <xsl:param name="plamy_prefix" />
  11. <xsl:param name="PE_fixings.xml" select="concat('PE_fixings',$plamy_prefix,'.xml')"/>
  12. <xsl:param name="PE_fixings" select=" doc($PE_fixings.xml)"/>
  13. <xsl:template match="PE_candidates_dump">
  14. <PE_candidates_dump>
  15. <xsl:apply-templates/>
  16. </PE_candidates_dump>
  17. </xsl:template>
  18. <xsl:template match="LINESTRING">
  19. <LINESTRING>
  20. <xsl:copy-of select="@*"/>
  21. <xsl:apply-templates/>
  22. </LINESTRING>
  23. </xsl:template>
  24. <xsl:template match="bp:Path_Point">
  25. <xsl:choose>
  26. <xsl:when test="$PE_fixings/wfs:FeatureCollection//p5_default_db:ID_Join[ text()=current()/@ID_Join and not(parent::node()/p5_default_db:the_geom/gml:Point)]">
  27. <edge_paths_with_PE_fixed>
  28. <xsl:message terminate="no">Found Join fixed @ID_Join=<xsl:value-of select="@ID_Join"/>;</xsl:message>
  29. <xsl:attribute name="debug" select="'point removed and detected in PE_fixings.xml'"/>
  30. <xsl:copy-of select="@*"/>
  31. </edge_paths_with_PE_fixed>
  32. </xsl:when>
  33. <xsl:otherwise>
  34. <xsl:copy-of select="."/>
  35. </xsl:otherwise>
  36. </xsl:choose>
  37. </xsl:template>
  38. </xsl:stylesheet>