<grammar>
It defines the set of rules that validates the user inputs and assigns string-valued variables that can be used in the application. Grammar specified can be inline, user-defined, or built-in. Built in types include boolean, date, digits, currency, number and phone.
Attributes:
|
fetchhint |
It can have two values safe and prefetch. Prefetch tells platform to fetch the document containing grammar before it is actually needed while safe downloads only while executing the document. |
|
fetchtimeout |
The time interval to wait for before throwing an error.badfetch event |
|
root |
Specifies the root rule for this grammar |
|
scope |
Defines the scope of the grammar |
|
src |
URI of the source location of the grammar elements. For built-in grammar the syntax is src=“builtin:grammar/<type>” |
|
type |
It refers to the grammar format. |
|
version |
Indicates the version of grammar definition language used. |
|
xml:lang |
Defines the language used in the grammar dictionary. |
|
maxage |
An integer value that indicates the maximum allowable age of the fetched documents in seconds. If the cached copy is older than the maxage value then a new copy will be fetched. |
|
maxstale |
An integer value which is added to the maxage and the resultant integer value indicates the maximum value in seconds, a stale content of the element can have after which it becomes invalid and can no longer be used. |
|
mode |
Can be voice or dtmf. If mode is voice then the speech recognizer will be activated else it is not. |
|
weight |
A number indicating the likelihood of the grammar element being activated by the user input or user interaction. |
|
parent |
choice, field, form, link, record, transfer |
|
children |
PCDATA, rule |
