Things to Remember

When loading a supporting document, the root document is also loaded by the interpreter. This allows the interpreter to maintain application scope information such as variables, links, and events.

Specifying the document name in a URI for a <goto> transition causes the interpreter to unload the current document and load the new document (even if it is the same document). This will reinitialize all variables of document or lesser scope.

Exercise:

Look at the following document entitled, “cars.vxml” and select the correct TTS prompt that is played in the last form.

<?xml version="1.0"?>
<vxml version="2.0" application="carstore.vxml">
    <var name="car" expr="'gremlin'"/ >
    <var name="interior" expr="'vinyl'" />
    <form id="intro">
        <block>
            <assign name="interior" expr="'leather'" />
            <goto next="cars.vxml#sayCar" />
        </block>
    </form>
    <form id="sayCar">
        <block>
            <var name="color" expr="'blue'" />
            <prompt>
                You want a <value expr="color" />
                <value expr="car" /> with
                <value expr="interior" /> seats.
            </prompt>
        </block>
    </form>
</vxml>

Select the correct prompt to be played from the list below:

Leave a Reply

Your email address will not be published. Required fields are marked *