Author: jbeard
Date: Thu Mar 17 16:17:40 2011
New Revision: 1082558

URL: http://svn.apache.org/viewvc?rev=1082558&view=rev
Log:
Fixed bug with flattening algorithm.

Added:
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/positionTransitionsAfterSubstates.xsl
   (with props)
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml?rev=1082558&r1=1082557&r2=1082558&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml Thu Mar 17 
16:17:40 2011
@@ -82,7 +82,6 @@
        <property name="path_to_dojo" value="${path_to_dojo_base}/dojo.js"/>
 
        <path id="scxml_tests_xml">
-               <!--
                <pathelement location="test/kitchen_sink/KitchenSink.xml"/>
                <pathelement 
location="test/kitchen_sink/KitchenSink_dataModule.xml"/>
                <pathelement 
location="test/kitchen_sink/KitchenSink_performance.xml"/>
@@ -92,7 +91,6 @@
                <pathelement 
location="test/event_system_properties/TestEventSystemProperties.xml"/>
                <pathelement 
location="test/prefix_events/TestPrefixEvents.xml"/>
                <pathelement location="test/parallel/TestParallel.xml"/>
-               -->
                <pathelement 
location="test/targetless-transition/TestTargetlessTransition.xml"/>
        </path>
 

Modified: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl?rev=1082558&r1=1082557&r2=1082558&view=diff
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl
 (original)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl
 Thu Mar 17 16:17:40 2011
@@ -30,6 +30,7 @@ collision. 
 
        <c:dependencies>
                <c:dependency path="ir-compiler/computeLCA.xsl"/>
+               <c:dependency 
path="ir-compiler/positionTransitionsAfterSubstates.xsl"/>
        </c:dependencies>
 
        <!-- identity transform -->

Added: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/positionTransitionsAfterSubstates.xsl
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/positionTransitionsAfterSubstates.xsl?rev=1082558&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/positionTransitionsAfterSubstates.xsl
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/positionTransitionsAfterSubstates.xsl
 Thu Mar 17 16:17:40 2011
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!--
+This stylesheet moves transitions after substates. This is needed
+later for the flattening algorithm because node-sets are kept in 
+document order.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
+       xmlns:s="http://www.w3.org/2005/07/scxml";
+       xmlns="http://www.w3.org/2005/07/scxml";
+       xmlns:c="http://commons.apache.org/scxml-js";
+       version="1.0">
+       <xsl:output method="xml"/>
+
+       <!-- identity transform -->
+       <xsl:template match="@*|node()">
+               <xsl:copy>
+                       <xsl:apply-templates select="@*|node()"/>
+               </xsl:copy>
+       </xsl:template>
+
+
+       <!-- non-basic states -->
+       <xsl:template match="s:scxml | 
+                               *[(self::s:state or self::s:parallel) and
+                                       .//*[(self::s:state or self::s:parallel 
or self::s:final or self::s:initial or self::s:history)]]">
+
+               <xsl:copy>
+                       <xsl:apply-templates select="@*"/>
+
+                       <xsl:apply-templates 
select="node()[not(self::s:transition)]"/>
+
+                       <xsl:apply-templates select="s:transition"/>
+               </xsl:copy>
+       </xsl:template>
+
+</xsl:stylesheet>
+
+
+

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


Reply via email to