Author: jbeard
Date: Mon Aug 16 01:26:21 2010
New Revision: 985782

URL: http://svn.apache.org/viewvc?rev=985782&view=rev
Log:
Fixed small bug in AbstractStatechartGenerator.xsl that was breaking unit tests.

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

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=985782&r1=985781&r2=985782&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
 Mon Aug 16 01:26:21 2010
@@ -685,23 +685,27 @@
                        var historyStateParent = <value-of 
select="$historyStateReference"/>.parent;
 
                        <value-of 
select="$historyStateReference"/>.lastConfiguration
-                               .filter(function(n){return 
n.ancestors.indexOf(historyStateParent)!=-1})
+                               .filter(function(state){
+                                       return <value-of 
select="$genHistoryTriggerDispatcherInnerForEachStateReference"/>
+                                               
.ancestors.indexOf(historyStateParent)!=-1
+                               })
                                .forEach(function(state){
                                        <call-template 
name="genHistoryTriggerDispatcherInnerForEach">
                                                <with-param name="isDeep" 
select="$isDeep"/>
                                                <with-param 
name="isChildOfParallel" select="$isChildOfParallel"/>
                                        </call-template>
                        });
-
-                       newConfiguration = 
newConfiguration.concat(currentConfiguration.filter(function(n) {
-                               return n.ancestors.indexOf(historyStateParent) 
== -1
-                       }))
                        
                        <choose>
                                <when test="$isDeep">
                                        currentConfiguration =  <value-of 
select="$historyStateReference"/>.lastConfiguration.slice();
                                </when>
                                <otherwise>
+                                       newConfiguration = 
newConfiguration.concat(currentConfiguration.filter(function(state) {
+                                               return <value-of 
select="$genHistoryTriggerDispatcherInnerForEachStateReference"/>
+                                                       
.ancestors.indexOf(historyStateParent) == -1
+                                       }))
+
                                        currentConfiguration = <value-of 
select="$genHistoryTriggerDispatcherCurrentConfigurationAssignmentRHS"/>;
                                </otherwise>
                        </choose>


Reply via email to