vxml - 在我的 VXML 中使用 grxml 而不是内联语法
问题描述
我已经编写了一个 VXML,它在大多数情况下都有效。我现在想使用 grxml 而不是内联语法。
我在与我的 vxml APP 相同的目录中创建了 icecream.grxml,我这样称呼它
<grammar src="icecream.grxml" type="application/srgs+xml"/>
例如
<form id="formIdicecream">
<grammar src="icecream.grxml" type="application/srgs+xml"/>
<field name="icecream"> <prompt> What is your favorite icecream? </prompt> </field>
<field name="confirm">
<prompt> Your favorite icecream is <value expr="icecream$.utterance"/> </prompt>
</field>
<block> <goto next="#formIddtmf"/> </block>
我的 icecream.grxml 如下所示,当我运行代码时出现错误:
语法激活失败|MSG=错误激活语法|URI=icecream.grxml
#<!--Header-->
<?xml version="1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar"
xml:lang="en-US"
root="icecream"
mode="voice">
<!--Rules-->
<rule id="icecream">
<one-of>
<item><ruleref
uri="#vanilla" /></item>
<item><ruleref
uri="#chocolate" /></item>
<item><ruleref
uri="#strawberry" /></item>
</one-of>
</rule>
<rule id="vanilla">
<one-of>
<item>vanilla</item>
<item>nilla</item>
</one-of>
</rule>
<rule id="chocolate">
<one-of>
<item>chocolate</item>
<item>colate</item>
</one-of>
</rule>
<rule id="strawberry">
<one-of>
<item>strawberry</item>
<item>straw</item>
</one-of>
</rule>
</grammar>
解决方案
推荐阅读
- cypress - 执行登录时遇到错误:[auth/popup-blocked] 无法与弹出窗口建立连接。可能被浏览器屏蔽了
- assembly - 在没有 CMP 的情况下检查结果是否为 0?组装 x86 MASM
- mysql - 始终通过 MySQL 函数传递列来加密和解密
- apache-spark - 步骤开始运行后在哪里获取 EMR 集群故障日志
- flutter - Flutter:为什么定位小部件在 TextField 上是透明的?
- batch-file - 如何在文件名中搜索和替换具有不同扩展名的多个文件的特定文本?
- node.js - 为什么 docker 中的 npm 重建工作但 npm install 没有
- java - Reactor Kafka 中基于分区排序的并发处理
- mongodb - Ubuntu 18.04 - mongodb 5.0 安装 - (代码=转储,信号=ILL)
- json - 需要帮助,Pandas 读取嵌套的 json 文件