GetVocal Voice Portal Technologies

[1.0 to 2.0][Tags][Attributes][Variables][Events][Properties]

VoiceXML Tag
 <ruleref>

Insert grammar rule.

Parent Tags
<count> <item> <rule>

Content Syntax
The value must be empty.

Attributes
Name Req/opt Default Valid values
import Optional Text
special Optional Text
tag Optional Text
uri Optional Text
xml:lang Optional Text

Compatibility
VoiceXML 1.0 No, 2.0 Yes.

Description
The <ruleref> tag inserts a rule into a grammar. The rule is defined elsewhere using the <rule> tag. The rule can be defined by giving a URL in the id attribute, an alias in the import attribute or a special rule in the special attribute.

The uri attribute of <ruleref> must match the id attribute of the <rule>.

The rule may be found in the same grammar by using the fragment notation "#rulename" for the URL.

The rule may be found in an external grammar, i.e. a grammar in a different file, by using the notation "grammarURL#rulename".

If no rulename is specified, the root rule for the grammar is assumed.

Note that SRGF does not permit more than one grammar to be specified per file, the fragment notation refers to a rule within a grammar, not a grammar within a page.

For an explanation of import aliases, see the <import> tag.

Special rules which can be named in the special attribute include "#VOID", which never matches, "#NULL", which always matches, and "#GARBAGE", which matches any part of an utterance.
©  GetVocal, inc. All Rights Reserved.