|VoiceXML 2.1 Development Guide||Home | Frameset Home|
|cond||Data Type: CDATA||Default: Required|
|The cond attribute specifies any valid expression, which equates to the value to be evaluated.|
|<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/06/grammar">
<meta name="copyright" content="2012 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>
<prompt> who would win in a fist fight, Oprah, Madonna, or James Brown? </prompt>
<grammar xml:lang="en-us" root="myrule">
<item> Oprah </item>
<item> Madonna </item>
<item> James Brown </item>
You really think Oprah could duke it out with the Godfather of soul?
Madonna would get creamed, who do you think you are kidding?
James Brown would whip up on both Oprah and Madonna.
|ANNOTATIONS: EXISTING POSTS|
|Hey, I just noticed the usage is wrong on this one. :)|
I'm not sure that I grok what it is that you are saying, as the code example looks valid to me...can you expand on your statement please?
This is actually brian@inntec by the way, so don't hold Deke accountable for my half-fried ramblings.
Using some home-brew code generation techniques, I've auto-generated some neat tools (dozens and dozens of .net classes) by basically screen scraping your help documents. My tools rely on the usage (and by that I mean the slot at the top of your help documents where it says: usage) being correct, so any time one's wrong it's apparent.
This is the first one I've run into that gave me any trouble, so I thought I'd let you know.
The usage for this one is defined as: <elseIf />
But it should be something like <elseif cond="CDATA" />
And to be consitant with the rest of your docs, the cond would normally be defied.
The capitalization problem is apparently very important! In my code that used elseIf instead of elseif, the staging platform didn't throw an error and instead executed all the code as if there weren't any <else> blocks at all.
There are other places in your documentation that use elseIf instead of elseif, too. The children declarations for <if>, for starters -- my code wouldn't let me add an elseif to if, because elseif isn't a valid child ( elseIf is of course).
I realize I must sound like I have autism at the moment with this huge speil. I've been at this for awhile today. :)
I see your point; i have changed this element name in our most recent doc build, which should be live sometime in the next week or so.
|shouldn't cond be an attribute of <elseif>
Thanks for any explanation.
Yes, "cond" is an attribute of <elseif>. Thank you for bringing notice to this oversight in our documentation. The documentation fix will take effect in a few days.