<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd">
<form>
<!-- script contains the function sayCard(type,position)
which takes as input the type of card description (audio or text) and
its position in an array, and returns the selected card description in
the specified array position; if there is no description in the
requested array position, then returns EMCAScript undefined -->
<script src="cardgame.js"/>
<field name="takecard">
<grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/>
<prompt>
<audio src="you_have.wav">You have the following cards: </audio>
<!-- maximum of hand of 5 cards is described -->
<audio expr="sayCard(audio,1)"><value expr="sayCard(text,1)"/></audio>
<audio expr="sayCard(audio,2)"><value expr="sayCard(text,2)"/></audio>
<audio expr="sayCard(audio,3)"><value expr="sayCard(text,3)"/></audio>
<audio expr="sayCard(audio,4)"><value expr="sayCard(text,4)"/></audio>
<audio expr="sayCard(audio,5)"><value expr="sayCard(text,5)"/></audio>
<audio src="another.wav">Would you like another card?</audio>
</prompt>
<filled>
<if cond="takecard">
<script>takeAnotherCard()</script>
<clear/>
<else/>
<goto next="./make_bid.aspl"/>
</if>
</filled>
</field>
</form>
</vxml>
|