Author: jbeard
Date: Thu Mar 17 16:19:56 2011
New Revision: 1082568
URL: http://svn.apache.org/viewvc?rev=1082568&view=rev
Log:
Added some styling.
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/scxml-to-dot.xsl
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/scxml-to-dot.xsl
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/scxml-to-dot.xsl?rev=1082568&r1=1082567&r2=1082568&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/scxml-to-dot.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/scxml-to-dot.xsl Thu
Mar 17 16:19:56 2011
@@ -31,8 +31,16 @@ a document in the graphviz dot syntax.
<template name="htmlTransitionLabel">
<param name="transitions"/>
+ <param name="heading"/>
<text>label=<<TABLE></text>
+ <if test="$heading">
+ <text><TR></text>
+ <text><TD colspan="3"></text>
+ <value-of select="$heading"/>
+ <text></TD></text>
+ <text></TR></text>
+ </if>
<for-each select="$transitions">
<text><TR></text>
<text><TD></text>
@@ -77,7 +85,31 @@ a document in the graphviz dot syntax.
<template match="s:scxml | s:state[.//s:state] | s:parallel">
subgraph cluster_<value-of select="@id"/> {
- color="blue";
+ <choose>
+ <when test="self::s:scxml">
+ color="blue";
+ </when>
+ <when test="../@initial = @id">
+ color="green";
+ </when>
+ <otherwise>
+ color="black";
+ </otherwise>
+ </choose>
+
+
+ <text>style="rounded,</text>
+ <choose>
+ <when test="../self::s:parallel">
+ <text>dashed</text>
+ </when>
+ <otherwise>
+ <text>solid</text>
+ </otherwise>
+ </choose>
+ <text>";</text>
+
+
label="<value-of select="@id"/>";
<apply-templates select="*[not(self::s:transition)]"/>
@@ -90,14 +122,20 @@ a document in the graphviz dot syntax.
<text>[ </text>
<call-template name="htmlTransitionLabel">
<with-param name="transitions"
select="$static_reactions"/>
+ <with-param name="heading"
select="'Static Reactions'"/>
</call-template>
- <text> ];</text>
+ <text> shape=none];</text>
</if>
}
</template>
<template match="s:state[not(.//s:state)]">
- <value-of select="@id"/>;
+ <value-of select="@id"/>
+ <text>[shape=box, style="rounded,filled",fillcolor=gray</text>
+ <if test="../@initial = @id">
+ <text>,color="green"</text>
+ </if>
+ <text>];</text>
</template>
<template name="transition-template">