XML中的wsr宏else if语句

XML中的wsr宏else if语句,xml,if-statement,macros,speech-recognition,Xml,If Statement,Macros,Speech Recognition,我正在尝试为WSR创建一个宏,其中它接受重新启动系统的输入,并通过询问是或否来确认它?然后,如果是,宏将重新启动系统;如果不是,宏只回复取消操作。到目前为止,这就是我所拥有的 <speechMacros> <command> <listenFor>Restart the System</listenFor> <speak>Confirm system restart. yes or no?</speak> </comm

我正在尝试为WSR创建一个宏,其中它接受重新启动系统的输入,并通过询问是或否来确认它?然后,如果是,宏将重新启动系统;如果不是,宏只回复取消操作。到目前为止,这就是我所拥有的

<speechMacros>
<command>
<listenFor>Restart the System</listenFor>
<speak>Confirm system restart. yes or no?</speak>
</command>
<command>
<listenFor>[...]chester</listenFor>
<if [...]="yes">
<run command="C:\Windows\System32\shutdown.exe" params="-r -t 00"/>
<else[...]="no">
<speak>canceling operation</speak>
</else>
</if>
</command>
</speechMacros>

重新启动系统
确认系统重新启动。是还是不是?
[…]切斯特
取消操作
我试过了,但它给了我一个错误,说

名称以无效字符开头

行:9列:5列

<if[...]="yes">

如何解决此问题?

如果使用
块,并将提示放在标签之间,则用户将收到一个“是/否”确认对话框,可以通过语音应答。 如果选择“是”,则应执行命令;如果选择“否”,则应在不执行命令的情况下退出