Using VoiceXML, XHTML, and SCXML to uild Multimodal pplications James. Larson
genda SCXML controls the flow of an application SCXML controls modalities VoiceXML XHTML Others, e.g., InkML, SVG SCXML controls Web services
State Chart XML Represents a state transition system States Transitions
Possible ctions within a <state> <if > <else/> <log /> </if> Multimodal life cycle events <cancel /> <pause /> <resume /> <data /> Executable content <assign/> <var> <script/> <if/>, <elseif/>, <else/> <log/>
SCXML Sequentially perform the actions in two states <prepare /> <state id=""> <prepare /> target=""/> <state id="">
Conditional branch SCXML <prepare /> OK C Opps <state id=""> <prepare /> cond="result='ok '" target=""/> cond="result='opps'" target="c"/>
Parallel States SCXML C D <state id=""> <transition. target=""/> <state id=""/> <parallel> <state id="c"/> <state id="d"/> </parallel>
genda SCXML controls the flow of an application SCXML controls modalities VoiceXML XHTML Others, e.g., InkML, SVG SCXML controls Web services
SCXML + VoiceXML <state id=""> <start name= "getirport.vxml" /> target=""/> state id=""> getirport.vxml <?xml version="1.0"?> <vxml version="3.0" xmlns = "http://www.w3.org/2001/vxml"> <form id = "destination" > <field name = "irport"> <grammar src= "airport.grxml"/> <prompt>say your destination airport </prompt> <grammar src= irport.grxml </field> <filled> <send event= "" namelist = "irport" /> </filled> </form> </vxml>
SCXML + XHTML <state id=""> <start name= "getirport.xhtml" /> getirport.xhtml target=""/> <html/> <head> <ev:listener ev:event="onchange" ev:observer="bodyid" ev:handler= "senddone()" /> state id=""> <script> {function senddone } </script> </head> <!--xhtml code --> <body id="bodyid"/><p>enter month</p> <input type="text" id="month"/> </body> </html>
SCXML + XHTML + VoiceXML 1 2 <state id="1"> <start name= "getirport.vxml" /> target=""/> <state id="2"> <start name= "getirport.xhtml" /> target=""/> state id="">
nother example of multiple modalities SCXML + InkML + VoiceXML 1 2 <state id="1"> <start name= "getstuff.vxml" /> target=""/> <state id="2"> <start name= "getstuff.inkml" /> target=""/> state id="">
SCXML + InkML + VoiceXML 1 2 <state id="1"> <start name= "getstuff.vxml" /> target=""/> <state id="2"> <start name= "getstuff.inkml" /> target=""/> <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> state id="">
SCXML + InkML + VoiceXML 1 2 <state id="1"> <start name= "getstuff.vxml" /> target=""/> <state id="2"> <start name= "getstuff.inkml" /> target=""/> <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> state id=""> <interpretation mode = "ink"> <travel> <to>las Vegas </to> <from>portland </from> </travel> </interpretation>
SCXML + InkML + VXML 1 <state id="1"> <start name= "getstuff.vxml" /> target=""/> <interpretation mode = "interp1"> <travel> <to> Las Vegas </to> <from> Portland </from> <day> Tuesday </day> </travel> </interpretation> 2 <state id="2"> <start name= getstuff.inkml" /> target=""/> <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> state id=""> <interpretation mode = "ink"> <travel> <to>las Vegas </to> <from>portland </from> </travel> </interpretation>
genda SCXML controls the flow of an application SCXML controls modalities VoiceXML XHTML Others, e.g., InkML, SVG SCXML controls Web services
SCXML Control More Than Just Modalities vxml sql complexcalculation SQL Complex calculations Web services xhtml <start />
References State Chart XML (SCXML): State Machine Notation for Control bstraction http://www.w3.org/tr/scxml/ Multimodal rchitecture and Interfaces http://www.w3.org/tr/mmi-arch/ Commons SCXML (Open Source) http://jakarta.apache.org/commons/scxml/
Summary SCXML controls the flow of an application SCXML controls modalities XHTML VoiceXML Others, e.g., inkml, SVG SCXML controls Web services