Home > Articles > Web Services > XML

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

This chapter is from the book

3.7 clear

Element type

clear

Attributes

namelist

Parents

block | catch | error | filled | help | if | noinput | nomatch

Children

None.

Description

Clears variables in the current variable scope, setting them to undefined.

DTD

<!ELEMENT clear EMPTY >
<!ATTLIST clear
  namelist %field.names; #IMPLIED >

Language model


03mod07.gif


Attributes

namelist : field.names

The name of the form item variables to be cleared. A list of form item names delimited by whitespace.

Children

None.

Examples

Example 3-9 Clearing a field's value

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="1.0">
  <form id="GrammarTest">
    <var name="Gram"/>
    <field name="WhatYouSaid" type="currency">
      <prompt>Say some currency</prompt>
      <filled>
        <assign name="Gram" expr="WhatYouSaid"/>
        <prompt>
          You said: 
          <value expr="WhatYouSaid"/>, 
          which was stored as: 
          <value expr="Gram"/>. 
          The shadow variable 'utterance' contains: 
          <value expr="WhatYouSaid$.utterance"/>.
        </prompt>
        <clear namelist="WhatYouSaid"/>
      </filled>
    </field>
  </form>
</vxml>
  • + Share This
  • 🔖 Save To Your Account