150 likes | 254 Views
Creating interfaces. XML & XSL review VoiceXML: grammar Homework: postings, presentation, study guide. XML. General format for data. Intended for use between people and applications and between applications and applications. XSLT: language (itself XML format) for transforming XML,
E N D
Creating interfaces XML & XSL review VoiceXML: grammar Homework: postings, presentation, study guide
XML General format for data. Intended for use between people and applications and between applications and applications. • XSLT: language (itself XML format) for transforming XML, • one use being XML to HTML. The resulting HTML can use JavaScript. • XML to WML • XML to VoiceXML (probably less common, but this use could grow)
XML • Used ‘server side’ with php or asp or ColdFusion or older technologies: cgi/perl • Used with/by Flash • Used ‘client side’ by JavaScript • Used with 'Web services'
Preview • Next Fall, new course on Java and connections (title not set) • Peter Ohring • probably evening • upper-level math/cs elective
XML • format for holding content (independent of formatting and use) • Not the only one! Consider • relational databases • linked lists • general graphs (nodes with any number of links, possibly cycles) • ?
"XML Languages" • XSLT • WML • VoiceXML • There are now also XML specifications for books, purchase orders, math, etc.
VoiceXML Grammars • Use / study grammars in Tellme studio • Note: GRXML, alternative form of grammar that is an XML format will probably replace GSL, currently used by Tellme • Look up: bargein, n-best • Specifying numeric keys: dtmf • Setting multiple values
Grammars • Parentheses indicate ‘and’ (sequence of words) • Square brackets (within an option) indicate ‘or’ • ? Indicates optional: zero or 1 occurrence • * indicates any number of occurrences • + indicates one or more occurrences [(math ?(computer science))] accepts math math computer science [purchase pace] accepts purchase pace
Questions • Give a grammar that accepts "Tom", "Dick", or "Harry" • Give a grammar that accepts "Bill Clinton", "Hilary Clinton", "President Clinton" • Give a grammar that would distinguish between the 41st president and the 43rd president.
DTMF • The grammar mode default setting is both voice and dtmf. • dtmf-1 means to accept caller hitting 1 key • Use grammar tools in My Studio for help generating the keys to represent letters
<?xml version="1.0" ?> <vxml version="2.0"> <form> <field name="answer"> <grammar type="application/x-gsl" > <![CDATA[ [ [yes dtmf-1] {<answer "yes">} [ no dtmf-2 ] {<answer "no">} ] ]]> </grammar> <prompt count="1"> Say yes or no </prompt> <prompt count="2"> Press 1 or say yes or press 2 or say no. </prompt> <catch event="noinput nomatch"> <reprompt/> </catch> <filled> <audio>You said <value expr="answer"/></audio> </filled> </field> </form> </vxml>
Letter correspondences • In My Studio, click on Grammar Tools and then DTMF and the system will generate sequences (and let you know if there are problems) • Here are 3 letter sequences for these two choices: • dtmf-6 dtmf-2 dtmf-8 math • dtmf-6 dtmf-3 dtmf-9 new media
Setting multiple values [(math ?computer)] {<major “math"> <building “NS">} [(new media)] {<major “nm"> <building “Music">}
Tellme • MyStudio: 1-800-555-VXML You need to give 5 digit plus 4 digit pin • For all of us to use your project, we need • you to upload all files to your rachel account (or some other website) • you to tell us the URL of the xml file
Homework • Postings (on other people’s projects) • Projects: Be prepared to give demonstration and turn in (hardcopy) description and, • if you are doing VoiceXML, your URL • If doing a Web page, the URL • Review guide to final