<!ELEMENT item (%rule-expansion; | tag)* > <!ATTLIST item weight NMTOKEN #IMPLIED repeat CDATA #IMPLIED xml:lang NMTOKEN #IMPLIED >
repeat : CDATA
Specifies that the contents of this item may be heard repeatedly. The permissible patterns of repeat may be expressed as in Table 3-2.
tag : CDATA (deprecated)
In the early version of the VoiceXML 2.0 Specification the tag attribute represented an expression to be interpreted if this item element's rule-expansion is matched. This is typically an ECMAScript expression.
weight : NMTOKEN
Specifies the expected probability of this item's rule-expansion being spoken. This is used to provide a hint to the speech recognition engine.
xml:lang : NMTOKEN
Specifies the spoken language used with this element. For example, en-US for US English.
A rule-expansion
To be enumerated within a one-of element.
<?xml version="1.0" encoding="iso-8859-1"?> <vxml version="2.0"> <form id="test"> <field name="favcolor"> <prompt>What is your favorite color?</prompt> <grammar xml:lang="en-US" version="1.0" root="colors"> <rule id="colors" scope="public"> <one-of> <item><tag>red</tag>red</item> <item weight="0.5"><tag>red</tag>burgundy</item> <item><tag>blue</tag>blue</item> <item weight="0.5"><tag>blue</tag>indigo</item> <item><tag>green</tag>green</item> </one-of> </rule> </grammar> <filled> <prompt> You said <value expr="favcolor"/>. </prompt> </filled> </field> </form> </vxml> |
An example of the deprecated form of item where the tag attribute is used is shown for the grammar element in 3.20, “grammar,”.
Though the count element is now deprecated, on many interpreters, the count element (Example 3-28) is still the only way to indicate a repeat or an optional rule expansion.
3.145.35.194