Last reviewed: 3/23/2024 8:49:31 AM
In this article
<one-of>
A <one-of> element identifies a set of alternative elements. Each alternative expansion is contained in a <item> element. There must be at least one <item> element contained within a one-of element.
Syntax
<one-of> </one-of>
Attributes
xml:lang
Indicates the primary language contained by the grammar and optionally indicates a country.
Children
Parents
Example
The following example illustrates using a one-of element.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd">
<grammar xmlns="http://www.w3.org/2001/06/grammar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
xml:lang="En" version="1.0" mode="voice" >
<rule id="city">
<one-of>
<item>Atlanta</item>
<item>Miami</item>
<item>New York</item>
</one-of>
</rule>
</grammar>