What's the difference between <filled> tag inside the <field> tag and out of it?

367 views Asked by At

The <filled> tag can be written under <field> tag and also outside of the tag, under the a <form> tag.

So what's the difference between these two way of writing code? And In which scenario this will be beneficial?

Example can be found in : http://help.voxeo.com/go/help/xml.vxml.tutorials.audio

1

There are 1 answers

0
Vivek Jain On BEST ANSWER

If you write tag inside then it will be a particular handling for that tag.

If you write outside then it can be used for like multiple inputs manipulation that is caught under .

eg.

<?xml version="1.0" encoding="UTF-8"?> 
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
 <form id="get_starting_and_ending_cities">
  <field name="start_city">
      <grammar src="city.grxml" 
        type="application/srgs+xml"/>
      <prompt>What is the starting city?</prompt>
  </field>
  <field name="end_city">
      <grammar src="city.grxml" 
        type="application/srgs+xml"/>
      <prompt>What is the ending city?</prompt>
  </field>
  <filled mode="all" namelist="start_city end_city">
    <log><value expr="start_city"/></log>
<log><value expr="end_city"/></log>

    <if cond="start_city == end_city">
      <prompt>
        You can't fly from and to the same city.
      </prompt>
   </if>
  </filled>
</form>
</vxml>