簡體   English   中英

之間有什么區別 <filled> 里面的標簽 <field> 標記出來嗎?

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

<filled>標簽可以寫在<field>標簽下,也可以寫在標簽的外面,在<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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM