commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1037679 - in /commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt: backends/js/ ir-compiler/
Date Mon, 22 Nov 2010 11:42:13 GMT
Author: jbeard
Date: Mon Nov 22 11:42:12 2010
New Revision: 1037679

URL: http://svn.apache.org/viewvc?rev=1037679&view=rev
Log:
Fixed bug where history state without default transition would not generate default transition
action. Fixed this by adding another transformation which would add a default transition to
history states that do not already have one.

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl
  (with props)
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/splitTransitionTargets.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl?rev=1037679&r1=1037678&r2=1037679&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
Mon Nov 22 11:42:12 2010
@@ -23,6 +23,7 @@
 	<import href="AbstractStatechartGenerator.xsl"/>
 
 	<c:dependencies>
+		<c:dependency path="ir-compiler/addDefaultTransitionToHistoryStates.xsl"/>
 		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
 		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>
 		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl?rev=1037679&r1=1037678&r2=1037679&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
Mon Nov 22 11:42:12 2010
@@ -28,6 +28,7 @@
 	
 
 	<c:dependencies>
+		<c:dependency path="ir-compiler/addDefaultTransitionToHistoryStates.xsl"/>
 		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
 		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
 		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl?rev=1037679&r1=1037678&r2=1037679&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
Mon Nov 22 11:42:12 2010
@@ -27,6 +27,7 @@
 	</c:enabledConditionalDependencyProperties>
 
 	<c:dependencies>
+		<c:dependency path="ir-compiler/addDefaultTransitionToHistoryStates.xsl"/>
 		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
 		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
 		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl?rev=1037679&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl
Mon Nov 22 11:42:12 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	xmlns:c="http://commons.apache.org/scxml-js"
+	xmlns="http://www.w3.org/2005/07/scxml"
+	version="1.0">
+	<xsl:output method="xml"/>
+
+	<c:dependencies>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+	</c:dependencies>
+
+	<!-- identity transform -->
+	<xsl:template match="@*|node()">
+	   <xsl:copy>
+	      <xsl:apply-templates select="@*|node()"/>
+	   </xsl:copy>
+	</xsl:template>
+
+	<xsl:template match="s:history[not(s:transition)]">
+		<!-- get the default state of the parent -->
+
+		<xsl:copy>
+			<xsl:apply-templates select="@*"/>
+
+			<s:transition target="{../s:initial/s:transition/@target}"/>
+
+			<xsl:apply-templates select="node()"/>
+
+		</xsl:copy>	
+	</xsl:template>
+
+</xsl:stylesheet>

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addDefaultTransitionToHistoryStates.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/splitTransitionTargets.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/splitTransitionTargets.xsl?rev=1037679&r1=1037678&r2=1037679&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/splitTransitionTargets.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/splitTransitionTargets.xsl
Mon Nov 22 11:42:12 2010
@@ -8,6 +8,7 @@
 
 	<c:dependencies>
 		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/addDefaultTransitionToHistoryStates.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->



Mime
View raw message