Root Document

Root Document

Root documents can be used to pass variables from one VoiceXML page to another VoiceXML page. Root documents are specified per VoiceXML script and are themselves a VoiceXML script. Any variables defined in the root document will be carried between all your documents. Any assignments to those variables in a given script are preserved so long as the next document that gets transitioned to also includes the same root document.

You can also use the root document to set global catch handlers and global default properties for your application. Suppose you want your entire application to allow the user to have 3 seconds in between their entering of data. It would be tedious to enter this code in your application at every point the user enters data. Also, if you had a generic message for when the user enters no input or incorrect data, you could set up your "noinput" and "nomatch" catch handlers globally in your root document.

Related links

Related terms

for "Root Document"

Search Glossary

Term of the Day

The maxspeechtimeout property indicates the maximum duration of users speech input.
See also: Property, Tag, VoiceXML