Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/contrib/visualize-transitions.xsl Wed Jan 25 10:19:30 2012 +0000 +++ b/flys-artifacts/contrib/visualize-transitions.xsl Wed Jan 25 10:52:58 2012 +0000 @@ -92,9 +92,11 @@ <xsl:template match="condition" mode="inside-artifact"> <xsl:text> [ label="</xsl:text> - <xsl:value-of select="@inputvalue"/> + <xsl:value-of select="@data"/> <xsl:text> </xsl:text> - <xsl:value-of select="@operator"/> + <xsl:call-template name="readable-operator"> + <xsl:with-param name="operator" select="@operator"/> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="@value"/> <xsl:text>" ]</xsl:text> @@ -103,6 +105,15 @@ <xsl:template match="text()" mode="inside-artifact"/> <xsl:template match="text()"/> + <xsl:template name="readable-operator"> + <xsl:param name="operator" /> + <xsl:choose> + <xsl:when test='$operator = "equal"'>=</xsl:when> + <xsl:when test='$operator = "notequal"'>!=</xsl:when> + <xsl:otherwise><xsl:value-of select="$operator"/></xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template name="string-replace-all"> <xsl:param name="text" /> <xsl:param name="replace" />