<token>

New in VoiceXML 2.0. XML grammar input element that specifies actual words to be spoken or DTMF keys to be pressed.

Syntax

 <token
     xml:lang="lang"
 >
   Content
 </token>

Description

This tag is used to define grammars in the XML form of the W3C Speech Recognition Grammar Format.

In a voice grammar, a token is consists of CDATA and cannot be enclosed in double quotes. In a DTMF grammar, a token must be one of the following characters:

 0 1 2 3 4 5 6 7 8 9 * # A B C D

Attribute Description
xml:lang

The language and optional country local identifier for the token. Optional (default is the language of the enclosing element).

The accepted language identifiers are:

 •  en--English
 •  en-US--United States English
 •  es--Spanish
 •  es-US--United States Spanish
 •  fr-ca--French Canadian

If an unsupported language is specified, an error.unsupported.language event is thrown.

Usage

Parents Children
<rule>
<item>

None.

See Also

 •  Speech Recognition Grammar Specification: <token>
 •  Chapter  4, XML Speech Grammar Format in the Grammar Reference

Example

 <rule id="trigger">
   <ruleref special="GARBAGE"/>
   <token>Trigger Fish</token>
 </rule>
 
 <rule id="affirmative">
   <token>yes</token>
   <token xml:lang="es">si</token>
 </rule>

[Show Frames]   [FIRST] [PREVIOUS] [NEXT]
BeVocal, Inc. Café Home | Developer Agreement | Privacy Policy | Site Map | Terms & Conditions
Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL