6. What is spoken to the user by the following VoiceXML code?
<var name = "a" expr = "1"/>
<var name = "b" expr = "1"/>
<var name = "c" expr = "1"/>
<form id = “formB”>
<var name = "b" value = "3"/>
<field name = "fieldC">
<assign name = "a" value = "9"/>
<var name = "c" value = "5"/>
<filled>
<prompt>
Values at field level are
a = <value expr = "a"/>
b = <value expr = "b"/>
c = <value expr = "c"/>
</prompt>
</filled>
</field>
<filled>
<prompt>
Values at form level are
a = <value expr = "a"/>
b = <value expr = "b"/>
c = <value expr = "c"/>
</prompt>
</filled>
</form>
Correct answer is B. <var> and Lesson 10.4 .
7. A <form> may contain which of the following elements as a direct chilc of the <form>?
Correct answer is A.<form>
8. What do <field>, <record>, <object>, <subdialog>, and <transfer> elements have in common?
Correct answer is D. <field>, <record>, <object>, <subdialog>, and <transfer>
9. Which two elements have an id attribute?
Correct answers are B and C. <field>, <form>, <menu>, and <block>
10. Given the following VoiceXML code:
<form>
<field name = "A” type = "digit"> <prompt> What is A? </prompt> </field>
<field name = "B" type = "digit"> <prompt> What is B? </prompt> </field>
<field name = "C" type = "digit"> <prompt> What is C? </prompt> </field>
<filled>
<if cond = "A > 5"> <clear namelist = "B C"/></if>
<if cond = "B > 3"> <clear namelist = "B"/></if>
</filled>
</filled>
This code will prompt the user to speak which of the following sequences of numbers?
Correct answer is D. <if> and <clear>
11. Given the following code
<link event = "error.A">
<grammar version = "2.0" root = "game" type = "application/srgs+xml">
<rule id = "game">
<item> beanbag </item>
</rule>
</grammar>
</link>
<form>
<field name = "circus" >
<prompt>Do you want to throw a beanbag or softball?</prompt>
<grammar version = "2.0" root = "projectile" type= "application/srgs+xml">
<rule id = "projectile"> softball </rule>
</grammar>
</field>
</form>
How should the above code be modified so that a <nomatch> event is generated when the user speaks “beanbag”?
Correct answer is A. <form>
12. Given the following VoiceXML code that enables a user to either speak or enter values using DTMF:
<field name = "purchase">
<prompt> do you want to purchase item 25 or 53?</prompt>
<grammar version = " 2.0 " root = "product_dtmf" type = "application/srgs+xml" mode = "dtmf">
<rule id = "product_dtmf">
<one-of> <item> 2 5 </item> <item> 5 3 </item> </one-of>
</rule>
</grammar>
<grammar version = "2.0" root = "pruduct" type = "application/srgs+xml" mode = "voice">
<rule id = "product_speech">
<one-of>
<item> twentyfive <tag>$ = "25"</tag></item>
<item> fiftythree <tag>$ = "53"</tag></item>
</one-of>
</rule>
</grammar>
<filled>
<if cond = [_______]”>
<prompt> thanks for speaking the item number </prompt>
<else/><prompt> thanks for entering the item number </prompt>
</if>
</filled>
</field>
What should be placed in the blank to by saying thanks for speaking (if the user spoke) or entering (if the user used DTMF)?
13 What is the standard session variable for storing the ANI?
Correct answer if D. <transfer>
14. Given the following VoiceXML code:
<var name = "first_part" expr = "B" />
<field name = "second_part">
<grammar version = "2.0" root = "number" type = "application/srgs+xml" mode = "voice">
<rule id = "number">
<one-of> <item> 1 </item> <item> 2 </item> </one-of>
</rule>
</grammar>
<prompt> Say 1 or 2 </prompt>
<filled> [____] </filled>
</field>
Which of the following can be place into the [____] without resulting in an error?
Correct answer is A.<goto>.
15. Which two of the following result in a transfer to another document?
16. Given the following VoiceXML code, what must be inserted to guarantee that the parent_age is greater than the child_age?
<form>
<field name = "parent_age" type = "number">
<prompt> What is the age of the parent? </prompt>
</field>
<field name = "child_age" type = "number">
<prompt> What is the age of the child? </prompt>
</field>
[_____]
</form>
17. Given the following code:
<form>
<field name = "parent_age" type = "number">
<prompt> What is the age of the parent? </prompt>
</field>
<field name = "child_age" type = "number" >
<prompt> What is the age of the child? </prompt>
</field>
<filled> [_____] </filled>
</form>
Insert into the blank a <submit> element that sends both parent_age and child_age to the server and then transitions to library/application3.vxml
Correct answer is A. <submit>
18. Given the following CCXML code:
<?xml version="1.0" encoding="UTF-8"?>
<ccxml xmlns="http://www.w3.org/2002/09/ccxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/09/ccxml http://www.w3.org/TR/ccxml/ccxml.xsd" version="1.0">
<var name = “voiceApp” expr = "'myApp.vxml'"/>
<eventprocessor>
<transition event = [_____] name = "evt">
<if cond = "evt.callerid == ‘tel:+8005551234' ">
<assign name = "voiceApp" expr = "'blocked.vxml'"/>
</if>
<accept connectionid = "evt.callid"/>
</transition>
<transition event = "connection.connected">
<dialogstart src = "voiceApp" />
</transition>
<transition event = "dialog.exit">
<exit/>
</transition>
</evenprocessor>
</ccxml>
Which event should be placed in the blank in order to determine whether to accept the call or to block the call?
Correct answer is D. Lesson 21.2.
19. Given the following code:
<?xml version="1.0" encoding="UTF-8"?>
<ccxml xmlns="http://www.w3.org/2002/09/ccxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/09/ccxml http://www.w3.org/TR/ccxml/ccxml.xsd" version="1.0">
<eventprocessor>
<transition event = "ccxml.loaded" >
<createcall dest = "'tel:+8009999999'"/>
</transition>
<transition event = "[________]">
<dialogstart src = "voiceApp" />
</transition>
<transition event = "dialog.exit">
<exit/>
</transition>
</eventprocessor>
</ccxml>
What event should be placed in the blank space to trigger starting the dialog voiceApp?
Correct answer is C. Lesson 21.2.
20. Given the following VoiceXML code
<form id="call_transfer">
<transfer name="call_ajax" dest="tel:+18005559999" connecttimeout="30s" bridge="[_____]">
<filled>
<if cond="call_ajax == 'busy'">
<prompt>
The Ajax line is busy. Please call again later.
</prompt>
<elseif cond="call_ajax == 'noanswer'"/>
<prompt>
Ajax cannot answer the phone now. Please call again later.
</prompt>
</if>
</filled>
</transfer>
</form>
What is the value for the bridge attribute?
Correct answer is C. <transfer>
21. An application consists of
Correct answer is C. Lesson 3.4 .
22. Which grammar matches exactly all of the following utterances?
the big book of poems
the small book of poems
the big book of verse
the small book of verse
Correct answer is A. Lesson 14.4 and Lesson 14.5.3.
23. Given the following grammar named itinerary.grxml :
<grammar version = "2.0" type = "application/srgs+xml" root = "flight" >
<rule id = "flight" >
From <ruleref uri = "#city1"/> to <ruleref uri = "#city2"/>
</rule>
<rule id = "city1" scope = "public" >
<one-of>
<item> Chicago </item>
<item> Boston </item>
</one-of>
</rule>
<rule id = "city2" >
<one-of>
<item> Alanta </item>
<item> Seattle </item>
</one-of>
</rule>
</grammar>
Which of the following are all of the legal references from within a VoiceXML application?
Correct answer is B. See Lesson 14.5.2. Rule "city2" defaults to private and can not be accessed publically.
24. Given the following VoiceXML document:
<form id = "birthmonth">
<subdialog name="month_name" [________] />
</form>
…
<form id="get_month">
<field name = "month">
<prompt> What month? </prompt>
<grammar version = "1.0" type="application/srgs+xml" root = "month">
<rule id = "month">
<one-of>
<item>January</item>
…
<item>December</item>
</one-of>
</rule>
</grammar>
<filled>
<return namelist="month"/>
</filled>
</field>
</form>
What should be placed into the blank to invoke the get_month subdialog?
Correct answer is A. <subdialog>
25. Given the following VoiceXML code fragment
<field name = "size" >
<grammar src = “size.grxml”/>
<prompt count = " [____] " > What size? </prompt>
<prompt count = " [____] " > What size? Small, medium, or large?</prompt>
</field>
What should be placed in the two boxes to specify a tapered (escalating) prompt?
Correct answer is B. <prompt>
26 Given the following code:
<vxml …>
[ A ]
<form ….>
<nomatch> Please try again </nomatch>
[ B ]
<field … >
[ C ]
</field>
<filled>
[ D ]
</filled>
</form>
</vxml>
Where should the following event handler be placed to override the event handler in the above VoiceXML code?
<nomatch> Do you want size small? Yes or no? </nomatch>
Correct answer is C. <catch>
27 Which of the following generates a user-defined event?
Answer is A. <throw>
28 Given the following code:
<form id = "questionnaire">
<catch event = "noinput">
<prompt> Catch message 1.</prompt>
</catch>
<field name = "question1" type = "number">
<prompt> Question 1? </prompt>
<catch event = "noinput">
<prompt> Catch message 2.</prompt>
</catch>
</field>
<field name = "question2" type = "number" >
<prompt> Question 2?</prompt>
</field>
</form>
Which of the following dialogs can be produced by the above VoiceXML code?
Correct answer is A. Lesson 11.3.
29. Which of the following segments will produce the following output to a log?
value of quantity is 13
Correct answer is B. <log>
30. Which of the following rules recognizes a three-digit number where each digit has the value of either “333” or “555”
Correct answer is D. <item>
31. Given the following SRGS rules:
<rule id = "size" >
<one-of>
<item> small </item>
<item> medium</item>
<item> large</item>
</one-of>
</rule>
<rule id = "drink" >
<one-of>
<item> orange juice </item>
<item> milk</item>
<item> soda</item>
</one-of>
</rule>
and the utterance
large soda
Which grammar root rule matches the utterance?
Correct answer is D. <ruleref> and Lesson 14.7.
32. Given the following grammar rule:
<rule id = "size" >
<item repeat = "0-2" > very </item>
<one-of>
<item> red</item>
<item> green</item>
<item> blue</item>
</one-of>
</item>
balloon
</rule>
Which of the following input produces the associated output?
Speech input Output
Correct answer is B. Lesson 14: Grammars
33. Which rule accepts each of the following speech inputs and produces the associated output?
Speech input Output
blue produces blue
green blue produces green blue
blue green produces blue green
Correct answer is A. Lesson 14: Grammars
34. What will the following VoiceXML code produce?
<audio src= "warning.wav" >This is a warning</audio>
Correctd answer is C. <audio>
35. Given the VoiceXML fragment
<prompt>
Hello <break/>my name is Ann.
</prompt>
Insert a SSML to slow the speech by 10 percent.
36. Given the following VoiceXML code:
<object name = "voice_message" classid = "method://send" data = "messasge" type = "audio/x-wav"/>
[_________]
</object>
Which code fragment allows you to pass the variable “to” to the object?
Correct answer is C. <object>
37. Given the following ECMAScript
<script>
<![CDATA[
var a = "17";
]]>
</script>
Which of the following presents the user with the contents of the variable?
Correct answer is D. <value>
38. Given the VoiceXML code
<menu>
<prompt> stock quotes or airport codes? </prompt>
<choice next = "stock_quote.vxml" [_____] > stock quotes </choice>
</menu>
What goes in the blank so the stock_quote.vxml file is downloaded into the cache when it is required, possibly causing a delay in the user interface?
Correct answer is A. Lesson 12.1.
39. What is the result if the user responds with “9” to the first prompt?
<form>
<field name = "A" type = "number"> <prompt> What is A? </prompt> </field>
<field name = "B" type = "number"> <prompt> What is B? </prompt> </field>
<filled>
<if cond = "A > 5"> <clear namelist = "B"/></if>
</filled>
</form>
Correct answer is D. <clear> and <if>
40. Given the following grammar expressed using the XML format:
<item repeat="0-1">
<item repeat="0-1"> very </item>
big
</item>
pizza
<item repeat="0-">
<item repeat="0-1">
<one-of>
<item>with</item>
<item>and</item>
</one-of>
</item>
<ruleref uri="#topping"/>
</item>
What is the equivalent grammar expressed using the ABNF format?
Correct answer is A. Lesson 14.13.
41. What is the purpose of the <initial> element?
42. What should occur when a user fails to completely answer a prompt appearing in the <initial> element of a mixed initiative dialog?
43. Given the following VoiceXML code:
<form id = "gadget">
<field name = "size" type = "digits">
<prompt>How many ? </prompt>
</field>
<filled>
<if cond = "size = '3'"><clear namelist = "quanity" /> </if>
</filled>
</form>
Which of the following are true?
44. Which two rule recognize both of these phrases?
a sweet candy bar
a big sweet candy bar
45. A <grammar> element may be a child of which of the following elements?
46. Which of the following VoiceXML code snippets are equivalent?
47. In the <grammar> element, which of the following indicates that the grammar is fetched when it is needed?
48. Which of the following <subdialog> elements will execute form get_month in the same document as the <subdialog> element?
49. Which two of the following are correct VoiceXML forms?
50. Which two of the following assign the same value to the variable size?
51. Which of the following will transfer control to menu3 within the same document?
52. How does the developer specify a <grammar> element to enable a user to say a word described in the grammar even if the user is interacting within another document in the application?
53. Given that a grammar contains the following rules
<rule id = "complete_name">
<ruleref uri = "first_name"/>
<ruleref uri = "last_name"/>
<rule id = "first_name"> <item> jack </item> </rule>
<rule id = "last_name" <item> tailor </item> </rule>
What attribute must be specified in the <grammar> element to recognize the following:
jack in the spoken utterance "jack hudson"
tailor in the spoken utterance "bob tailor"
jack hudson in the spoken utterance "jack hudson"
54. What is the purpose of the <reprompt> element?
56. Change the following prompt element so the first "Dr." is pronounced as "doctor" and the second "Dr." is pronounced as drive by using the <sub> element
Dr. Smith lives at 214 Elm Dr.
57. What will happen if the confidencelevel is set to value 1.0?
58. What is the purpose of the termchar property"?
59. Which of the following elements use the fetechhint, fetchtimeout, maxage, and maxstale attributes?
60. A document grammar scope is specified by whichof the following:
© 2002 Larson Technical Services