Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

3.57 value

Element type

value

Attributes

expr

Parents

audio | block | catch | choice | emphasis | enumerate | error | field | filled | help | if | initial | log | menu | noinput | nomatch | object | paragraph | prompt | prosody | record | sentence | subdialog | transfer | voice

Children

None.

Description

Inserts the value of an expression in a prompt.

DTD

<!ELEMENT value EMPTY >
<!ATTLIST value
  expr %expression; #REQUIRED >

Language model

57

Attributes

  • expr : expression

    An ECMAScript expression of the value.

Children

None.

Examples

Example 3-68 Playing a variable as text-to-speech with value

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="1.0">
  <form>
    <field name="homeAppliance">
      <noinput>
        <reprompt/>
      </noinput>
      <nomatch>
        <reprompt/>
      </nomatch>
      <prompt count="1">Please select a home appliance.</prompt>
      <prompt count="2">
        Today, we have the following home appliances to offer:
        <enumerate/>
      </prompt>
      <option dtmf="1" value="electronics">radio</option>
      <option dtmf="2" value="electronics">tv</option>
      <option dtmf="3" value="cleaning">vacuum cleaner</option>
      <option dtmf="4" value="cleaning">carpet sweeper</option>
      <option dtmf="5" value="cleaning">mop</option>
      <option dtmf="6" value="kitchen">pots and pans</option>
      <option dtmf="7" value="kitchen">toaster</option>
      <option dtmf="8" value="kitchen">knives</option>
      <filled>
        <prompt>
          You selected an item from our
          <value expr="homeAppliance"/> category.
        </prompt>
      </filled>
    </field>
  </form>
</vxml>
  • + Share This
  • 🔖 Save To Your Account