<filled> <field> 标签内和标签外有什么区别?

  • 本文关键字:标签 区别 filled field ivr vxml voxeo
  • 更新时间 :
  • 英文 :


<filled>标签可以写在<field>标签下,也可以写在标签外的 a <form> 标签下。

那么这两种编写代码的方式有什么区别呢?在哪种情况下,这将是有益的?

示例可在 中找到: http://help.voxeo.com/go/help/xml.vxml.tutorials.audio

如果你在里面写标签,那么这将是该标签的一个特殊处理。

如果你在外面写,那么它可以用于像多输入操作一样,被捕获在.

例如。

<?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>

最新更新