Home > Articles > Web Services > XML

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

This chapter is from the book

3.21 help

Element type

help

Attributes

cond | count

Parents

field | form | initial | menu | object | record | subdialog | transfer | vxml

Children

assign | audio | clear | disconnect | enumerate | exit | goto | if | log | prompt | reprompt | return | script | submit | throw | value | var

Description

A shorthand for a catch element that catches help events.

DTD

<!ELEMENT help (%executable.content;)* >
<!ATTLIST help
  %event.handler.attrs; >

Language model

03fig21.gif

Attributes

  • cond : expression = true

    This event handler will only be executed if this ECMAScript expression evaluates to true.

  • count : integer

    The event handler should be run only when the counter associated with a menu, form, or form item is equal to the quantity specified by this attribute. In the case where there is no count value equal to the counter, than the help with the lowest count value, which is greater than the counter, will be selected. When the counter is greater than all count values, the catch with the highest count value will be selected.

Children

  • executable.content

    The code to be executed in response to this element catching a help event.

Examples

Example 3-24 Using a help element activated by the user saying "help"

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="1.0">
  <form>
    <field name="cmd">
      <grammar>hello | goodbye</grammar>
      <help>Valid commands are hello or goodbye.
            Please say a valid command.</help>
      <prompt>Please say a command.</prompt>
      <catch event="nomatch noinput">
        For valid commands, you may say help at any time.
      </catch>
      <filled>
        <if cond="cmd=='hello'">
          <prompt>Hello, to you.</prompt>
          <else/>
          <prompt>Goodbye.</prompt>
          <exit/>
        </if>
      </filled>
    </field>
  </form>
</vxml>
  • + Share This
  • 🔖 Save To Your Account