> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/dev/voicexml/tags/ruleref-tag.md).

# \<ruleref>

## \<ruleref> <a href="#ruleref" id="ruleref"></a>

A `<ruleref>` tag can reference another defined rule within the same local grammar.

#### Attributes <a href="#attributes" id="attributes"></a>

<table><thead><tr><th width="155.33333333333331">Name</th><th width="163">Data type<select><option value="36a86116bfdc42248240060d7349f435" label="String" color="blue"></option><option value="c247de96100c4034881ff630ebaf5b7d" label="Integer" color="blue"></option><option value="c8e3ead3c4e04878897394824f811b26" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>uri</td><td><span data-option="36a86116bfdc42248240060d7349f435">String</span></td><td>Specifies a local rule reference. Precede each reference with “#” (e.g., "#month", "#day").</td></tr><tr><td>type</td><td></td><td>This attribute is not supported.</td></tr><tr><td>special</td><td><span data-option="36a86116bfdc42248240060d7349f435">String</span></td><td>Can be set to either “null” or “void”.</td></tr><tr><td>xml:lang</td><td><span data-option="36a86116bfdc42248240060d7349f435">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 id="start">
    <field name="dt">
      <grammar root="main" type="application/srgs+xml" mode="voice">
        <rule id="main" scope="public">
          <item>
            <ruleref uri="#month"/>
            <ruleref uri="#day"/>
          </item>
          <tag> month = month.SWI_literal; day = day.SWI_literal; </tag>
        </rule>
      
        <rule id="month">
          <one-of>
            <item>May</item>
            <item>June</item>
            <item>October</item>
          </one-of>
        </rule>
      
        <rule id="day">
          <one-of>
            <item>first</item>
            <item>second</item>
            <item>third</item>
          </one-of>
        </rule>      
      </grammar>
      
      <prompt>Please say a date.</prompt>
      
      <filled>
        <prompt bargein="false">
          I think you said month <value expr="dt.month"/> 
          day <value expr="dt.day"/>.
        </prompt>
      </filled>
      
      <nomatch>
        I'm sorry, I didn't catch that.
        <reprompt/>
      </nomatch>
    </field>
  </form>
</vxml>
```

The output of the above script would be:

> Computer: Please say a date.\
> Human: June second.\
> Computer: I think you said month June day second.

### Child Tags

None

### Parent Tags

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/ruleref-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.
