annotate flys-artifacts/contrib/visualize-transitions.xsl @ 5785:d38004f0c52f

Datacage: Always clone XML template for builders. If the first is not cloned they get interlinked somehow. Feels like a bug in Java's DOM implementation.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 22 Apr 2013 17:01:17 +0200
parents a079f4e26001
children
rev   line source
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 <!--
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4 Copyright (c) 2010 by Intevation GmbH
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 This program is free software under the LGPL (>=v2.1)
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 Read the file LGPL.txt coming with the software for details
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 or visit http://www.gnu.org/licenses/ if it does not exist.
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 Author: Sascha L. Teichmann (sascha.teichmann@intevation.de)
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 -->
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 <xsl:stylesheet
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 xmlns:xlink="http://www.w3.org/1999/xlink"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 version="1.0">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 <xsl:output method="text" encoding="UTF-8"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 <xsl:param name="base-dir">.</xsl:param>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 <xsl:template match="/">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 <xsl:text>digraph transition_model {&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 <xsl:apply-templates />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 <xsl:text>}&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 <xsl:template match="artifact">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 <xsl:choose>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 <xsl:when test="@xlink:href != ''">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 <!-- handle external artifacts -->
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 <xsl:variable name="path">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 <xsl:call-template name="string-replace-all">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 <xsl:with-param name="text" select="@xlink:href" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35 <xsl:with-param name="replace">${artifacts.config.dir}</xsl:with-param>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 <xsl:with-param name="by" select="$base-dir" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 </xsl:call-template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 </xsl:variable>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 <xsl:for-each select="document($path)">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40 <xsl:apply-templates select="/artifact"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 </xsl:for-each>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 </xsl:when>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 <xsl:otherwise>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 <!-- handle internal artifacts -->
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 <xsl:text>subgraph </xsl:text><xsl:value-of select="@name"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 <xsl:text> {&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 <xsl:text> label = "Artefakt: </xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 <xsl:value-of select="@name"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 <xsl:text>";&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
50 <xsl:apply-templates mode="inside-artifact" select="./states/state"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
51 <xsl:apply-templates mode="inside-artifact" select="./states/transition"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
52 <xsl:text>}&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
53 </xsl:otherwise>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
54 </xsl:choose>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
55 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
56
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
57 <xsl:template match="state" mode="inside-artifact">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 <xsl:text> "</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
59 <xsl:value-of select="@id"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
60 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
61 >" [ shape = "record" label=&lt;&lt;table border="0" cellborder="0" cellpadding="3"&gt;
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
62 &lt;tr&gt;&lt;td align="center" colspan="2" bgcolor="black"&gt;&lt;font color="white"&gt;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
63 <xsl:value-of select="@id"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
64 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
65 >&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
66 <xsl:apply-templates mode="inside-artifact" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
67 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
68 >&lt;/table&gt;&gt;]</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
69 <xsl:text>;&#xa;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
70 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
71
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
72 <xsl:template match="data" mode="inside-artifact">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
73 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
74 >&lt;tr&gt;&lt;td align="right"&gt;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
75 <xsl:value-of select="@name"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
76 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
77 >&lt;/td&gt;&lt;td align="left"&gt;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
78 <xsl:value-of select="@type"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
79 <xsl:text disable-output-escaping="yes"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
80 >&lt;/td&gt;&lt;/tr&gt;</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
81 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
82
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
83 <xsl:template match="transition" mode="inside-artifact">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
84 <xsl:text> "</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
85 <xsl:value-of select="from/@state"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
86 <xsl:text disable-output-escaping="yes">" -&gt; "</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
87 <xsl:value-of select="to/@state"/>
384
88614ddfc1e3 visualize-transitions.xsl: State quoting was done wrong.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 351
diff changeset
88 <xsl:text>"</xsl:text>
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
89 <xsl:apply-templates mode="inside-artifact"/>
384
88614ddfc1e3 visualize-transitions.xsl: State quoting was done wrong.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 351
diff changeset
90 <xsl:text>;&#xa;</xsl:text>
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
91 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
92
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
93 <xsl:template match="condition" mode="inside-artifact">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
94 <xsl:text> [ label="</xsl:text>
2168
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
95 <xsl:value-of select="@data"/>
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
96 <xsl:text> </xsl:text>
2168
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
97 <xsl:call-template name="readable-operator">
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
98 <xsl:with-param name="operator" select="@operator"/>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
99 </xsl:call-template>
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
100 <xsl:text> </xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
101 <xsl:value-of select="@value"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
102 <xsl:text>" ]</xsl:text>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
103 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
104
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
105 <xsl:template match="text()" mode="inside-artifact"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
106 <xsl:template match="text()"/>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
107
2168
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
108 <xsl:template name="readable-operator">
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
109 <xsl:param name="operator" />
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
110 <xsl:choose>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
111 <xsl:when test='$operator = "equal"'>=</xsl:when>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
112 <xsl:when test='$operator = "notequal"'>!=</xsl:when>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
113 <xsl:otherwise><xsl:value-of select="$operator"/></xsl:otherwise>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
114 </xsl:choose>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
115 </xsl:template>
a079f4e26001 visualize-transitions.xsl: Fixed output of conditions.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 384
diff changeset
116
351
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
117 <xsl:template name="string-replace-all">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
118 <xsl:param name="text" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
119 <xsl:param name="replace" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
120 <xsl:param name="by" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
121 <xsl:choose>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
122 <xsl:when test="contains($text, $replace)">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
123 <xsl:value-of select="substring-before($text,$replace)" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
124 <xsl:value-of select="$by" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
125 <xsl:call-template name="string-replace-all">
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
126 <xsl:with-param name="text"
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
127 select="substring-after($text,$replace)" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
128 <xsl:with-param name="replace" select="$replace" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
129 <xsl:with-param name="by" select="$by" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
130 </xsl:call-template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
131 </xsl:when>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
132 <xsl:otherwise>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
133 <xsl:value-of select="$text" />
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
134 </xsl:otherwise>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
135 </xsl:choose>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
136 </xsl:template>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
137
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
138 </xsl:stylesheet>
2d268f9894bb Added XSL transformation do create Graphviz digraph out of conf.xml
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
139

http://dive4elements.wald.intevation.org