<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!-- DOCTYPE vxml SYSTEM "http://127.0.0.1:5000/voicexml1-0.dtd" -->
<vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
<form id="dtmfForm">
<property name="inputmodes" value="dtmf"/>
<field name="dtmf">
<audio src="http://localhost/File/voicefiles/T/menu/playCatDefinition.wav"/>
<prompt>press 1</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Love.wav"/>
<prompt>press 2</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Thinking of you.wav"/>
<prompt>press 3</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Oba Nathi Da.wav"/>
<prompt>press 4</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Adareta Kiyana Katha.wav"/>
<prompt>press 5</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Akamatththa.wav"/>
<prompt>press 6</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Sorry.wav"/>
<prompt>press 7</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Birthday.wav"/>
<prompt>press 8</prompt>
<audio src="http://localhost/File/voicefiles/T/cats/Annivesary.wav"/>
<prompt>
go to next step press 0
</prompt>
<grammar mode="dtmf" root="digit">
<rule id="digit" scope="public">
<one-of>
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</one-of>
</rule>
</grammar>
<if cond="dtmf=='9'">
<goto next="http://localhost/myApp/resteasy/service/msisdn/7777?greetingCatagory='dtmf'"/>
<else />
<goto next="http://localhost/myApp/resteasy/service/msisdn/7777?greeting='dtmf'"/>
</if>
</field>
</form>
<nomatch>
No Match! I'm sorry, I didn't understand you. Could you please try that again?
<reprompt />
</nomatch>
<noinput>
No Input! I'm sorry, I didn't hear anything. Could you please try that again?
<reprompt />
</noinput>
</vxml>考虑这个 vxml 中的任何错误--如何检查vxml是否有错误。如何,我来解决它?在这个vxml中包含什么类型的错误,一段时间后转到<goto next={url}/>,这一步,其他不工作的.what代码就是这段代码中的错误?如何管理时间下一步去..。我在找合适的答案吗?
谢谢。
发布于 2015-09-14 14:26:44
<goto>元素不能在<field>中,它负责从用户那里收集信息。它应该转移到<filled>负责它的解释。结构如下:
<form>
<field>
<grammar>...</grammar>
</field>
<filled>
<goto ...
</filled>
</form>Voxeo文档填充元素
发布于 2017-05-30 14:23:42
VoiceXML文档验证可以针对VoiceXML DTD进行,在您发布的代码中,<goto>和<if>元素在VoiceXML中称为可执行内容,可执行内容只能包含在以下元素中:
<block><catch><error><help><noinput><nomatch><if><filled>因此,在您的页面中,<if>元素在错误的元素中。
可以在验证器站点上使用W3C进行在线(语音)XML验证,直接验证文档的W3C验证器会导致以下错误:
第57行,第25栏:文档类型不允许元素"if“;缺少"catch”、"help“、"noinput”、"nomatch“、"error”、“填充”开始标记中的一个元素。
为了获得正确的DTD验证,需要在VoiceXML文档的开头添加一个有效的VoiceXML,例如,VoiceXML 2.1DOCTYPE如下:
<!DOCTYPE vxml PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" "http://www.w3.org/TR/voicexml21/vxml.dtd">。
发布于 2017-06-01 23:21:53
Voximal集成了一个命令行工具,名为vxml验证器。
如果安装Voximal,可以使用它来验证VoiceXML 2.0和2.1标准文档。
root@192:~# vxmlvalidator http://demo.ulex.fr/vxml/index.vxml
------------------------------------------------------------------------------
.
VALID: http://demo.ulex.fr/vxml/index.vxml
TIME PROCESSING: 213697
PAGES PARSED: 1 (4.67952 p/s)https://stackoverflow.com/questions/32562807
复制相似问题