| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<block> element as our defacto container element, which logically encloses executable code into easy-to-follow groupings. CallXML3.0 still uses this mantra of defining container elements, but we have added new naming conventions that better label the code to describe what the group of code actually does. All of these aliases are completely identical in form and function, and execute in the same manner:<block><case><do><if><switch><with><block> element, and only a <block> element. If our next container output audio, then moved on to another <block> that performed conditional logic, we would have three plain-vanilla <blocks> that worked, but weren't neccesarily descriptive, nor easy to follow when editing and tweaking:
<block label="looper">
<!-- content here -->
</block>
<block label="audio">
<!-- audio content here -->
</block>
<block label="if_else">
<!-- conditional logic here -->
</block>
<hl>do label="looper">
<!-- content here -->
</do>
<hl>with label="audio">
<!-- audio content here -->
</with>
<if label="if_else">
<!-- conditional logic here -->
</block>
</if>
<do label="RGB">
<playaudio value="you may choose red blue or green.wav"
say="you may choose red blue or green"
choices="red, blue, green"/>
<wait value="5s" choices="red, green, blue"/>
<log value="red blue or green"/>
<on event="choice:red">
<playaudio value="you chose.wav"
say="you chose"/>
<say>$session.lastchoice;</say>
</on>
<!-- etc -->
</do>
<do label="RGB" value="you may choose red green or blue.wav" choices="red, green, blue">
<playaudio/>
<wait value="5s"/>
<log/>
<on event="choice:red">
<playaudio value="you chose.wav"
say="you chose"/>
<say>$session.lastchoice;</say>
</on>
<!-- etc -->
</do>
<playaudio>, nor any 'choices' for the <wait> or any output for the <log> elements, because we didn't need to: As these are unspecified, the container element will fill in the blanks for us, and save us quite a bit of time when coding our real-world application.| ANNOTATIONS: EXISTING POSTS |
lavanyasubbu
|
|
| Spelling mistake
"wich allows us to set a variable value once" |
|
VoxeoBrian
|
|
| Hello,
Thanks for the catch, I will make sure our document keepers are aware. We will close this ticket out at this time. Regards, Brian F. |
|
revmobile
|
|
| Below:
Now, let's take a look at how we can use the aliases to make things a bit cleaner: You have an unneeded </block> before the closing </if> |
| login |
|