comparison flys-artifacts/contrib/visualize-transitions.xsl @ 2168:a079f4e26001

visualize-transitions.xsl: Fixed output of conditions. flys-artifacts/trunk@3763 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 25 Jan 2012 10:52:58 +0000
parents 88614ddfc1e3
children
comparison
equal deleted inserted replaced
2167:e0add4b2d4bc 2168:a079f4e26001
90 <xsl:text>;&#xa;</xsl:text> 90 <xsl:text>;&#xa;</xsl:text>
91 </xsl:template> 91 </xsl:template>
92 92
93 <xsl:template match="condition" mode="inside-artifact"> 93 <xsl:template match="condition" mode="inside-artifact">
94 <xsl:text> [ label="</xsl:text> 94 <xsl:text> [ label="</xsl:text>
95 <xsl:value-of select="@inputvalue"/> 95 <xsl:value-of select="@data"/>
96 <xsl:text> </xsl:text> 96 <xsl:text> </xsl:text>
97 <xsl:value-of select="@operator"/> 97 <xsl:call-template name="readable-operator">
98 <xsl:with-param name="operator" select="@operator"/>
99 </xsl:call-template>
98 <xsl:text> </xsl:text> 100 <xsl:text> </xsl:text>
99 <xsl:value-of select="@value"/> 101 <xsl:value-of select="@value"/>
100 <xsl:text>" ]</xsl:text> 102 <xsl:text>" ]</xsl:text>
101 </xsl:template> 103 </xsl:template>
102 104
103 <xsl:template match="text()" mode="inside-artifact"/> 105 <xsl:template match="text()" mode="inside-artifact"/>
104 <xsl:template match="text()"/> 106 <xsl:template match="text()"/>
107
108 <xsl:template name="readable-operator">
109 <xsl:param name="operator" />
110 <xsl:choose>
111 <xsl:when test='$operator = "equal"'>=</xsl:when>
112 <xsl:when test='$operator = "notequal"'>!=</xsl:when>
113 <xsl:otherwise><xsl:value-of select="$operator"/></xsl:otherwise>
114 </xsl:choose>
115 </xsl:template>
105 116
106 <xsl:template name="string-replace-all"> 117 <xsl:template name="string-replace-all">
107 <xsl:param name="text" /> 118 <xsl:param name="text" />
108 <xsl:param name="replace" /> 119 <xsl:param name="replace" />
109 <xsl:param name="by" /> 120 <xsl:param name="by" />

http://dive4elements.wald.intevation.org