commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r661083 - in /commons/proper/scxml/branches/J6/src: main/java/org/apache/commons/scxml/io/ test/java/org/apache/commons/scxml/ test/java/org/apache/commons/scxml/env/jexl/ test/java/org/apache/commons/scxml/env/jsp/ test/java/org/apache/com...
Date Wed, 28 May 2008 21:04:57 GMT
Author: rahul
Date: Wed May 28 14:04:56 2008
New Revision: 661083

URL: http://svn.apache.org/viewvc?rev=661083&view=rev
Log:
Removed deprecated class SCXMLDigester.
 * Removed its corresponding test suite.
 * Updated tests to use the newer SCXMLParser class.
 * Some test SCXML documents show bigger diffs than strictly necessary due to indentation changes (since these are test artifacts, thats OK IMO)

Removed:
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java
Modified:
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLHelperTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/WizardsTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-03.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-03.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/stateless-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wildcard-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-03.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/jsp-rootctx-test.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-02.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/stateless-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/IOTestSuite.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/PathTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/stateless-parallel-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/semantics/TransitionTargetComparatorTest.java
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/tie-breaker-05.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-01.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-02.xml
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-03.xml

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLHelperTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLHelperTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLHelperTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLHelperTest.java Wed May 28 14:04:56 2008
@@ -147,8 +147,8 @@
         State state2 = new State();
         state2.setId("2");
         
-        parent.addChild(state1);
-        parent.addChild(state2);
+        parent.addChild((TransitionTarget) state1);
+        parent.addChild((TransitionTarget) state2);
         
         parallel.setParent(parent);
         

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java Wed May 28 14:04:56 2008
@@ -35,7 +35,6 @@
 import org.apache.commons.scxml.env.SimpleDispatcher;
 import org.apache.commons.scxml.env.Tracer;
 import org.apache.commons.scxml.env.jexl.JexlEvaluator;
-import org.apache.commons.scxml.io.SCXMLDigester;
 import org.apache.commons.scxml.io.SCXMLParser;
 import org.apache.commons.scxml.model.CustomAction;
 import org.apache.commons.scxml.model.SCXML;
@@ -56,36 +55,6 @@
         SERIALIZATION_DIR + "/scxml";
     public static final String SERIALIZATION_FILE_SUFFIX = ".ser";
 
-    public static SCXML digest(final URL url) {
-        return digest(url, null, null);
-    }
-
-    public static SCXML digest(final URL url, final List<CustomAction> customActions) {
-        return digest(url, null, customActions);
-    }
-
-    public static SCXML digest(final URL url, final ErrorHandler errHandler) {
-        return digest(url, errHandler, null);
-    }
-
-    public static SCXML digest(final URL url, final ErrorHandler errHandler,
-            final List<CustomAction> customActions) {
-        Assert.assertNotNull(url);
-        // SAX ErrorHandler may be null
-        SCXML scxml = null;
-        try {
-            scxml = SCXMLDigester.digest(url, errHandler, customActions);
-        } catch (Exception e) {
-            Log log = LogFactory.getLog(SCXMLTestHelper.class);
-            log.error(e.getMessage(), e);
-            Assert.fail(e.getMessage());
-        }
-        Assert.assertNotNull(scxml);
-        SCXML roundtrip = testModelSerializability(scxml);
-        Assert.assertNotNull(roundtrip);
-        return roundtrip;
-    }
-
     public static SCXML parse(final URL url) {
         return parse(url, null, null);
     }
@@ -116,20 +85,20 @@
     }
 
     public static SCXMLExecutor getExecutor(final URL url) {
-        SCXML scxml = digest(url);
+        SCXML scxml = parse(url);
         Evaluator evaluator = new JexlEvaluator();
         return getExecutor(evaluator, scxml);
     }
 
     public static SCXMLExecutor getExecutor(final URL url,
             final Evaluator evaluator) {
-        SCXML scxml = digest(url);
+        SCXML scxml = parse(url);
         return getExecutor(evaluator, scxml);
     }
 
     public static SCXMLExecutor getExecutor(final URL url,
             final ErrorHandler errHandler) {
-        SCXML scxml = digest(url, errHandler);
+        SCXML scxml = parse(url, errHandler);
         Evaluator evaluator = new JexlEvaluator();
         return getExecutor(evaluator, scxml);
     }
@@ -157,7 +126,7 @@
 
     public static SCXMLExecutor getExecutor(final URL url, final Context ctx,
             final Evaluator evaluator) {
-        SCXML scxml = digest(url);
+        SCXML scxml = parse(url);
         EventDispatcher ed = new SimpleDispatcher();
         Tracer trc = new Tracer();
         return getExecutor(ctx, evaluator, scxml, ed, trc);

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/WizardsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/WizardsTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/WizardsTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/WizardsTest.java Wed May 28 14:04:56 2008
@@ -102,7 +102,7 @@
     }
 
     public void testWizard02Sample() {
-        SCXML scxml = SCXMLTestHelper.digest(wizard02);
+        SCXML scxml = SCXMLTestHelper.parse(wizard02);
         exec = SCXMLTestHelper.getExecutor(new JexlContext(),
             new JexlEvaluator(), scxml, new TestEventDispatcher(),
             new Tracer());

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-03.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-03.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-03.xml Wed May 28 14:04:56 2008
@@ -21,6 +21,7 @@
      Also serves as testing the underlying functionality of the
      underlying parsing technology (here, Digester 1.8) -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="ten">
 
@@ -61,7 +62,7 @@
         </datamodel>
 
         <onentry>
-            <var xmlns:pre1="scheme://namespace.test.domain/1"
+            <cs:var xmlns:pre1="scheme://namespace.test.domain/1"
                  xmlns:pre2="scheme://namespace.test.domain/2"
                  xmlns:pre3="scheme://namespace.test.domain/3"
                  name="tentest"

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-03.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-03.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/eventdata-03.xml Wed May 28 14:04:56 2008
@@ -16,8 +16,9 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
-      version="1.0"
-      initialstate="ten">
+       xmlns:cs="http://commons.apache.org/scxml"
+       version="1.0"
+       initialstate="ten">
 
     <datamodel>
         <data name="rootdata">
@@ -34,8 +35,8 @@
 
     <state id="twenty">
         <onentry>
-            <var name="one" expr="Data(rootdata,'root/one')"/>
-            <var name="two" expr="Data(rootdata,'root/two')"/>
+            <cs:var name="one" expr="Data(rootdata,'root/one')"/>
+            <cs:var name="two" expr="Data(rootdata,'root/two')"/>
             <send event="event.bar" namelist="one two"/>
         </onentry>
         <transition event="event.bar"

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml Wed May 28 14:04:56 2008
@@ -19,6 +19,7 @@
    This document uses Commons JEXL as the expressions language.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="off">
   
@@ -38,15 +39,15 @@
       <!-- we assume the cook_time is passed in as a context parameter -->
       <if cond="empty(cook_time)">
         <!-- default setting -->
-        <var name="cook_time" expr="5"/>
+        <cs:var name="cook_time" expr="5"/>
       </if>
       <!-- again, door_closed should be a part of a global context -->
       <if cond="empty(door_closed)">
         <!-- default setting -->
-        <var name="door_closed" expr="true"/>
+        <cs:var name="door_closed" expr="true"/>
       </if>
       <!-- timer variable -->
-      <var name="timer" expr="0"/>
+      <cs:var name="timer" expr="0"/>
     </onentry>
 
     <transition event="turn_off" target="off"/>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml Wed May 28 14:04:56 2008
@@ -19,69 +19,68 @@
    This document uses Commons JEXL as the expressions language.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       xmlns:cs="http://commons.apache.org/scxml"
        initialstate="microwave"> 
 
   <!--  trivial microwave oven example -->
   <!-- using parallel and In() predicate -->
 
-  <state id="microwave">
-    <parallel id="parts">
-      <state id="oven">
+  <parallel id="microwave">
+    <state id="oven">
+      <initial>
+        <transition target="off"/>
+      </initial>
+
+      <state id="off">
+        <!-- off state -->
+        <transition event="turn_on" target="on"/>
+      </state>
+      
+      <state id="on">
         <initial>
-          <transition target="off"/>
+          <transition target="idle"/>
         </initial>
 
-        <state id="off">
-          <!-- off state -->
-          <transition event="turn_on" target="on"/>
+        <!-- on/pause state -->
+        <onentry>
+          <!-- we assume the cook_time is passed in as a context parameter -->
+          <if cond="empty(cook_time)">
+            <!-- default setting -->
+            <cs:var name="cook_time" expr="5"/>
+          </if>
+          <!-- timer variable -->
+          <cs:var name="timer" expr="0"/>
+        </onentry>
+        
+        <transition event="turn_off" target="off"/>
+
+        <transition cond="timer ge cook_time" target="off"/>
+        
+        <state id="idle">
+          <transition cond="In('closed')" target="cooking"/>
         </state>
         
-        <state id="on">
-          <initial>
-            <transition target="idle"/>
-          </initial>
-
-          <!-- on/pause state -->
-          <onentry>
-            <!-- we assume the cook_time is passed in as a context parameter -->
-            <if cond="empty(cook_time)">
-              <!-- default setting -->
-              <var name="cook_time" expr="5"/>
-            </if>
-            <!-- timer variable -->
-            <var name="timer" expr="0"/>
-          </onentry>
-          
-          <transition event="turn_off" target="off"/>
-
-          <transition cond="timer ge cook_time" target="off"/>
-          
-          <state id="idle">
-            <transition cond="In('closed')" target="cooking"/>
-          </state>
-          
-          <state id="cooking">
-            <transition cond="not In('closed')" target="idle"/>
-
-            <transition event="time" target="cooking">
-              <assign name="timer" expr="timer + 1"/>
-            </transition>
-          </state>
+        <state id="cooking">
+          <transition cond="not In('closed')" target="idle"/>
+
+          <transition event="time" target="cooking">
+            <assign name="timer" expr="timer + 1"/>
+          </transition>
         </state>
       </state>
+    </state>
 
-      <state id="door">
-        <initial>
-          <transition target="closed"/>
-        </initial>
-        <state id="closed">
-          <transition event="door_open" target="open"/>
-        </state>
-        <state id="open">
-          <transition event="door_close" target="closed"/>
-        </state>
+    <state id="door">
+      <initial>
+        <transition target="closed"/>
+      </initial>
+      <state id="closed">
+        <transition event="door_open" target="open"/>
+      </state>
+      <state id="open">
+        <transition event="door_close" target="closed"/>
       </state>
-    </parallel>
-  </state>
+    </state>
+  </parallel>
 
 </scxml>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/stateless-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/stateless-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/stateless-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/stateless-01.xml Wed May 28 14:04:56 2008
@@ -16,6 +16,7 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="main">
 
@@ -26,7 +27,7 @@
         </initial>
 
         <onentry>
-            <var name="instancevar" expr="20" />
+            <cs:var name="instancevar" expr="20" />
         </onentry>
 
         <state id="ten">

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wildcard-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wildcard-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wildcard-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wildcard-01.xml Wed May 28 14:04:56 2008
@@ -16,11 +16,12 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
-      version="1.0"
-      initialstate="state1">
+       xmlns:cs="http://commons.apache.org/scxml"
+       version="1.0"
+       initialstate="state1">
      <state id="state1">
            <onentry>
-               <var name="switch" expr="4" />
+               <cs:var name="switch" expr="4" />
            </onentry>
            <!-- We'll trigger 'foo.bar.baz' event,
                 and therefore, must end up in state4 -->

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jexl/wizard-02.xml Wed May 28 14:04:56 2008
@@ -16,8 +16,9 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
-      version="1.0"
-      initialstate="state1">
+       xmlns:cs="http://commons.apache.org/scxml"
+       version="1.0"
+       initialstate="state1">
      <state id="state1">
            <onentry>
                  <!-- Send without a targettype causes the
@@ -32,7 +33,7 @@
      </state>
      <state id="state2">
            <onentry>
-                 <var name="aValue" expr="2"/>
+                 <cs:var name="aValue" expr="2"/>
                  <!-- Send with a non-empty (and not "scxml")
                       targettype causes the callback on the
                       EventDispatcher implementation. See
@@ -46,7 +47,7 @@
      </state>
      <state id="state3">
            <onentry>
-                 <var name="aValue" expr="3"/>
+                 <cs:var name="aValue" expr="3"/>
                  <send namelist="aValue" targettype="'foo'" />
            </onentry>
            <transition event="event1" target="state1"/>
@@ -55,7 +56,7 @@
      </state>
      <state id="state4">
            <onentry>
-                 <var name="aValue" expr="4"/>
+                 <cs:var name="aValue" expr="4"/>
                  <send namelist="aValue" targettype="'foo'" />
            </onentry>
            <transition event="event1" target="state1"/>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-03.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-03.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-03.xml Wed May 28 14:04:56 2008
@@ -21,6 +21,7 @@
      Also serves as testing the underlying functionality of the
      underlying parsing technology (here, Digester 1.8) -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="ten">
 
@@ -61,7 +62,7 @@
         </datamodel>
 
         <onentry>
-            <var xmlns:pre1="scheme://namespace.test.domain/1"
+            <cs:var xmlns:pre1="scheme://namespace.test.domain/1"
                  xmlns:pre2="scheme://namespace.test.domain/2"
                  xmlns:pre3="scheme://namespace.test.domain/3"
                  name="tentest"

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/jsp-rootctx-test.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/jsp-rootctx-test.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/jsp-rootctx-test.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/jsp-rootctx-test.xml Wed May 28 14:04:56 2008
@@ -16,6 +16,7 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="rootCtxTest">
   
@@ -23,7 +24,7 @@
     <onentry>
       <!-- 'foo' must exist in host JSP context -->
       <assign name="foo" expr="${foo+1}" />
-      <var name="bar" expr="a brand new value" />
+      <cs:var name="bar" expr="a brand new value" />
     </onentry>
   </state>
 

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml Wed May 28 14:04:56 2008
@@ -19,6 +19,7 @@
    This document uses JSP 2.0 EL as the expressions language.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="off">
   
@@ -38,15 +39,15 @@
       <!-- we assume the cook_time is passed in as a context parameter -->
       <if cond="${empty cook_time}">
         <!-- default setting -->
-        <var name="cook_time" expr="${5}"/>
+        <cs:var name="cook_time" expr="${5}"/>
       </if>
       <!-- again, door_closed should be a part of a global context -->
       <if cond="${empty door_closed}">
         <!-- default setting -->
-        <var name="door_closed" expr="${true}"/>
+        <cs:var name="door_closed" expr="${true}"/>
       </if>
       <!-- timer variable -->
-      <var name="timer" expr="${0}"/>
+      <cs:var name="timer" expr="${0}"/>
     </onentry>
 
     <transition event="turn_off" target="off"/>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-02.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-02.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/microwave-02.xml Wed May 28 14:04:56 2008
@@ -19,69 +19,68 @@
    This document uses JSP 2.0 EL as the expressions language.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       xmlns:cs="http://commons.apache.org/scxml"
        initialstate="microwave"> 
 
   <!--  trivial microwave oven example -->
   <!-- using parallel and In() predicate -->
 
-  <state id="microwave">
-    <parallel id="parts">
-      <state id="oven">
+  <parallel id="microwave">
+    <state id="oven">
+      <initial>
+        <transition target="off"/>
+      </initial>
+
+      <state id="off">
+        <!-- off state -->
+        <transition event="turn_on" target="on"/>
+      </state>
+      
+      <state id="on">
         <initial>
-          <transition target="off"/>
+          <transition target="idle"/>
         </initial>
 
-        <state id="off">
-          <!-- off state -->
-          <transition event="turn_on" target="on"/>
+        <!-- on/pause state -->
+        <onentry>
+          <!-- we assume the cook_time is passed in as a context parameter -->
+          <if cond="${empty cook_time}">
+            <!-- default setting -->
+            <cs:var name="cook_time" expr="${5}"/>
+          </if>
+          <!-- timer variable -->
+          <cs:var name="timer" expr="${0}"/>
+        </onentry>
+        
+        <transition event="turn_off" target="off"/>
+
+        <transition cond="${timer ge cook_time}" target="off"/>
+        
+        <state id="idle">
+          <transition cond="${In('closed')}" target="cooking"/>
         </state>
         
-        <state id="on">
-          <initial>
-            <transition target="idle"/>
-          </initial>
-
-          <!-- on/pause state -->
-          <onentry>
-            <!-- we assume the cook_time is passed in as a context parameter -->
-            <if cond="${empty cook_time}">
-              <!-- default setting -->
-              <var name="cook_time" expr="${5}"/>
-            </if>
-            <!-- timer variable -->
-            <var name="timer" expr="${0}"/>
-          </onentry>
-          
-          <transition event="turn_off" target="off"/>
-
-          <transition cond="${timer ge cook_time}" target="off"/>
-          
-          <state id="idle">
-            <transition cond="${In('closed')}" target="cooking"/>
-          </state>
-          
-          <state id="cooking">
-            <transition cond="${not In('closed')}" target="idle"/>
-
-            <transition event="time" target="cooking">
-              <assign name="timer" expr="${timer + 1}"/>
-            </transition>
-          </state>
+        <state id="cooking">
+          <transition cond="${not In('closed')}" target="idle"/>
+
+          <transition event="time" target="cooking">
+            <assign name="timer" expr="${timer + 1}"/>
+          </transition>
         </state>
       </state>
+    </state>
 
-      <state id="door">
-        <initial>
-          <transition target="closed"/>
-        </initial>
-        <state id="closed">
-          <transition event="door_open" target="open"/>
-        </state>
-        <state id="open">
-          <transition event="door_close" target="closed"/>
-        </state>
+    <state id="door">
+      <initial>
+        <transition target="closed"/>
+      </initial>
+      <state id="closed">
+        <transition event="door_open" target="open"/>
+      </state>
+      <state id="open">
+        <transition event="door_close" target="closed"/>
       </state>
-    </parallel>
-  </state>
+    </state>
+  </parallel>
 
 </scxml>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/stateless-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/stateless-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/stateless-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/jsp/stateless-01.xml Wed May 28 14:04:56 2008
@@ -16,6 +16,7 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="main">
 
@@ -26,7 +27,7 @@
         </initial>
 
         <onentry>
-            <var name="instancevar" expr="${20}" />
+            <cs:var name="instancevar" expr="${20}" />
         </onentry>
 
         <state id="ten">

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/IOTestSuite.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/IOTestSuite.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/IOTestSuite.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/IOTestSuite.java Wed May 28 14:04:56 2008
@@ -48,7 +48,6 @@
     public static Test suite() {
         TestSuite suite = new TestSuite();
         suite.setName("Commons-SCXML IO Tests");
-        suite.addTest(SCXMLDigesterTest.suite());
         suite.addTest(SCXMLParserTest.suite());
         suite.addTest(SCXMLSerializerTest.suite());
         suite.addTest(StateSrcTest.suite());

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java Wed May 28 14:04:56 2008
@@ -17,6 +17,7 @@
 package org.apache.commons.scxml.io;
 
 import java.net.URL;
+import java.util.List;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -24,7 +25,11 @@
 import junit.textui.TestRunner;
 
 import org.apache.commons.scxml.SCXMLTestHelper;
+import org.apache.commons.scxml.model.Action;
 import org.apache.commons.scxml.model.SCXML;
+import org.apache.commons.scxml.model.Send;
+import org.apache.commons.scxml.model.State;
+import org.apache.commons.scxml.model.Transition;
 /**
  * Unit tests {@link org.apache.commons.scxml.SCXMLParser}.
  */
@@ -44,7 +49,8 @@
     }
 
     // Test data
-    private URL microwave03, microwave04;
+    private URL microwave01, microwave02, transitions01, prefix01, send01,
+        microwave03, microwave04;
     private SCXML scxml;
     private String scxmlAsString;
 
@@ -52,17 +58,27 @@
      * Set up instance variables required by this test case.
      */
     public void setUp() {
+        microwave01 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/env/jsp/microwave-01.xml");
+        microwave02 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/env/jsp/microwave-02.xml");
         microwave03 = this.getClass().getClassLoader().
             getResource("org/apache/commons/scxml/env/jexl/microwave-03.xml");
         microwave04 = this.getClass().getClassLoader().
             getResource("org/apache/commons/scxml/env/jexl/microwave-04.xml");
+        transitions01 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/transitions-01.xml");
+        send01 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/send-01.xml");
+        prefix01 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/prefix-01.xml");
     }
 
     /**
      * Tear down instance variables required by this test case.
      */
     public void tearDown() {
-        microwave03 = microwave04 = null;
+        microwave01 = microwave02 = microwave03 = microwave04 = transitions01 = prefix01 = send01 = null;
         scxml = null;
         scxmlAsString = null;
     }
@@ -70,6 +86,20 @@
     /**
      * Test the implementation
      */
+    public void testSCXMLDigesterMicrowave01Sample() {
+        scxml = SCXMLTestHelper.parse(microwave01);
+        assertNotNull(scxml);
+        scxmlAsString = serialize(scxml);
+        assertNotNull(scxmlAsString);
+    }
+
+    public void testSCXMLDigesterMicrowave02Sample() {
+        scxml = SCXMLTestHelper.parse(microwave02);
+        assertNotNull(scxml);
+        scxmlAsString = serialize(scxml);
+        assertNotNull(scxmlAsString);
+    }
+
     public void testSCXMLParserMicrowave03Sample() {
         scxml = SCXMLTestHelper.parse(microwave03);
         assertNotNull(scxml);
@@ -84,14 +114,52 @@
         assertNotNull(scxmlAsString);
     }
 
+    public void testSCXMLDigesterTransitions01Sample() {
+        scxml = SCXMLTestHelper.parse(transitions01);
+        assertNotNull(scxml);
+        scxmlAsString = serialize(scxml);
+        assertNotNull(scxmlAsString);
+    }
+
+    public void testSCXMLDigesterPrefix01Sample() {
+        scxml = SCXMLTestHelper.parse(prefix01);
+        assertNotNull(scxml);
+        scxmlAsString = serialize(scxml);
+        assertNotNull(scxmlAsString);
+    }
+
+    public void testSCXMLDigesterSend01Sample() {
+        // Digest
+        scxml = SCXMLTestHelper.parse(send01);
+        State ten = (State) scxml.getInitialTarget();
+        assertEquals("ten", ten.getId());
+        List<Transition> ten_done = ten.getTransitionsList("ten.done");
+        assertEquals(1, ten_done.size());
+        Transition ten2twenty = (Transition) ten_done.get(0);
+        List<Action> actions = ten2twenty.getActions();
+        assertEquals(1, actions.size());
+        Send send = (Send) actions.get(0);
+        assertEquals("send1", send.getSendid());
+        /* Serialize
+        scxmlAsString = serialize(scxml);
+        assertNotNull(scxmlAsString);
+        String expectedFoo2Serialization =
+            "<foo xmlns=\"http://my.test.namespace\" id=\"foo2\">"
+            + "<prompt xmlns=\"http://foo.bar.com/vxml3\">This is just"
+            + " an example.</prompt></foo>";
+        assertFalse(scxmlAsString.indexOf(expectedFoo2Serialization) == -1);
+        */
+    }
+
     private String serialize(final SCXML scxml) {
         scxmlAsString = SCXMLSerializer.serialize(scxml);
         assertNotNull(scxmlAsString);
         return scxmlAsString;
     }
 
-     public static void main(String args[]) {
+    public static void main(String args[]) {
         TestRunner.run(suite());
     }
+
 }
 

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java Wed May 28 14:04:56 2008
@@ -73,7 +73,7 @@
      * Test the implementation
      */
     public void testRecursiveSrcInclude() {
-        scxml = SCXMLTestHelper.digest(src01);
+        scxml = SCXMLTestHelper.parse(src01);
         assertNotNull(scxml);
         exec = SCXMLTestHelper.getExecutor(scxml);
         assertNotNull(exec);

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java Wed May 28 14:04:56 2008
@@ -155,7 +155,7 @@
         customActions.add(ca1);
         customActions.add(ca2);
         // (2) Parse the document with a custom digester.
-        SCXML scxml = SCXMLTestHelper.digest(custom01, customActions);
+        SCXML scxml = SCXMLTestHelper.parse(custom01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
         // (4) Single, final state
@@ -175,7 +175,7 @@
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
-        SCXML scxml = SCXMLTestHelper.digest(external01, customActions);
+        SCXML scxml = SCXMLTestHelper.parse(external01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
         // (4) Single, final state
@@ -193,7 +193,7 @@
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
-        SCXML scxml = SCXMLTestHelper.digest(override01, customActions);
+        SCXML scxml = SCXMLTestHelper.parse(override01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
         // (4) Single, final state
@@ -218,7 +218,7 @@
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
-        SCXML scxml = SCXMLTestHelper.digest(payload01, customActions);
+        SCXML scxml = SCXMLTestHelper.parse(payload01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
         // (4) Single, final state
@@ -250,7 +250,7 @@
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
-        SCXML scxml = SCXMLTestHelper.digest(payload02, customActions);
+        SCXML scxml = SCXMLTestHelper.parse(payload02, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(new ELEvaluator(), scxml);
         // (4) Single, final state

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/PathTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/PathTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/PathTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/PathTest.java Wed May 28 14:04:56 2008
@@ -38,13 +38,13 @@
     public void testConstructorNull() {
         Path path = new Path(null, null);
         
-        assertNull(path.getScope());
+        assertNull(path.getPathScope());
     }
 
     public void testConstructorNullState() {
         Path path = new Path(new State(), null);
         
-        assertTrue(path.getScope() instanceof State);
+        assertTrue(path.getPathScope() instanceof State);
     }
 
     public void testConstructorStates() {
@@ -56,7 +56,7 @@
         
         Path path = new Path(source, target);
         
-        assertNull(path.getScope());
+        assertNull(path.getPathScope());
         assertEquals(1, path.getUpwardSegment().size());
         assertEquals("1", ((State)path.getUpwardSegment().get(0)).getId());
 
@@ -107,7 +107,7 @@
 
         Path path = new Path(source, target);
 
-        assertNull(path.getScope());
+        assertNull(path.getPathScope());
     }
 
     public void testConstructorParentSource() {
@@ -121,7 +121,7 @@
 
         Path path = new Path(source, target);
 
-        assertNull(path.getScope());
+        assertNull(path.getPathScope());
     }
     
     public void testConstructorParent() {
@@ -139,7 +139,7 @@
 
         Path path = new Path(source, target);
 
-        assertEquals("parentid", path.getScope().getId());
+        assertEquals("parentid", path.getPathScope().getId());
     }
     
     public void testConstructorParentParallel() {
@@ -157,7 +157,7 @@
 
         Path path = new Path(source, target);
 
-        assertNull(path.getScope());
+        assertEquals("parentid", path.getPathScope().getId());
     }
     
     public void testConstructorParentParallelParent() {
@@ -180,7 +180,7 @@
 
         Path path = new Path(source, target);
 
-        assertEquals("superParent", path.getScope().getId());
+        assertEquals("parentid", path.getPathScope().getId());
     }
     
     public void testGetRegionsExitedNull() {

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/StatelessModelTest.java Wed May 28 14:04:56 2008
@@ -28,6 +28,7 @@
 import org.apache.commons.scxml.SCXMLExecutor;
 import org.apache.commons.scxml.SCXMLTestHelper;
 import org.apache.commons.scxml.TriggerEvent;
+import org.apache.commons.scxml.env.SimpleSCXMLListener;
 import org.apache.commons.scxml.env.jsp.ELContext;
 import org.apache.commons.scxml.env.jsp.ELEvaluator;
 /**
@@ -63,10 +64,10 @@
             getResource("org/apache/commons/scxml/env/jsp/stateless-01.xml");
         stateless01par = this.getClass().getClassLoader().
             getResource("org/apache/commons/scxml/model/stateless-parallel-01.xml");
-        scxml01jexl = SCXMLTestHelper.digest(stateless01jexl);
-        scxml01jsp = SCXMLTestHelper.digest(stateless01jsp);
-        scxml01par = SCXMLTestHelper.digest(stateless01par);
-        scxml02par = SCXMLTestHelper.digest(stateless01par);
+        scxml01jexl = SCXMLTestHelper.parse(stateless01jexl);
+        scxml01jsp = SCXMLTestHelper.parse(stateless01jsp);
+        scxml01par = SCXMLTestHelper.parse(stateless01par);
+        scxml02par = SCXMLTestHelper.parse(stateless01par);
     }
 
     /**
@@ -172,6 +173,7 @@
         currentStates = fireEvent("state1.event", exec01);
         checkParallelStates(currentStates, "state1.final", "state2.init", "exec01");
         exec01.setStateMachine(scxml02par);
+        exec01.addListener(scxml02par, new SimpleSCXMLListener());
 
         currentStates = fireEvent("state2.event", exec01);
         checkParallelStates(currentStates, "next", null, "exec01");

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/stateless-parallel-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/stateless-parallel-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/stateless-parallel-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/model/stateless-parallel-01.xml Wed May 28 14:04:56 2008
@@ -19,35 +19,31 @@
        version="1.0"
        initialstate="main">
 
-    <state id="main">
+    <parallel id="main">
 
-        <parallel id="main.parallel">
-
-            <state id="state1">
-                <initial>
-                    <transition target="state1.init"/>
-                </initial>
-                <state id="state1.init">
-                    <transition event="state1.event" target="state1.final" />
-                </state>
-                <state id="state1.final" final="true" />
+        <state id="state1">
+            <initial>
+                <transition target="state1.init"/>
+            </initial>
+            <state id="state1.init">
+                <transition event="state1.event" target="state1.final" />
             </state>
+            <state id="state1.final" final="true" />
+        </state>
 
-            <state id="state2">
-                <initial>
-                    <transition target="state2.init"/>
-                </initial>
-                <state id="state2.init">
-                    <transition event="state2.event" target="state2.final" />
-                </state>
-                <state id="state2.final" final="true" />
+        <state id="state2">
+            <initial>
+                <transition target="state2.init"/>
+            </initial>
+            <state id="state2.init">
+                <transition event="state2.event" target="state2.final" />
             </state>
+            <state id="state2.final" final="true" />
+        </state>
 
-        </parallel>
-
-        <transition event="main.parallel.done" target="next" />
+        <transition event="main.done" target="next" />
 
-    </state>
+    </parallel>
 
     <state id="next" final="true"/>
 

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/semantics/TransitionTargetComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/semantics/TransitionTargetComparatorTest.java?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/semantics/TransitionTargetComparatorTest.java (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/semantics/TransitionTargetComparatorTest.java Wed May 28 14:04:56 2008
@@ -107,11 +107,11 @@
         State target1 = new State();
         Parallel parent = new Parallel();
         target1.setParent(parent);
-        parent.addChild(target1);
+        parent.addChild((TransitionTarget) target1);
         
         State target2 = new State();
         target2.setParent(parent);
-        parent.addChild(target2);
+        parent.addChild((TransitionTarget) target2);
         
         assertEquals(1, comparator.compare(target1, target2));
     }

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/tie-breaker-05.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/tie-breaker-05.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/tie-breaker-05.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/tie-breaker-05.xml Wed May 28 14:04:56 2008
@@ -22,47 +22,43 @@
   {s11,s2111,s212} -event1-> {s12,s2112,s212}
 -->
 
-    <state id="main">
-        <parallel id="para"> <!-- Outer parallel -->
+    <parallel id="main"> <!-- Outer parallel -->
 
-            <state id="s1">
-                <initial>
-                    <transition target="s11"/>
-                </initial>
-                <state id="s11">
-                    <transition event="event1" target="s12"/>
-                    <transition event="event1" target="s13"/>
-                </state>
-                <state id="s12"/>
-                <state id="s13"/>
+        <state id="s1">
+            <initial>
+                <transition target="s11"/>
+            </initial>
+            <state id="s11">
+                <transition event="event1" target="s12"/>
+                <transition event="event1" target="s13"/>
             </state>
-
-            <state id="s2">
-                <initial>
-                    <transition target="s21"/>
-                </initial>
-                <state id="s21">
-
-                    <parallel id="para1"> <!-- Inner parallel -->
-                        <state id="s211">
-                            <initial>
-                                <transition target="s2111"/>
-                            </initial>
-                            <state id="s2111">
-                                <transition event="event1" target="s2112"/>
-                                <transition event="event1" target="s2113"/>
-                            </state>
-                            <state id="s2112"/>
-                            <state id="s2113"/>
-                        </state>
-                        <state id="s212"/>                                          
-                    </parallel>
-
+            <state id="s12"/>
+            <state id="s13"/>
+        </state>
+
+        <state id="s2">
+            <initial>
+                <transition target="s21"/>
+            </initial>
+
+            <parallel id="s21"> <!-- Inner parallel -->
+                <state id="s211">
+                    <initial>
+                        <transition target="s2111"/>
+                    </initial>
+                    <state id="s2111">
+                        <transition event="event1" target="s2112"/>
+                        <transition event="event1" target="s2113"/>
+                    </state>
+                    <state id="s2112"/>
+                    <state id="s2113"/>
                 </state>
-                <state id="s22"/>
-            </state>
+                <state id="s212"/>                                          
+            </parallel>
+
+            <state id="s22"/>
+        </state>
 
-        </parallel>
-    </state>
+    </parallel>
 
 </scxml>

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-01.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-01.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-01.xml Wed May 28 14:04:56 2008
@@ -46,92 +46,88 @@
     </state>
 
     <!-- Finally, try an orthogonal state -->
-    <state id="thirty">
+    <parallel id="thirty">
 
-        <parallel id="thirties_parallel">
+        <!-- The first (of three) regions in thirties_parallel -->
+        <state id="thirty_one">
 
-            <!-- The first (of three) regions in thirties_parallel -->
-            <state id="thirty_one">
+            <initial>
+                <transition target="thirty_one_child_one"/>
+            </initial>
+            <onentry>
+                <log expr="'Entering thirty_one'" />
+            </onentry>
+            <transition event="thirty_one.done" target="forty"/>
+
+            <state id="thirty_one_child_one">
+                <onexit>
+                    <log expr="'Exiting thirty_one_child_one'" />
+                </onexit>
+                <transition event="thirty_one_child_one.done"
+                            target="thirty_one_child_two"/>
+            </state>
+
+            <state id="thirty_one_child_two">
+                <onexit>
+                    <log expr="'Exiting thirty_one_child_two'" />
+                </onexit>
+            </state>
+
+        </state>
 
-                <initial>
-                    <transition target="thirty_one_child_one"/>
-                </initial>
-                <onentry>
-                    <log expr="'Entering thirty_one'" />
-                </onentry>
-                <transition event="thirty_one.done" target="forty"/>
-
-                <state id="thirty_one_child_one">
-                    <onexit>
-                        <log expr="'Exiting thirty_one_child_one'" />
-                    </onexit>
-                    <transition event="thirty_one_child_one.done"
-                                target="thirty_one_child_two"/>
-                </state>
-
-                <state id="thirty_one_child_two">
-                    <onexit>
-                        <log expr="'Exiting thirty_one_child_two'" />
-                    </onexit>
-                </state>
-
-            </state>
-
-            <!-- The second (of three) regions in thirties_parallel -->
-            <state id="thirty_two">
-
-                <initial>
-                    <transition target="thirty_two_child_one"/>
-                </initial>
-                <onentry>
-                    <log expr="'Entering thirty_two'" />
-                </onentry>
-
-                <state id="thirty_two_child_one">
-                    <onexit>
-                        <log expr="'Exiting thirty_two_child_one'" />
-                    </onexit>
-                    <transition event="thirty_two_child_one.done"
-                                target="thirty_two_child_two"/>
-                </state>
-
-                <state id="thirty_two_child_two">
-                    <onexit>
-                        <log expr="'Exiting thirty_two_child_two'" />
-                    </onexit>
-                </state>
-
-            </state>
-
-            <!-- The third (of three) regions in thirties_parallel -->
-            <state id="thirty_three">
-
-                <initial>
-                    <transition target="thirty_three_child_one"/>
-                </initial>
-                <onentry>
-                    <log expr="'Entering thirty_three'" />
-                </onentry>
-
-                <state id="thirty_three_child_one">
-                    <onexit>
-                        <log expr="'Exiting thirty_three_child_one'" />
-                    </onexit>
-                    <transition event="thirty_three_child_one.done"
-                                target="thirty_three_child_two"/>
-                </state>
-
-                <state id="thirty_three_child_two">
-                    <onexit>
-                        <log expr="'Exiting thirty_three_child_two'" />
-                    </onexit>
-                </state>
+        <!-- The second (of three) regions in thirties_parallel -->
+        <state id="thirty_two">
 
+            <initial>
+                <transition target="thirty_two_child_one"/>
+            </initial>
+            <onentry>
+                <log expr="'Entering thirty_two'" />
+            </onentry>
+
+            <state id="thirty_two_child_one">
+                <onexit>
+                    <log expr="'Exiting thirty_two_child_one'" />
+                </onexit>
+                <transition event="thirty_two_child_one.done"
+                            target="thirty_two_child_two"/>
             </state>
 
-        </parallel>
+            <state id="thirty_two_child_two">
+                <onexit>
+                    <log expr="'Exiting thirty_two_child_two'" />
+                </onexit>
+            </state>
 
-    </state>
+        </state>
+
+        <!-- The third (of three) regions in thirties_parallel -->
+        <state id="thirty_three">
+
+            <initial>
+                <transition target="thirty_three_child_one"/>
+            </initial>
+            <onentry>
+                <log expr="'Entering thirty_three'" />
+            </onentry>
+
+            <state id="thirty_three_child_one">
+                <onexit>
+                    <log expr="'Exiting thirty_three_child_one'" />
+                </onexit>
+                <transition event="thirty_three_child_one.done"
+                            target="thirty_three_child_two"/>
+            </state>
+
+            <state id="thirty_three_child_two">
+                <onexit>
+                    <log expr="'Exiting thirty_three_child_two'" />
+                </onexit>
+            </state>
+
+        </state>
+
+    </parallel>
 
     <!-- Declare victory -->
     <state id="forty" final="true" />

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-02.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-02.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-02.xml Wed May 28 14:04:56 2008
@@ -16,13 +16,14 @@
  * limitations under the License.
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
+       xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
        initialstate="ten">
 
     <state id="ten">
 
         <onentry>
-            <var name="foo" expr="1" />
+            <cs:var name="foo" expr="1" />
             <log expr="'Foo is:' + foo" />
         </onentry>
 

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-03.xml?rev=661083&r1=661082&r2=661083&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-03.xml (original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/transitions-03.xml Wed May 28 14:04:56 2008
@@ -24,67 +24,63 @@
          target="twenty_one_2 twenty_two_2 twenty_three_2" />
     </state>
 
-    <state id="twenty">
+    <parallel id="twenty">
 
-        <parallel id="twenties_parallel">
+        <state id="twenty_one">
 
-            <state id="twenty_one">
+            <initial>
+                <transition target="twenty_one_1"/>
+            </initial>
 
-                <initial>
-                    <transition target="twenty_one_1"/>
-                </initial>
-
-                <state id="twenty_one_1">
-                    <transition event="foo" target="twenty_one_2"/>
-                </state>
-
-                <state id="twenty_one_2">
-                    <onexit>
-                        <log expr="'Exiting twenty_two_2'" />
-                    </onexit>
-                </state>
+            <state id="twenty_one_1">
+                <transition event="foo" target="twenty_one_2"/>
+            </state>
 
+            <state id="twenty_one_2">
+                <onexit>
+                    <log expr="'Exiting twenty_two_2'" />
+                </onexit>
             </state>
 
-            <state id="twenty_two">
+        </state>
 
-                <initial>
-                    <transition target="twenty_two_1"/>
-                </initial>
+        <state id="twenty_two">
 
-                <state id="twenty_two_1">
-                    <transition event="foo" target="twenty_two_2"/>
-                </state>
+            <initial>
+                <transition target="twenty_two_1"/>
+            </initial>
 
-                <state id="twenty_two_2">
-                    <onexit>
-                        <log expr="'Exiting twenty_two_2'" />
-                    </onexit>
-                </state>
+            <state id="twenty_two_1">
+                <transition event="foo" target="twenty_two_2"/>
+            </state>
 
+            <state id="twenty_two_2">
+                <onexit>
+                    <log expr="'Exiting twenty_two_2'" />
+                </onexit>
             </state>
 
-            <state id="twenty_three">
+        </state>
 
-                <initial>
-                    <transition target="twenty_three_1"/>
-                </initial>
+        <state id="twenty_three">
 
-                <state id="twenty_three_1">
-                    <transition event="foo" target="twenty_three_2"/>
-                </state>
+            <initial>
+                <transition target="twenty_three_1"/>
+            </initial>
 
-                <state id="twenty_three_2">
-                    <onexit>
-                        <log expr="'Exiting twenty_three_2'" />
-                    </onexit>
-                </state>
+            <state id="twenty_three_1">
+                <transition event="foo" target="twenty_three_2"/>
+            </state>
 
+            <state id="twenty_three_2">
+                <onexit>
+                    <log expr="'Exiting twenty_three_2'" />
+                </onexit>
             </state>
 
-        </parallel>
+        </state>
 
-    </state>
+    </parallel>
 
     <state id="thirty" final="true" />
 



Mime
View raw message