graph.graph-to-analyze-evaluated.xsl 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. exclude-result-prefixes="xs"
  5. xmlns:graph="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/graph/graph.xsd"
  6. version="2.0">
  7. <xsl:output indent="yes"/>
  8. <xsl:strip-space elements="*"/>
  9. <xsl:param name="graph.graph-to-analyze-property.xml" required="yes"/>
  10. <xsl:variable name="graph:graph.graph-to-analyze-property.xml" select="doc($graph.graph-to-analyze-property.xml)"/>
  11. <xsl:template match="graph:graph.graph-to-analyze.xml" mode="graph:graph-to-analyze-evaluated.xml">
  12. <graph:graph-to-analyze-evaluated.xml>
  13. <xsl:copy-of select="@*"/>
  14. <xsl:apply-templates mode="#current"/>
  15. </graph:graph-to-analyze-evaluated.xml>
  16. </xsl:template>
  17. <xsl:template match="*" mode="graph:graph-to-analyze-evaluated.xml">
  18. <xsl:copy copy-namespaces="no">
  19. <xsl:apply-templates mode="graph:graph-to-analyze-evaluated.xml" select="@*"/>
  20. <xsl:apply-templates mode="#current"/>
  21. </xsl:copy>
  22. </xsl:template>
  23. <xsl:template match="@*" mode="graph:graph-to-analyze-evaluated.xml">
  24. <xsl:copy-of select="."/>
  25. </xsl:template>
  26. <xsl:template match="@value[ contains(.,'${')]|@location[ contains(.,'${')]" mode="graph:graph-to-analyze-evaluated.xml">
  27. <xsl:attribute name="{name()}" select="$graph:graph.graph-to-analyze-property.xml//property[@name = current()/../@name][1]/@graph:property.evaluated"/>
  28. <xsl:attribute name="graph:value-evaluated-from" select="."/>
  29. </xsl:template>
  30. <xsl:template match="text()|comment()">
  31. <xsl:copy-of select="."/>
  32. </xsl:template>
  33. </xsl:stylesheet>