Plum DEV Documentation


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


uri Specifes a local rule reference. Precede the local rule identifier with a “#” symbol.
type This attribute is not supported.
special Can be set to either “null” or “void”.
xml:lang (defaults to “xml:lang” global property or the “xml:lang” attribute of the <grammar> tag) The language identifier as defined in RFC3066.


For examples and usage information, please refer to the Speech Recognition Grammar Specification.


<?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">
            <ruleref uri="#month"/>
            <ruleref uri="#day"/>
          <tag> month = month.SWI_literal; day = day.SWI_literal; </tag>
        <rule id="month">
        <rule id="day">
      <prompt>Please say a date.</prompt>
        <prompt bargein="false">
          I think you said month <value expr="dt.month"/> 
          day <value expr=""/>.
        I'm sorry, I didn't catch that.

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


Parent Tags