diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
commit | 6f56474450b7c54f2c95b5dea6a7a42623141649 (patch) | |
tree | 420c52085d8cf778360c09baf9722b21d01259da /test/samples/uscxml/test-mmi-im.scxml | |
parent | a154682fc1b25581742d38dd5fe9aa06ede167b7 (diff) | |
download | uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.zip uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.gz uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.bz2 |
W3C MMI Architecture framework
Diffstat (limited to 'test/samples/uscxml/test-mmi-im.scxml')
-rw-r--r-- | test/samples/uscxml/test-mmi-im.scxml | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/test/samples/uscxml/test-mmi-im.scxml b/test/samples/uscxml/test-mmi-im.scxml new file mode 100644 index 0000000..4b130bd --- /dev/null +++ b/test/samples/uscxml/test-mmi-im.scxml @@ -0,0 +1,69 @@ +<scxml datamodel="ecmascript" name="mmi-test" + xmlns:mmi="http://www.w3.org/2008/04/mmi-arch" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/2005/07/scxml"> + + <script> +<![CDATA[ + + function dump(object, level) { + if (!level) level = 0; + + var padding = ""; + for (var j=0;j < level+1;j++) padding += " "; + + if (typeof(object) == 'object') { + for (var item in object) { + if (item === "lastChild") continue; + if (item === "firstChild") continue; + if (item === "ownerDocument") continue; + var value = object[item]; + + if(typeof(value) == 'object') { + print (padding + "'" + item + "' ...\n"); + dump (value, level+1); + } else { + print (padding + "'" + item + "' => \"" + value + "\"\n"); + } + } + } else { + print("===> " + object + " <===(" + typeof(object) + ")"); + } + } +]]> + </script> + + <state id="startmc"> + <!-- invoke type="vxml" id="mc.vxml" / --> + + <!-- Idle here and wait for events --> + <state id="idle"> + + <!-- setup session --> + <transition event="mmi.newcontextrequest" target="idle"> + + <send type="mmi.event"> + <content> + <mmi:NewContextResponse mmi:Status="success" /> + </content> + </send> + + <send type="mmi.event"> + <content> + <mmi:StartRequest> + <mmi:Content> + <html:button>Click Me</html:button> + </mmi:Content> + </mmi:StartRequest> + </content> + </send> + </transition> + + <transition event="mmi.extensionnotification" target="idle"> + <script>dump(_event)</script> + </transition> + + </state> + </state> + <final id="terminate" /> +</scxml>
\ No newline at end of file |