| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| <?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> who would win in a fist fight, Oprah, Madonna, or James Brown? </prompt> <grammar type="text/gsl">[ oprah madonna (james brown) ] </grammar> <filled> <if cond="F_1=='oprah'"> <prompt> you really think Oprah could duke it out with the Godfather of soul? </prompt> <elseif cond="F_1=='madonna'"/> <prompt> madonna would get creamed, who do you think you are kidding? </prompt> <else/> <prompt> James Brown would whip up on both Oprah and Madonna </prompt> </if> </filled> </field> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
Deke
|
|
| Hey, I just noticed the usage is wrong on this one. :) | |
MattHenry
|
|
| Hiya Deke,
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? Thanks! ~Matt |
|
Deke
|
|
| Sure. :)
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. :) |
|
MattHenry
|
|
| Hiya Brian,
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. Thanks! ~Matt |
| login |