You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ra...@apache.org on 2008/04/26 01:48:17 UTC

svn commit: r651742 - in /commons/proper/scxml/trunk/src: main/java/org/apache/commons/scxml/io/ test/java/org/apache/commons/scxml/issues/

Author: rahul
Date: Fri Apr 25 16:48:13 2008
New Revision: 651742

URL: http://svn.apache.org/viewvc?rev=651742&view=rev
Log:
Enhancement request for supporting fragment URLs in <state>'s src attribute.
SCXML-62

Added:
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml   (with props)
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml   (with props)
Modified:
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java?rev=651742&r1=651741&r2=651742&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java Fri Apr 25 16:48:13 2008
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.net.URL;
 import java.text.MessageFormat;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -1419,55 +1420,137 @@
             if (SCXMLHelper.isStringEmpty(src)) {
                 return;
             }
+
+            // 1) Digest the external SCXML file
             Digester digester = getDigester();
             SCXML scxml = (SCXML) digester.peek(digester.getCount() - 1);
-            // 1) Digest the external SCXML file
-            SCXML externalSCXML = null;
+            SCXML parent = root;
+            if (parent == null) {
+                parent = scxml;
+            }
             String path;
-            Digester externalSrcDigester;
+            PathResolver nextpr = null;
             if (pr == null) {
                 path = src;
-                if (root != null) {
-                    externalSrcDigester = newInstance(root, null,
-                        customActions);
-                } else {
-                    externalSrcDigester = newInstance(scxml, null,
-                        customActions);
-                }
             } else {
                 path = pr.resolvePath(src);
-                if (root != null) {
-                    externalSrcDigester = newInstance(root,
-                        pr.getResolver(src), customActions);
-                } else {
-                    externalSrcDigester = newInstance(scxml,
-                        pr.getResolver(src), customActions);
-                }
+                nextpr = pr.getResolver(src);
             }
-
+            String[] fragments = path.split("#", 2);
+            String location = fragments[0];
+            String fragment = null;
+            if (fragments.length > 1) {
+                fragment = fragments[1];
+            }
+            Digester externalSrcDigester;
+            if (fragment != null) {
+                // Cannot pull in all targets just yet, i.e. null parent
+                externalSrcDigester = newInstance(null, nextpr,
+                    customActions);
+            } else {
+                externalSrcDigester = newInstance(parent, nextpr,
+                    customActions);
+            }
+            SCXML externalSCXML = null;
             try {
-                externalSCXML = (SCXML) externalSrcDigester.parse(path);
+                externalSCXML = (SCXML) externalSrcDigester.parse(location);
             } catch (Exception e) {
                 org.apache.commons.logging.Log log = LogFactory.
                     getLog(SCXMLDigester.class);
                 log.error(e.getMessage(), e);
             }
+
             // 2) Adopt the children and datamodel
             if (externalSCXML == null) {
                 return;
             }
             State s = (State) digester.peek();
-            Transition t = new Transition();
-            t.setNext(externalSCXML.getInitialstate());
-            Initial ini = new Initial();
-            ini.setTransition(t);
-            s.setInitial(ini);
-            Map children = externalSCXML.getStates();
-            Object[] ids = children.keySet().toArray();
-            for (int i = 0; i < ids.length; i++) {
-                s.addChild((State) children.get(ids[i]));
+            if (fragment == null) {
+                // All targets pulled in since its not a src fragment
+                Initial ini = new Initial();
+                Transition t = new Transition();
+                t.setNext(externalSCXML.getInitialstate());
+                ini.setTransition(t);
+                s.setInitial(ini);
+                Map children = externalSCXML.getChildren();
+                Iterator childIter = children.values().iterator();
+                while (childIter.hasNext()) {
+                    s.addChild((TransitionTarget) childIter.next());
+                }
+                s.setDatamodel(externalSCXML.getDatamodel());
+            } else {
+                // Need to pull in descendent targets
+                Object source = externalSCXML.getTargets().get(fragment);
+                if (source == null) {
+                    org.apache.commons.logging.Log log = LogFactory.
+                        getLog(SCXMLDigester.class);
+                    log.error("Unknown fragment in <state src=\"" + path +
+                        "\">");
+                    return;
+                }
+                if (source instanceof State) {
+                    State include = (State) source;
+                    s.setOnEntry(include.getOnEntry());
+                    s.setOnExit(include.getOnExit());
+                    s.setDatamodel(include.getDatamodel());
+                    List histories = include.getHistory();
+                    for (int i = 0; i < histories.size(); i++) {
+                        History h = (History) histories.get(i);
+                        s.addHistory(h);
+                        parent.addTarget(h);
+                    }
+                    Iterator childIter = include.getChildren().values().iterator();
+                    while (childIter.hasNext()) {
+                        TransitionTarget tt = (TransitionTarget) childIter.next();
+                        s.addChild(tt);
+                        parent.addTarget(tt);
+                        addTargets(parent, tt);
+                    }
+                    s.setInvoke(include.getInvoke());
+                    s.setFinal(include.isFinal());
+                    if (include.getInitial() != null) {
+                        s.setInitial(include.getInitial());
+                    }
+                    Iterator transIter = include.getTransitionsList().iterator();
+                    while (transIter.hasNext()) {
+                        s.addTransition((Transition) transIter.next());
+                    }
+                } else {
+                    org.apache.commons.logging.Log log = LogFactory.
+                        getLog(SCXMLDigester.class);
+                    log.error("Fragment in <state src=\"" + path +
+                        "\"> is not a <state> or <final>");
+                }
+            }
+        }
+
+        /**
+         * Add all the nested targets from given target to given parent state machine.
+         *
+         * @param parent The state machine
+         * @param tt The transition target to import
+         */
+        private static void addTargets(final SCXML parent, final TransitionTarget tt) {
+            Iterator histIter = tt.getHistory().iterator();
+            while (histIter.hasNext()) {
+                History h = (History) histIter.next();
+                parent.addTarget(h);
+            }
+            if (tt instanceof State) {
+                Iterator childIter = ((State) tt).getChildren().values().iterator();
+                while (childIter.hasNext()) {
+                    TransitionTarget child = (TransitionTarget) childIter.next();
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
+            } else if (tt instanceof Parallel) {
+                Iterator childIter = ((Parallel) tt).getChildren().iterator();
+                while (childIter.hasNext()) {
+                    TransitionTarget child = (TransitionTarget) childIter.next();
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
             }
-            s.setDatamodel(externalSCXML.getDatamodel());
         }
     }
 

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java?rev=651742&r1=651741&r2=651742&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java Fri Apr 25 16:48:13 2008
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.net.URL;
 import java.text.MessageFormat;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -1439,55 +1440,137 @@
             if (SCXMLHelper.isStringEmpty(src)) {
                 return;
             }
+
+            // 1) Digest the external SCXML file
             Digester digester = getDigester();
             SCXML scxml = (SCXML) digester.peek(digester.getCount() - 1);
-            // 1) Digest the external SCXML file
-            SCXML externalSCXML = null;
+            SCXML parent = root;
+            if (parent == null) {
+                parent = scxml;
+            }
             String path;
-            Digester externalSrcDigester;
+            PathResolver nextpr = null;
             if (pr == null) {
                 path = src;
-                if (root != null) {
-                    externalSrcDigester = newInstance(root, null,
-                        customActions);
-                } else {
-                    externalSrcDigester = newInstance(scxml, null,
-                        customActions);
-                }
             } else {
                 path = pr.resolvePath(src);
-                if (root != null) {
-                    externalSrcDigester = newInstance(root,
-                        pr.getResolver(src), customActions);
-                } else {
-                    externalSrcDigester = newInstance(scxml,
-                        pr.getResolver(src), customActions);
-                }
+                nextpr = pr.getResolver(src);
             }
-
+            String[] fragments = path.split("#", 2);
+            String location = fragments[0];
+            String fragment = null;
+            if (fragments.length > 1) {
+                fragment = fragments[1];
+            }
+            Digester externalSrcDigester;
+            if (fragment != null) {
+                // Cannot pull in all targets just yet, i.e. null parent
+                externalSrcDigester = newInstance(null, nextpr,
+                    customActions);
+            } else {
+                externalSrcDigester = newInstance(parent, nextpr,
+                    customActions);
+            }
+            SCXML externalSCXML = null;
             try {
-                externalSCXML = (SCXML) externalSrcDigester.parse(path);
+                externalSCXML = (SCXML) externalSrcDigester.parse(location);
             } catch (Exception e) {
                 org.apache.commons.logging.Log log = LogFactory.
                     getLog(SCXMLParser.class);
                 log.error(e.getMessage(), e);
             }
+
             // 2) Adopt the children and datamodel
             if (externalSCXML == null) {
                 return;
             }
             State s = (State) digester.peek();
-            Transition t = new Transition();
-            t.setNext(externalSCXML.getInitialstate());
-            Initial ini = new Initial();
-            ini.setTransition(t);
-            s.setInitial(ini);
-            Map children = externalSCXML.getChildren();
-            Object[] ids = children.keySet().toArray();
-            for (int i = 0; i < ids.length; i++) {
-                s.addChild((TransitionTarget) children.get(ids[i]));
+            if (fragment == null) {
+                // All targets pulled in since its not a src fragment
+                Initial ini = new Initial();
+                Transition t = new Transition();
+                t.setNext(externalSCXML.getInitialstate());
+                ini.setTransition(t);
+                s.setInitial(ini);
+                Map children = externalSCXML.getChildren();
+                Iterator childIter = children.values().iterator();
+                while (childIter.hasNext()) {
+                    s.addChild((TransitionTarget) childIter.next());
+                }
+                s.setDatamodel(externalSCXML.getDatamodel());
+            } else {
+                // Need to pull in descendent targets
+                Object source = externalSCXML.getTargets().get(fragment);
+                if (source == null) {
+                    org.apache.commons.logging.Log log = LogFactory.
+                        getLog(SCXMLParser.class);
+                    log.error("Unknown fragment in <state src=\"" + path +
+                        "\">");
+                    return;
+                }
+                if (source instanceof State) {
+                    State include = (State) source;
+                    s.setOnEntry(include.getOnEntry());
+                    s.setOnExit(include.getOnExit());
+                    s.setDatamodel(include.getDatamodel());
+                    List histories = include.getHistory();
+                    for (int i = 0; i < histories.size(); i++) {
+                        History h = (History) histories.get(i);
+                        s.addHistory(h);
+                        parent.addTarget(h);
+                    }
+                    Iterator childIter = include.getChildren().values().iterator();
+                    while (childIter.hasNext()) {
+                        TransitionTarget tt = (TransitionTarget) childIter.next();
+                        s.addChild(tt);
+                        parent.addTarget(tt);
+                        addTargets(parent, tt);
+                    }
+                    s.setInvoke(include.getInvoke());
+                    s.setFinal(include.isFinal());
+                    if (include.getInitial() != null) {
+                        s.setInitial(include.getInitial());
+                    }
+                    Iterator transIter = include.getTransitionsList().iterator();
+                    while (transIter.hasNext()) {
+                        s.addTransition((Transition) transIter.next());
+                    }
+                } else {
+                    org.apache.commons.logging.Log log = LogFactory.
+                        getLog(SCXMLParser.class);
+                    log.error("Fragment in <state src=\"" + path +
+                        "\"> is not a <state> or <final>");
+                }
+            }
+        }
+
+        /**
+         * Add all the nested targets from given target to given parent state machine.
+         *
+         * @param parent The state machine
+         * @param tt The transition target to import
+         */
+        private static void addTargets(final SCXML parent, final TransitionTarget tt) {
+            Iterator histIter = tt.getHistory().iterator();
+            while (histIter.hasNext()) {
+                History h = (History) histIter.next();
+                parent.addTarget(h);
+            }
+            if (tt instanceof State) {
+                Iterator childIter = ((State) tt).getChildren().values().iterator();
+                while (childIter.hasNext()) {
+                    TransitionTarget child = (TransitionTarget) childIter.next();
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
+            } else if (tt instanceof Parallel) {
+                Iterator childIter = ((Parallel) tt).getChildren().iterator();
+                while (childIter.hasNext()) {
+                    TransitionTarget child = (TransitionTarget) childIter.next();
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
             }
-            s.setDatamodel(externalSCXML.getDatamodel());
         }
     }
 

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java Fri Apr 25 16:48:13 2008
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+package org.apache.commons.scxml.issues;
+
+import java.net.URL;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.apache.commons.scxml.SCXMLExecutor;
+import org.apache.commons.scxml.SCXMLTestHelper;
+import org.apache.commons.scxml.model.State;
+
+/**
+ * Test cases for issue 62.
+ * FIXED
+ */
+public class Issue62Test extends TestCase {
+
+    public Issue62Test(String name) {
+        super(name);
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(Issue62Test.class);
+        suite.setName("SCXML Issue 62 Test");
+        return suite;
+    }
+
+    private URL test01, test02, test03;
+    private SCXMLExecutor exec;
+
+    /**
+     * Set up instance variables required by this test case.
+     */
+    public void setUp() {
+        test01 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/issues/issue62-01.xml");
+        test02 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/issues/issue62-02.xml");
+        test03 = this.getClass().getClassLoader().
+            getResource("org/apache/commons/scxml/issues/issue62-03.xml");
+    }
+
+    /**
+     * Tear down instance variables required by this test case.
+     */
+    public void tearDown() {
+        test01 = test02 = null;
+        exec = null;
+    }
+
+    public void test01issue62() {
+        exec = SCXMLTestHelper.getExecutor(test01);
+        Set currentStates = exec.getCurrentStatus().getStates();
+        assertEquals(1, currentStates.size());
+        assertEquals("s1.1", ((State)currentStates.iterator().
+            next()).getId());
+        SCXMLTestHelper.assertPostTriggerState(exec, "foo", "s1.1");
+    }
+
+    public void test02issue62() {
+        exec = SCXMLTestHelper.getExecutor(test02);
+        fragmenttest();
+    }
+
+    public void test03issue62() {
+        exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(test03));
+        fragmenttest();
+    }
+
+    private void fragmenttest() {
+        Set currentStates = exec.getCurrentStatus().getStates();
+        assertEquals(1, currentStates.size());
+        assertEquals("s1", ((State)currentStates.iterator().
+            next()).getId());
+        SCXMLTestHelper.assertPostTriggerState(exec, "foo", "e1.1.1");
+        SCXMLTestHelper.assertPostTriggerState(exec, "bar", "e1.1.2");
+        SCXMLTestHelper.assertPostTriggerState(exec, "baz", "s3");
+        assertTrue(exec.getCurrentStatus().isFinal());
+    }
+
+    public static void main(String args[]) {
+        TestRunner.run(suite());
+    }
+}
+

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java?rev=651742&r1=651741&r2=651742&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java Fri Apr 25 16:48:13 2008
@@ -47,6 +47,7 @@
     public static Test suite() {
         TestSuite suite = new TestSuite();
         suite.setName("Commons SCXML Issues Tests");
+        suite.addTest(Issue62Test.suite());
         suite.addTest(Issue64Test.suite());
         return suite;
     }

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,27 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="ext">
+
+    <state id="ext">
+        <transition event="foo">
+            <log expr="'Stay transition in issue 62 test'"/>
+        </transition>
+    </state>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,29 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="s1">
+
+    <state id="s1">
+        <initial>
+            <transition target="s1.1" />
+        </initial>
+        <state id="s1.1" src="issue62-01-ext.xml#ext" />
+        <state id="s1.2" src="issue62-01-ext.xml#ext" />
+    </state>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,39 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="e1">
+
+    <state id="e1">
+        <initial>
+            <transition target="e1.1"/>
+        </initial>
+        <state id="e1.1">
+            <initial>
+                <transition target="e1.1.1"/>
+            </initial>
+            <state id="e1.1.1">
+                <transition event="bar" target="e1.1.2"/>
+            </state>
+            <state id="e1.1.2">
+                <transition event="baz" target="e1.2"/>
+            </state>
+        </state>
+        <state id="e1.2" final="true"/>
+    </state>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,35 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="s1">
+
+    <state id="s1">
+        <transition event="foo" target="s2" />
+    </state>
+
+    <state id="s2">
+        <initial>
+            <transition target="s2.1"/>
+        </initial>
+        <state id="s2.1" src="issue62-02-ext.xml#e1" />
+        <transition event="s2.1.done" target="s3"/>
+    </state>
+
+    <state id="s3" final="true"/>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,39 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="e1">
+
+    <state id="e1">
+        <initial>
+            <transition target="e1.1"/>
+        </initial>
+        <state id="e1.1">
+            <initial>
+                <transition target="e1.1.1"/>
+            </initial>
+            <state id="e1.1.1">
+                <transition event="bar" target="e1.1.2"/>
+            </state>
+            <state id="e1.1.2">
+                <transition event="baz" target="e1.2"/>
+            </state>
+        </state>
+        <final id="e1.2"/>
+    </state>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml?rev=651742&view=auto
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml (added)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml Fri Apr 25 16:48:13 2008
@@ -0,0 +1,35 @@
+<?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.
+-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+       initialstate="s1">
+
+    <state id="s1">
+        <transition event="foo" target="s2" />
+    </state>
+
+    <state id="s2">
+        <initial>
+            <transition target="s2.1"/>
+        </initial>
+        <state id="s2.1" src="issue62-03-ext.xml#e1" />
+        <transition event="s2.1.done" target="s3"/>
+    </state>
+
+    <final id="s3"/>
+
+</scxml>

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL