commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r651743 - in /commons/proper/scxml/branches/J6/src: main/java/org/apache/commons/scxml/io/ test/java/org/apache/commons/scxml/issues/
Date Fri, 25 Apr 2008 23:55:14 GMT
Author: rahul
Date: Fri Apr 25 16:55:11 2008
New Revision: 651743

URL: http://svn.apache.org/viewvc?rev=651743&view=rev
Log:
Port r651742 to J6 branch, with appropriate changes.
Enhancement request for supporting fragment URLs in <state>'s src attribute.
SCXML-62



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

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java?rev=651743&r1=651742&r2=651743&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLDigester.java
Fri Apr 25 16:55:11 2008
@@ -19,9 +19,8 @@
 import java.io.IOException;
 import java.net.URL;
 import java.text.MessageFormat;
+import java.util.Collection;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -1418,55 +1417,134 @@
             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<String, TransitionTarget> children = externalSCXML.getStates();
-            Set<String> ids = children.keySet();
-            for (String id : ids) {
-                s.addChild(children.get(id));
+            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);
+                Collection<TransitionTarget> children = externalSCXML.
+                    getChildren().values();
+                for (TransitionTarget child : children) {
+                    s.addChild(child);
+                }
+                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<History> histories = include.getHistory();
+                    for (History h : histories) {
+                        s.addHistory(h);
+                        parent.addTarget(h);
+                    }
+                    Collection<TransitionTarget> children = include.getChildren().
+                        values();
+                    for (TransitionTarget child : children) {
+                        s.addChild(child);
+                        parent.addTarget(child);
+                        addTargets(parent, child);
+                    }
+                    s.setInvoke(include.getInvoke());
+                    s.setFinal(include.isFinal());
+                    if (include.getInitial() != null) {
+                        s.setInitial(include.getInitial());
+                    }
+                    List<Transition> transitions = include.getTransitionsList();
+                    for(Transition t : transitions) {
+                        s.addTransition(t);
+                    }
+                } 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) {
+            List<History> histories = tt.getHistory();
+            for (History h : histories) {
+                parent.addTarget(h);
+            }
+            if (tt instanceof State) {
+                Collection<TransitionTarget> children = ((State) tt).getChildren().
+                    values();
+                for (TransitionTarget child : children) {
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
+            } else if (tt instanceof Parallel) {
+                Collection<TransitionTarget> children = ((Parallel) tt).getChildren();
+                for (TransitionTarget child : children) {
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
             }
-            s.setDatamodel(externalSCXML.getDatamodel());
         }
     }
 

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java?rev=651743&r1=651742&r2=651743&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/SCXMLParser.java
Fri Apr 25 16:55:11 2008
@@ -19,9 +19,8 @@
 import java.io.IOException;
 import java.net.URL;
 import java.text.MessageFormat;
+import java.util.Collection;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -1438,55 +1437,134 @@
             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<String, TransitionTarget> children = externalSCXML.getChildren();
-            Set<String> ids = children.keySet();
-            for (String id : ids) {
-                s.addChild(children.get(id));
+            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);
+                Collection<TransitionTarget> children = externalSCXML.
+                    getChildren().values();
+                for (TransitionTarget child : children) {
+                    s.addChild(child);
+                }
+                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<History> histories = include.getHistory();
+                    for (History h : histories) {
+                        s.addHistory(h);
+                        parent.addTarget(h);
+                    }
+                    Collection<TransitionTarget> children = include.getChildren().
+                        values();
+                    for (TransitionTarget child : children) {
+                        s.addChild(child);
+                        parent.addTarget(child);
+                        addTargets(parent, child);
+                    }
+                    s.setInvoke(include.getInvoke());
+                    s.setFinal(include.isFinal());
+                    if (include.getInitial() != null) {
+                        s.setInitial(include.getInitial());
+                    }
+                    List<Transition> transitions = include.getTransitionsList();
+                    for(Transition t : transitions) {
+                        s.addTransition(t);
+                    }
+                } 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) {
+            List<History> histories = tt.getHistory();
+            for (History h : histories) {
+                parent.addTarget(h);
+            }
+            if (tt instanceof State) {
+                Collection<TransitionTarget> children = ((State) tt).getChildren().
+                    values();
+                for (TransitionTarget child : children) {
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
+            } else if (tt instanceof Parallel) {
+                Collection<TransitionTarget> children = ((Parallel) tt).getChildren();
+                for (TransitionTarget child : children) {
+                    parent.addTarget(child);
+                    addTargets(parent, child);
+                }
             }
-            s.setDatamodel(externalSCXML.getDatamodel());
         }
     }
 

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
Fri Apr 25 16:55:11 2008
@@ -0,0 +1,102 @@
+/*
+ * 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.TransitionTarget;
+
+/**
+ * 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<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        assertEquals(1, currentStates.size());
+        assertEquals("s1.1", 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<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        assertEquals(1, currentStates.size());
+        assertEquals("s1", 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/Issue62Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java?rev=651743&r1=651742&r2=651743&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
(original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-01.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-02.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03-ext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml?rev=651743&view=auto
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
(added)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
Fri Apr 25 16:55:11 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/branches/J6/src/test/java/org/apache/commons/scxml/issues/issue62-03.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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



Mime
View raw message