You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/06/12 21:36:06 UTC

svn commit: r954067 - in /commons/sandbox/gsoc/2010/scxml-js/trunk: build.js src/scxml/cgf/SCXMLCompiler.js test/xslt/AbstractStatechartGenerator.xsl

Author: jbeard
Date: Sat Jun 12 19:36:05 2010
New Revision: 954067

URL: http://svn.apache.org/viewvc?rev=954067&view=rev
Log:
All unit tests pass for executable content and regular kitchen sink tests, for the state pattern, using xslt for code generation.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/build.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/scxml/cgf/SCXMLCompiler.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build.js?rev=954067&r1=954066&r2=954067&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build.js Sat Jun 12 19:36:05 2010
@@ -70,7 +70,7 @@ require.def("build",
 
 			//paths to all of the SCXML files we want to compile
 			var scxmlTests = {
-				//KitchenSink :"test/kitchen_sink/KitchenSink.xml",
+				KitchenSink :"test/kitchen_sink/KitchenSink.xml",
 				//KitchenSink_performance :"test/kitchen_sink/KitchenSink_performance.xml",
 				KitchenSink_executableContent :"test/kitchen_sink/KitchenSink_executableContent.xml"
 			}
@@ -85,12 +85,10 @@ require.def("build",
 
 
 			var unitTestScripts = [
-/*
 				{ 
 					path : "test/kitchen_sink/scripts/unitTest.js",
 					scxmlTest : scxmlTests.KitchenSink		//back-link
 				},
-*/
 				{ 
 					path : "test/kitchen_sink/scripts/unitTest_executableContent.js",
 					scxmlTest : scxmlTests.KitchenSink_executableContent		//back-link

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/scxml/cgf/SCXMLCompiler.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/scxml/cgf/SCXMLCompiler.js?rev=954067&r1=954066&r2=954067&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/scxml/cgf/SCXMLCompiler.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/scxml/cgf/SCXMLCompiler.js Sat Jun 12 19:36:05 2010
@@ -346,7 +346,6 @@ require.def("src/scxml/cgf/SCXMLCompiler
 
 				});
 				
-
 				//return scxmlRoot;
 
 				//do transforms

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl?rev=954067&r1=954066&r2=954067&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl Sat Jun 12 19:36:05 2010
@@ -171,9 +171,7 @@
 						console.log("entering <value-of select="$stateName"/>");
 					</if>
 
-					<for-each select="$state/onentry/*">
-						<apply-templates select="s:if | s:raise | s:log | s:script | s:send | s:cancel | s:invoke | s:finalize | s:datamodel | s:data | s:assign | s:validate | s:param"/>
-					</for-each>
+					<apply-templates select="$state/s:onentry/*[self::s:if or self::s:raise or self::s:log or self::s:script or self::s:send or self::s:cancel or self::s:invoke or self::s:finalize or self::s:datamodel or self::s:data or self::s:assign or self::s:validate or self::s:param]"/>
 				}
 
 				this.exitAction = function(){
@@ -185,9 +183,7 @@
 						this.historyState.lastConfiguration = currentConfiguration.slice();
 					</if>
 
-					<for-each select="$state/onexit/*">
-						<apply-templates select="s:if | s:raise | s:log | s:script | s:send | s:cancel | s:invoke | s:finalize | s:datamodel | s:data | s:assign | s:validate | s:param"/>
-					</for-each>
+					<apply-templates select="$state/s:onexit/*[self::s:if or self::s:raise or self::s:log or self::s:script or self::s:send or self::s:cancel or self::s:invoke or self::s:finalize or self::s:datamodel or self::s:data or self::s:assign or self::s:validate or self::s:param]"/>
 				}
 
 				<call-template name="genStateHooks">
@@ -561,14 +557,12 @@
 			hasTakenDefaultTransition = true;
 		</if>
 
-
 		//exit states
-
 		<choose>
 			<when test="local-name($s) = 'initial' or local-name($s) = 'history' or 
 						( $s/@c:isBasic and 
 							( not($s/@c:isParallelSubstate) or 
-								($s/@c:isParallelSubstate and not($t/c:exitsParallelRegion))))">
+								($s/@c:isParallelSubstate and not($t/@c:exitsParallelRegion))))">
 				<for-each select="$t/c:exitpath/c:state">
 					<value-of select="."/>.exitAction();
 				</for-each>