| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| namelist | Data Type: NMTOKEN | Default: Optional |
| The ‘namelist’ attribute allows you to specify particular variables or guard variables to be cleared upon execution. If none are explicitly set within this attribute, then all form items in the current form are cleared by default. | ||
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1"> <prompt> which affliction plagued George W Bush as a child. was it chronic bedwetting, or cooties? </prompt> <grammar type="text/gsl">[(?chronic bedwetting) cooties]</grammar> <filled> <prompt> our variables value is <value expr="F_1"/>. </prompt> </filled> </field> <block> <clear namelist="F_1"/> <prompt> but, after clearing it, it is <value expr="F_1"/> </prompt> <disconnect/> </block> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
medicaone
|
|
| Not researched but observed: It appears that <clear/> placed in a <catch/> block in the 2.0 Motorola browser causes an 'internal error in the gateway software". The same construct worked in the 1.3 Nuance browser.
Example: <catch event="com.xyzcorp.voice.help"> <clear/> <prompt> help text goes here </prompt> <reprompt/> </catch> |
|
willigar
|
|
| I'm seconding what medicaone observed, namely that you can't add <clear> to a catch block. In my case, the <clear> had no namelist specified and was at the document level. When I moved it to the form level, all worked fine (although that doesn't solve my problem). I haven't investigated whether it would work at doc level with a namelist specified. | |
MattHenry
|
|
|
Greetings gents, I have verified this behavior as well,and have opened up bug ticket [b]#207734[/b] to track this issue to resolution. When we have deployed a fix for this, I'll be sure to post back to you so that you can make sure the problem no longer manifests itself. I did verify that specifying a 'namelist' attribute allows you to effectively work around this behavior, however, (see attached). Regards, ~Matthew Henry |
|
djsteveoid
|
|
| Is there an update on this? I'm still seeing the same bug where <clear/> in a <catch> doesn't work. I tried making the clear block <clear namelist=""/> but that doesn't work either.
Thanks, -Steve |
|
VoxeoDustin
|
|
| Hey Steve,
This is actually working according to the spec. From section 5.3.3 (Voice Extensible Markup Language (VoiceXML) Version 2.0) "The <clear> element resets one or more variables, including form items. For each specified variable name, the variable is resolved relative to the current scope" and "The list of variables to be reset; this can include variable names other than form items. If an undeclared variable is referenced in the namelist, then an error.semantic is thrown (Section 5.1.1). When not specified, all form items in the current form are cleared." So the specs says that when no namelist is specified only the form items should be cleared (and not the (user) variables). Basically, if you're issuing <clear> with no namelist inside of a <catch>, unless that catch is scoped within a field, block, transfer or record, this will have no effect. If you wish to clear the value of a form item from within a catch, you'll want to use the namelist attribute with a space-delimited list of the form items you wish to clear. Let me know if we can be of further assistance. Regards, Dustin Hayre Customer Support Engineer II Voxeo Support |
|
djsteveoid
|
|
| Thanks, Dustin. That is helpful.
In a <catch> block, do I need to clear the event itself? -Steve |
|
VoxeoDustin
|
|
| Hey Steve,
That's not necessary. Event handlers are handled by the form interpretation algorithm differently and don't need to be cleared in order to be executed a second time. Regards, Dustin Hayre Customer Support Engineer II Voxeo Support |
| login |