| CallXML 3.0 Development Guide | Home | Frameset Home |
| id | Data Type: (element id) | Default: none - attribute is optional |
The new 'id' attribute in CallXML3.0 is applicable to all container and action elements. Specifying this attribute allows yet another level of control and event handling when events occur and are caught by the <on> element. When an event occurs, the handler will first check the event, and then verify that the handler has a handler specific to the 'id' attribute to execute. This allows the developer to plan a specific course of action for events based on where in the application that they occur. | ||
| test | Data Type: CDATA | Default: Optional |
| The 'test' attribute is a new supplement to the CallXML markup that permits the developer to execute the contents of a container element, or action element, based on whether or not the specified condition is met. If the defined condition is met, then the code contained within the element is then executed. If the condition is not met, then the application resumes execution with the next sequential container container element in the document. | ||
| value-is | Data Type: STRING | Default: none - attribute is optional |
| Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution. | ||
| value-is-not | Data Type: STRING | Default: none - attribute is optional |
| Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution. | ||
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> Enter four digits here. </prompt> <getdigits var="Var_1" maxdigits="3" includetermdigit="true"/> <on event="maxdigits"> <say> say, you must have pressed $Var_1; </say> <goto value="#B2"/> </on> </do> <do label="B2" value="foo"> <!-- if we do *not* include a cleardigits element --> <!-- the fourth keypress from B1 will automatically --> <!-- populate the getdigits field in this block --> <!-- this will execute, because foo is equal to foo --> <cleardigits value-is="foo"/> <!-- this will also execute,(redundantly) because --> <!-- foo is not equal to bar --> <cleardigits value-is-not="bar"/> <!-- neither of these would execute at all --> <!-- <cleardigits value-is="bar"/> <cleardigits value-is-not="foo"/> --> <prompt> Enter 1 digit here. </prompt> <getdigits var="Var_2" maxdigits="1" includetermdigit="true"/> <on event="maxdigits"> <say> second get digits filled with a value of $Var_2; </say> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> Enter four digits here. </prompt> <getdigits var="Var_1" maxdigits="3" includetermdigit="true"/> <on event="maxdigits"> <say> say, you must have pressed $Var_1; </say> <goto value="#B2"/> </on> </do> <do label="B2"> <!-- if we do *not* include a cleardigits element --> <!-- the fourth keypress from B1 will automatically --> <!-- populate the getdigits field in this block --> <!-- this will execute, because '1' is equal to '1' --> <cleardigits test="1 = 1"/> <!-- this will also execute,(redundantly) because --> <!-- '1' is not equal to '2' --> <cleardigits test="1 != 2"/> <!-- neither of these would execute at all --> <!-- <cleardigits test="1=2"/> <cleardigits test="'foo' = 'bar'"/> --> <prompt> Enter 1 digit here. </prompt> <getdigits var="Var_2" maxdigits="1" includetermdigit="true"/> <on event="maxdigits"> <say> second get digits filled with a value of $Var_2; </say> </on> </do> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
| login |