GetVocal Voice Portal Technologies

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

VoiceXML Tag
 <rule>

Define grammar rule.

Parent Tags
<grammar>

Content Syntax
The value may be empty, or may contain one or more elements, where an element is either parsed text or one of the following tags.

<count> <example> <item> <one-of> <ruleref> <token>

Attributes
Name Req/opt Default Valid values
id Required Text
scope Optional "private" "private" "public"

Compatibility
VoiceXML 1.0 No, 2.0 Yes.

Description
The <rule> tag encloses a named rule in a grammar. The rule is assigned the name given in its id attribute.

A <ruleref> tag can be used to reference the rule name in the <ruleref>'s src attribute, this causes the rule to be inserted at that point in the grammar.

The <rule> tag defines a rule but does not insert it (like defining a subroutine), the <ruleref> tag inserts the rule (like calling a subroutine).
©  GetVocal, inc. All Rights Reserved.