| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| cond | Data Type: CDATA | Default: Optional (true) |
| The cond attribute specifies a Boolean expression, which must equate to ‘true’ in order for the content to be visited and executed. (Additionally, the expr attribute must also be set to ‘undefined’, see below). | ||
| expr | Data Type: CDATA | Default: Optional |
| The expr attribute specifies the initial value of the element; if this value is ‘undefined’, (default), then the element will be visited by the FIA and executed. If this attribute has a value other than ‘undefined’, then the element will not be visited until explicitly set to 'undefined', by use of the clear element. | ||
| name | Data Type: NMTOKEN | Default: Optional |
| The name attribute specifies the name of the ECMAScript form item variable. Each name assigned to an Initial element must be unique, else a fatal error.badfetch will be thrown. | ||
| <?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"> <grammar type="text/gsl">[dummy]</grammar> <initial name="Initial_1" expr="'SomeValue'" cond="false"> <prompt> this Initial form item will be skipped, as the expression is not equal to undefined and the condition is set to false. </prompt> </initial> <block> <goto next="#F2"/> </block> </form> <form id="F2"> <grammar type="text/gsl"> <![CDATA[ [dtmf-1] {<F_1 "SomeValue">} ]]> </grammar> <initial name="Initial_2" cond="true" expr=""> <prompt> this inital form item will get executed, as the expression is set to undefined and the condition is set to true pressing DTMF 1 will execute the enclosed field. </prompt> <nomatch count="1"> <prompt> Okay, I'll ask you for information one piece at a time. </prompt> <assign name="Initial_2" expr="true"/> <reprompt/> </nomatch> <noinput> <prompt> Okay, the quiet type, eh? I'll ask you for information one piece at a time. </prompt> <assign name="Initial_2" expr="true"/> <reprompt/> </noinput> </initial> <field name="F_1"> <prompt> try pressing DTMF 1.</prompt> </field> <filled> <prompt> congratulations, the initial test was successful.</prompt> </filled> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
| login |