commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1082559 - in /commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js: AbstractEnumeratedStatechartGenerator.xsl AbstractStatechartGenerator.xsl StatePatternStatechartGenerator.xsl
Date Thu, 17 Mar 2011 16:18:01 GMT
Author: jbeard
Date: Thu Mar 17 16:18:01 2011
New Revision: 1082559

URL: http://svn.apache.org/viewvc?rev=1082559&view=rev
Log:
Fixed bug where an unnecessary inner conditional statement was being generated.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl?rev=1082559&r1=1082558&r2=1082559&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
Thu Mar 17 16:18:01 2011
@@ -136,7 +136,7 @@
 				
 				if(e.match(<value-of select="$regexpName"/>)
 					<if test="@cond">
-						&amp;&amp; <value-of select="@cond"/>
+						&amp;&amp; (<value-of select="@cond"/>)
 					</if>){
 
 					return <value-of select="@c:tName"/>();

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl?rev=1082559&r1=1082558&r2=1082559&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
Thu Mar 17 16:18:01 2011
@@ -962,7 +962,7 @@
 
 			
 		}else{
-			<call-template name="genTriggerDispatcherGuardConditionBlockContents">
+			<call-template name="genTriggerDispatcherInnerContents">
 				<with-param name="s" select="$s"/>
 				<with-param name="t" select="$t"/>
 			</call-template>
@@ -1071,7 +1071,7 @@
 			</when>
 			<otherwise>
 				<for-each select="$transitions">
-					<call-template name="genTriggerDispatcherGuardConditionBlockContents">
+					<call-template name="genTriggerDispatcherInnerContents">
 						<with-param name="s" select="$s"/>
 						<with-param name="t" select="."/>
 					</call-template>
@@ -1080,29 +1080,6 @@
 		</choose>
 	</template>
 
-	<template name="genTriggerDispatcherGuardConditionBlockContents"> 
-		<param name="s"/>
-		<param name="t"/>
-
-		<!-- conditionally wrap contents in an if block for the guard condition -->
-		<choose>
-			<when test="$t/@cond">
-				if(<value-of select="$t/@cond"/>){
-					<call-template name="genTriggerDispatcherInnerContents">
-						<with-param name="s" select="$s"/>
-						<with-param name="t" select="$t"/>
-					</call-template>
-				}
-			</when>
-			<otherwise>
-				<call-template name="genTriggerDispatcherInnerContents">
-					<with-param name="s" select="$s"/>
-					<with-param name="t" select="$t"/>
-				</call-template>
-			</otherwise>	
-		</choose>
-	</template>
-
 	<template name="genTriggerDispatcherInnerContents">
 		<param name="s"/>
 		<param name="t"/>

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=1082559&r1=1082558&r2=1082559&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
Thu Mar 17 16:18:01 2011
@@ -97,7 +97,7 @@
 				
 				if(e.match(<value-of select="$regexpName"/>)
 					<if test="@cond">
-						&amp;&amp; <value-of select="@cond"/>
+						&amp;&amp; (<value-of select="@cond"/>)
 					</if>){
 					<call-template name="genTriggerDispatcherContents">
 						<with-param name="s" select="$state"/>



Mime
View raw message