# \<one-of>

## \<one-of> <a href="#one-of" id="one-of"></a>

A `<one-of>` block specifies a set of alternative legal rule expansions each of which is contained within an `<item>` block.

### Attributes

<table><thead><tr><th width="158.33333333333331">Name</th><th width="152">Data type<select><option value="3eaf261d7f994626817febda5aae2c60" label="String" color="blue"></option><option value="9117dc4f443a428fbd34730fe1200a24" label="Integer" color="blue"></option><option value="685a016a908c4273a224b77f7508e255" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>xml:lang</td><td><span data-option="3eaf261d7f994626817febda5aae2c60">String</span></td><td>(defaults to “xml:lang” global property or the “xml:lang” attribute of the &#x3C;grammar> tag) The language identifier as defined in <a href="http://www.ietf.org/rfc/rfc3066.txt">RFC3066</a>.</td></tr></tbody></table>

### Notes

For examples and usage information, please refer to the [Speech Recognition Grammar Specification](http://www.w3.org/TR/2002/CR-speech-grammar-20020626/).

### Example

```markup
<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="animal">
      <grammar type="application/srgs+xml" root="ROOT" mode="voice">
        <rule id="ROOT">
          <one-of>
            <item>Dog</item>
            <item>Cat</item>
          </one-of>
        </rule>
      </grammar>
      <prompt>
        Say either dog or cat.
      </prompt>
      <filled>
        <prompt>
          You said <value expr="animal"/>. Goodbye.
        </prompt>
        <exit/>
      </filled>
    </field>
  </form>
</vxml>
```

The output of the above script would be:

> Computer: Say either dog or cat.\
> Human: Dog.\
> Computer: You said dog. Goodbye.

### Child Tags

[\<item>](/dev/voicexml/tags/item-tag.md)

### Parent Tags

[\<item>](/dev/voicexml/tags/item-tag.md), [\<rule>](/dev/voicexml/tags/rule-tag.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plumvoice.com/dev/voicexml/tags/one-of-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
