| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| application | Data Type: CDATA | Default: Optional |
| The value of the application attribute is a URI used to specify the applications root document. When specified, all event handlers, variables, links, grammars, and scripts contained within the root document are considered active when each document loads. All variables declared within the root document are then considered to have application scope, and are available at any point in the application. | ||
| version | Data Type: (2.0|2.1) | Default: Optional |
The version attribute represents the VoiceXML version number. Note that specifying the version as '2.1' is required when using the new 2.1 elements, such as the data element. | ||
| xml:base | Data Type: CDATA | Default: Optional |
| The URI value of the xml:base attribute denotes the base URL of the document. All relative URI’s contained in the document are derived from the base attributes value. If unspecified, then the platform assumes that the current URI is the value of the base attribute. | ||
| xml:lang | Data Type: NMTOKEN | Default: Optional (en-US) |
| The xml:lang attribute specifies the language and locale information of the VoiceXML document. If omitted, it will inherit this value from the document hierarchy, or ultimately from the platform default, which equates to 'en-US'. | ||
| xmlns | Data Type: http://www.w3.org/2001/vxml | Default: http://www.w3.org/2001/vxml |
| The xmlns attribute defines the VoiceXML namespace; all tags and attributes belong to this namespace. If specifying the xmlns:nuance attribute in your code, this element will be filled in by default. | ||
| xmlns:voxeo | Data Type: http://community.voxeo.com/xmlns/vxml | Default: none - attribute is optional |
The 'xmlns:voxeo' attribute is a required setting that refers to the xml namespace used when a developer includes a voxeo extension element to the VXML specification, (such as <voxeo:recordcall>). This attribute value should always be specified as 'http://community.voxeo.com/xmlns/vxml' | ||
| <?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"/> <catch event="GlobalEvent"> <prompt> we caught a global event. </prompt> </catch> <form id="F1"> <block> <prompt> here is some text that will not be executed. </prompt> </block> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" application="AppRoot.vxml" xml:base="http://ThisServer/ThisDirectory/"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <block> <prompt> preparing to throw a global event, which will be caught by the application root document. </prompt> <throw event="GlobalEvent"/> </block> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
jasrags
|
|
| in :
code samples 2.-0 <AppRoot.vxml> <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.0" <----- Missing tailing ">" |
|
MattHenry
|
|
| Thanks for catching yet another typo for me; i have this fixed in the most recent build.
~Matt |
|
awirtz
|
|
| If you need to track down XML syntax errors in a VXML document, you might try adding the following DOCTYPE element and using an XML validator:
<!DOCTYPE vxml SYSTEM "http://www.w3.org/TR/voicexml21/vxml.dtd"> This tag should be placed after the <?xml?> tag and before the <vxml> tag in your document. There is a publicly available XML validator here: http://www.stg.brown.edu/service/xmlvalid/ (Note that the first 4 warnings it outputs are complaints about the DTD file at W3 and are not directed at your document. Ignore them.) |
|
codingace
|
|
| This is great for manually throwing an event, but what if a hangup or disconnect takes place? Is there a nice way to handle the catch event at the application level? | |
VoxeoDustin
|
|
| Hey,
There sure is. You'll simply need to create a root document that contains your <catch>. For example: root.vxml -------- <?xml version="1.0"?> <vxml version="2.1"> <catch event="connection.disconnect.hangup"> <!-- do our clean up --> <exit/> <!-- we absolutely MUST explicitly exit in any connection.disconnect handler to kill the session --> </catch> </vxml> leaf.vxml -------- <?xml version="1.0"?> <vxml version="2.1" application="root.vxml"> <!-- our code here --> </vxml> Note: The <catch> event must be scoped at the <vxml> level and that your leaf documents must have a voice reco field for the event to be caught. Thanks, Dustin |
|
jaffar
|
|
| i want to create a vxml file in that i want to validate the user three times..like first i want to confirm his name,pin,password..
can u please giv me the vxml code for that.... |
|
voxeojeremyr
|
|
| Hi,
We have lots of examples in our tutorials about things like this that you can find here: http://docs.voxeo.com/voicexml/2.0/learningvoicexml.htm But also, here is some sample code that should pint you in the right direction: <form> <field name = "name"> <prompt> What is the name? </prompt> <grammar type="application/grammar+xml" src= "name.grxml"/> </field> <field name = "pin" type="digits"> <prompt> What is your pin? </prompt> </field> <filled> <if cond = "pin != '1234'"> <prompt> That is the wrong pin </prompt> <reprompt/> <clear namelist = "pin"/> </if> </filled> </form> Thanks, Jeremy Richmond Voxeo Support |
| login |