Contents:



XML Schema: GRAMMAR

Quick-links: [Elements] [Attributes] [Source]

This schema describes the SAPI 5.0 SR Command and Control grammar format which is based on the XML framework. The schema is included in the speech grammar compiler tool (gramcomp.exe or gc.exe) and does not need to be included in your grammar files. It is provided as a reference document. NOTE: This schema is based on the Microsoft schema language and is not fully W3C compliant. This schema will be rewritten and will be compliant with the W3C standard once it has been approved by the W3C.

This schema describes the following elements and attributes:

Elements

Attributes

Element-specific Attributes

<DEFINE>
<DICTATION>
<GRAMMAR> (document element)
<ID>
<L>
<LIST>
<O>
<OPT>
<P>
<PHRASE>
<RESOURCE>
<RULE>
<RULEREF>
<TEXTBUFFER>
<WILDCARD>

DISP
DYNAMIC
EXPORT
ID
INTERPRETER
LANGID
LEXDELIMITER
MAX
MIN
NAME
OBJECT
PRON
PROPID
PROPNAME
REFID
TOPLEVEL
URL
VAL
VALSTR
WEIGHT
WORDTYPE

 

Document conventions:

  • [] - optional
  • []* - zero or more times
  • + - one or more times

GRAMMAR Elements

<DEFINE>

The DEFINE tag contains a group of ID tags.

syntax:

<DEFINE >

 

(many)

 

<ID> +

</DEFINE>

content:

eltOnly

order:

many (default)

parents:

GRAMMAR

children:

ID

attributes:

(none)

model:

open

source:

<ElementType name="DEFINE" content="eltOnly" model="open">
         <description>The DEFINE tag contains a group of ID tags.</description>
         <element type="ID" minOccurs="1" maxOccurs="*"/>
</ElementType>

<DICTATION>

Specifies that the recognized phrase should match at least MIN and at most MAX words from the dictation grammar. The DICTATION tag may contain an associated semantic tag (name/value pair) which will be returned if the DICTATION tag is recognized.

syntax:

<DICTATION

 [

MAX = string ]

 [

MIN = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

/>

content:

empty

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

(none)

attributes:

MAX, MIN, PROPID, PROPNAME

model:

open

source:

<ElementType name="DICTATION" content="empty" model="open">
         <description>Specifies that the recognized phrase should match at least MIN and at most MAX words from the dictation grammar. The DICTATION tag may contain an associated semantic tag (name/value pair) which will be returned if the DICTATION tag is recognized.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="MIN"/>
         <attribute type="MAX"/>
</ElementType>

<GRAMMAR>

The top-level XML element containing all other XML elements needed to declare one Command and Control grammar.

syntax:

<GRAMMAR

 

LANGID = int

 [

LEXDELIMITER = string ]

 [

WORDTYPE = BSTR ]

>

 

(many)

<DEFINE> ]

 

<RULE> +

</GRAMMAR>

content:

eltOnly

order:

many (default)

parents:

No parents found. This is probably the document element.

children:

DEFINE, RULE

attributes:

LANGID, LEXDELIMITER, WORDTYPE

model:

closed

source:

<ElementType name="GRAMMAR" content="eltOnly" model="closed">
         <description>The top-level XML element containing all other XML elements needed to declare one Command and Control grammar.</description>
         <attribute type="LANGID"/>
         <attribute type="WORDTYPE"/>
         <attribute type="LEXDELIMITER"/>
         <element type="DEFINE" minOccurs="0" maxOccurs="1"/>
         <element type="RULE" minOccurs="1" maxOccurs="*"/>
</ElementType>

<ID>

The ID tag defines named constants for rule ID, property value, and property ID elements.

syntax:

<ID

 [

NAME = string ]

 [

VAL = string ]

/>

content:

empty

order:

one

parents:

DEFINE

children:

(none)

attributes:

NAME, VAL

model:

open

source:

<ElementType name="ID" content="empty" model="open" order="one">
         <description> The ID tag defines named constants for rule ID, property value, and property ID elements.</description>
         <attribute type="NAME"/>
         <attribute type="VAL"/>
</ElementType>

<L>

Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the LIST tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.

syntax:

<L

 [

PROPID = string ]

 [

PROPNAME = string ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

</L>

content:

eltOnly

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

PROPID, PROPNAME

model:

open

source:

<ElementType name="L" content="eltOnly" model="open">
         <description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the LIST tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<LIST>

Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the L tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.

syntax:

<LIST

 [

PROPID = string ]

 [

PROPNAME = string ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

</LIST>

content:

eltOnly

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

PROPID, PROPNAME

model:

open

source:

<ElementType name="LIST" content="eltOnly" model="open">
         <description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the L tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<O>

This element is similar to the P element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the OPT tag.

syntax:

<O

 [

DISP = string ]

 [

MAX = string ]

 [

MIN = string ]

 [

PRON = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

VAL = string ]

 [

VALSTR = string ]

 [

WEIGHT = float ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<O> ] *

<OPT> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

 

mixed content

</O>

content:

mixed

order:

many (default)

parents:

O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, O, OPT, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

DISP, MAX, MIN, PRON, PROPID, PROPNAME, VAL, VALSTR, WEIGHT

model:

open

source:

<ElementType name="O" content="mixed" model="open">
         <description>This element is similar to the P element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the OPT tag. </description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="VAL"/>
         <attribute type="VALSTR"/>
         <attribute type="PRON"/>
         <attribute type="DISP"/>
         <attribute type="MIN"/>
         <attribute type="MAX"/>
         <attribute type="WEIGHT"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="O" minOccurs="0" maxOccurs="*"/>
         <element type="OPT" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<OPT>

This element is similar to the PHRASE element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the O tag.

syntax:

<OPT

 [

DISP = string ]

 [

MAX = string ]

 [

MIN = string ]

 [

PRON = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

VAL = string ]

 [

VALSTR = string ]

 [

WEIGHT = float ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<O> ] *

<OPT> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

 

mixed content

</OPT>

content:

mixed

order:

many (default)

parents:

O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, O, OPT, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

DISP, MAX, MIN, PRON, PROPID, PROPNAME, VAL, VALSTR, WEIGHT

model:

open

source:

<ElementType name="OPT" content="mixed" model="open">
         <description>This element is similar to the PHRASE element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the O tag.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="VAL"/>
         <attribute type="VALSTR"/>
         <attribute type="PRON"/>
         <attribute type="DISP"/>
         <attribute type="MIN"/>
         <attribute type="MAX"/>
         <attribute type="WEIGHT"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="O" minOccurs="0" maxOccurs="*"/>
         <element type="OPT" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<P>

This element is used to describe the Phrase element. It is a synonym of the PHRASE element. An associated property name and value pair will be generated only if the contents of this element are recognized. It is important to note that a P empty element is not allowed.

syntax:

<P

 [

DISP = string ]

 [

MAX = string ]

 [

MIN = string ]

 [

PRON = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

VAL = string ]

 [

VALSTR = string ]

 [

WEIGHT = float ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<O> ] *

<OPT> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

 

mixed content

</P>

content:

mixed

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, O, OPT, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

DISP, MAX, MIN, PRON, PROPID, PROPNAME, VAL, VALSTR, WEIGHT

model:

open

source:

<ElementType name="P" content="mixed" model="open">
         <description> This element is used to describe the Phrase element. It is a synonym of the PHRASE element. An associated property name and value pair will be generated only if the contents of this element are recognized. It is important to note that a P empty element is not allowed.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="VAL"/>
         <attribute type="VALSTR"/>
         <attribute type="PRON"/>
         <attribute type="DISP"/>
         <attribute type="MIN"/>
         <attribute type="MAX"/>
         <attribute type="WEIGHT"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="O" minOccurs="0" maxOccurs="*"/>
         <element type="OPT" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<PHRASE>

This element is used to describe the Phrase element. It is a synonym of the P element. An associated property name and value pair will be generated only if the contents of this element are recognized.It is important to note that an empty PHRASE element is not allowed. Attributes may not be empty.

syntax:

<PHRASE

 [

DISP = string ]

 [

MAX = string ]

 [

MIN = string ]

 [

PRON = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

VAL = string ]

 [

VALSTR = string ]

 [

WEIGHT = float ]

>

 

(many)

<RULEREF> ] *

<PHRASE> ] *

<P> ] *

<L> ] *

<LIST> ] *

<O> ] *

<OPT> ] *

<TEXTBUFFER> ] *

<WILDCARD> ] *

<DICTATION> ] *

 

mixed content

</PHRASE>

content:

mixed

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

DICTATION, L, LIST, O, OPT, P, PHRASE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

DISP, MAX, MIN, PRON, PROPID, PROPNAME, VAL, VALSTR, WEIGHT

model:

open

source:

<ElementType name="PHRASE" content="mixed" model="open">
         <description> This element is used to describe the Phrase element. It is a synonym of the P element. An associated property name and value pair will be generated only if the contents of this element are recognized.It is important to note that an empty PHRASE element is not allowed. Attributes may not be empty.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="VAL"/>
         <attribute type="VALSTR"/>
         <attribute type="PRON"/>
         <attribute type="DISP"/>
         <attribute type="MIN"/>
         <attribute type="MAX"/>
         <attribute type="WEIGHT"/>
         <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
         <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
         <element type="P" minOccurs="0" maxOccurs="*"/>
         <element type="L" minOccurs="0" maxOccurs="*"/>
         <element type="LIST" minOccurs="0" maxOccurs="*"/>
         <element type="O" minOccurs="0" maxOccurs="*"/>
         <element type="OPT" minOccurs="0" maxOccurs="*"/>
         <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
         <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
         <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>

<RESOURCE>

Specifies the grammar node is a grammar located in a standard Windows Resource grammar.

syntax:

<RESOURCE

 [

NAME = string ]

/>

content:

empty

order:

many (default)

parents:

RULE

children:

(none)

attributes:

NAME

model:

open

source:

<ElementType name="RESOURCE" content="empty" model="open">
         <description> Specifies the grammar node is a grammar located in a standard Windows Resource grammar.</description>
         <attribute type="NAME"/>
</ElementType>

<RULE>

This element describes the non-terminal RULE element. The contents must be non-empty concatenated recognition contents. Left recursion is not legal in a grammar. It is required that either the NAME or ID attribute is specified. If both are specified, then they must agree. All RULE NAMEs and VALs should be unique. Dynamic rules may not be exported.

syntax:

<RULE

 [

DYNAMIC = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

 [

EXPORT = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

 [

ID = string ]

 [

INTERPRETER = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

 [

NAME = string ]

 [

TOPLEVEL = enumeration: INACTIVE | ACTIVE ]

>

 

(many)

 

many

 

<RULEREF>

 

<PHRASE>

 

<P>

 

<L>

 

<LIST>

 

<O>

 

<OPT>

 

<TEXTBUFFER>

 

<WILDCARD>

 

<DICTATION>

 

<RESOURCE>

 

*

</RULE>

content:

eltOnly

order:

many (default)

parents:

GRAMMAR

children:

DICTATION, L, LIST, O, OPT, P, PHRASE, RESOURCE, RULEREF, TEXTBUFFER, WILDCARD

attributes:

DYNAMIC, EXPORT, ID, INTERPRETER, NAME, TOPLEVEL

model:

open

source:

<ElementType name="RULE" content="eltOnly" model="open">
         <description> This element describes the non-terminal RULE element. The contents must be non-empty concatenated recognition contents. Left recursion is not legal in a grammar. It is required that either the NAME or ID attribute is specified. If both are specified, then they must agree. All RULE NAMEs and VALs should be unique. Dynamic rules may not be exported.</description>
         <attribute type="NAME"/>
         <attribute type="ID"/>
         <attribute type="TOPLEVEL"/>
         <attribute type="EXPORT"/>
         <attribute type="INTERPRETER"/>
         <attribute type="DYNAMIC"/>
         <group order="many" minOccurs="0" maxOccurs="*">
                 <element type="RULEREF"/>
                 <element type="PHRASE"/>
                 <element type="P"/>
                 <element type="L"/>
                 <element type="LIST"/>
                 <element type="O"/>
                 <element type="OPT"/>
                 <element type="TEXTBUFFER"/>
                 <element type="WILDCARD"/>
                 <element type="DICTATION"/>
                 <element type="RESOURCE"/>
         </group>
</ElementType>

<RULEREF>

This element describes the RULEREF tag which is non-terminal. It is used inside the contents of a rule definition (RULE) to reference another defined rule. The RULEREF tag may contain a semantic property (name/value pair) which will be returned if the rule is recognized.

syntax:

<RULEREF

 [

NAME = string ]

 [

OBJECT = string ]

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

REFID = string ]

 [

URL = string ]

 [

VAL = string ]

 [

VALSTR = string ]

 [

WEIGHT = float ]

/>

content:

empty

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

(none)

attributes:

NAME, OBJECT, PROPID, PROPNAME, REFID, URL, VAL, VALSTR, WEIGHT

model:

open

source:

<ElementType name="RULEREF" content="empty" model="open">
         <description>This element describes the RULEREF tag which is non-terminal.  It is used inside the contents of a rule definition (RULE) to reference another defined rule. The RULEREF tag may contain a semantic property (name/value pair) which will be returned if the rule is recognized.</description>
         <attribute type="NAME"/>
         <attribute type="REFID"/>
         <attribute type="OBJECT"/>
         <attribute type="URL"/>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="VAL"/>
         <attribute type="VALSTR"/>
         <attribute type="WEIGHT"/>
</ElementType>

<TEXTBUFFER>

Specifies the grammar is from a text buffer, to be specified at runtime by the application. See also ISpRecoGrammar::SetWordSequenceData and ISpRecoGrammar::SetTextSelection.

syntax:

<TEXTBUFFER

 [

PROPID = string ]

 [

PROPNAME = string ]

 [

WEIGHT = float ]

/>

content:

empty

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

(none)

attributes:

PROPID, PROPNAME, WEIGHT

model:

open

source:

<ElementType name="TEXTBUFFER" content="empty" model="open">
         <description>Specifies the grammar is from a text buffer, to be specified at runtime by the application. See also ISpRecoGrammar::SetWordSequenceData and ISpRecoGrammar::SetTextSelection.</description>
         <attribute type="PROPNAME"/>
         <attribute type="PROPID"/>
         <attribute type="WEIGHT"/>
</ElementType>

<WILDCARD>

Specifies a garbage word identifier for one or more non-silence sounds. The garbage word may be recognized by the Speech Recognition engine, but will NOT be returned to the application.

syntax:

<WILDCARD />

content:

empty

order:

many (default)

parents:

L, LIST, O, OPT, P, PHRASE, RULE

children:

(none)

attributes:

(none)

model:

open

source:

<ElementType name="WILDCARD" content="empty" model="open">
         <description>Specifies a garbage word identifier for one or more non-silence sounds. The garbage word may be recognized by the Speech Recognition engine, but will NOT be returned to the application.</description>
</ElementType>

GRAMMAR Attributes

<... DISP="">

Specifies the display form for the given phrase tag.

syntax:

[ DISP = string ]

required:

no

datatype:

string

elements:

PHRASE, P, OPT, O

source:

<AttributeType name="DISP" dt:type="string" required="no">
         <description>Specifies the display form for the given phrase tag.</description>
</AttributeType>

<... DYNAMIC="">

Specifies that the rule can be updated (dynamically) at runtime by using the ISpGrammarBuilder API.

syntax:

[ DYNAMIC = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

required:

no

datatype:

enumeration

values:

0 | NO | FALSE | 1 | YES | TRUE

default:

"0"

elements:

RULE

source:

<AttributeType name="DYNAMIC" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
         <description>Specifies that the rule can be updated (dynamically) at runtime by using the ISpGrammarBuilder API.</description>
</AttributeType>

<... EXPORT="">

Specifies that the rule is exportable (i.e. can be loaded by an external grammar). By default, all grammars are not exportable. Dynamic rules or rules that reference dynamic rules cannot be exported.

syntax:

[ EXPORT = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

required:

no

datatype:

enumeration

values:

0 | NO | FALSE | 1 | YES | TRUE

default:

"0"

elements:

RULE

source:

<AttributeType name="EXPORT" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
         <description>Specifies that the rule is exportable (i.e. can be loaded by an external grammar). By default, all grammars are not exportable. Dynamic rules or rules that reference dynamic rules cannot be exported.</description>
</AttributeType>

<... ID="">

Specifies the numeric identifier that will be associated with a rule.

syntax:

[ ID = string ]

required:

no

datatype:

string

elements:

RULE

source:

<AttributeType name="ID" dt:type="string" required="no">
         <description>Specifies the numeric identifier that will be associated with a rule.</description>
</AttributeType>

<... INTERPRETER="">

Specifies that the rule should use the CFG-interpreter. See also the interface, ISpCFGInterpreter.

syntax:

[ INTERPRETER = enumeration: 0 | NO | FALSE | 1 | YES | TRUE ]

required:

no

datatype:

enumeration

values:

0 | NO | FALSE | 1 | YES | TRUE

default:

"0"

elements:

RULE

source:

<AttributeType name="INTERPRETER" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
         <description>Specifies that the rule should use the CFG-interpreter. See also the interface, ISpCFGInterpreter.</description>
</AttributeType>

<... LANGID="">

Defines the language ID of the XML grammar. If not specified, the grammar's LangID will default to the current user's UI language. The Speech Recognition engine must support the grammar's language Id for the grammar to successfully be loaded.

syntax:

LANGID = int

required:

yes

datatype:

int

elements:

GRAMMAR

source:

<AttributeType name="LANGID" dt:type="int" required="yes">
         <description>Defines the language ID of the XML grammar. If not specified, the grammar's LangID will default to the current user's UI language. The Speech Recognition engine must support the grammar's language Id for the grammar to successfully be loaded.</description>
</AttributeType>

<... LEXDELIMITER="">

Specifies the delimiter that SAPI should use to separate an explicit lexicon entry in the grammar. The format is "LEXDELIMITER DisplayForm LEXDELIMITER LexicalForm LEXDELIMITER Pronunciation ;"

syntax:

[ LEXDELIMITER = string ]

required:

no

datatype:

string

default:

"/"

elements:

GRAMMAR

source:

<AttributeType name="LEXDELIMITER" dt:type="string" default="/" required="no">
         <description>Specifies the delimiter that SAPI should use to separate an explicit lexicon entry in the grammar. The format is "LEXDELIMITER DisplayForm LEXDELIMITER LexicalForm LEXDELIMITER Pronunciation ;"</description>
</AttributeType>

<... MAX="">

The default value for this is 1. The valid range of values for this is 1 to 255, or indicated by "INF" in text. This value indicates the maximum number of times valid recognitions of this element's contents may be recognized repeatedly. A value "INF" indicates that any number of recognitions may occur.

syntax:

[ MAX = string ]

required:

no

datatype:

string

default:

"1"

elements:

PHRASE, P, OPT, O, DICTATION

source:

<AttributeType name="MAX" dt:type="string" default="1" required="no">
         <description> The default value for this is 1. The valid range of values for this is 1 to 255, or indicated by "INF" in text. This value indicates the maximum number of times valid recognitions of this element's contents may be recognized repeatedly. A value "INF" indicates that any number of recognitions may occur. </description>
</AttributeType>

<... MIN="">

The default value for this is 1. The valid range of values for this is 0 to 255 and must be less than the value specified in MAX. Note: The value specified by MAX will be used when the specified MIN value is greater than the MAX value.

syntax:

[ MIN = string ]

required:

no

datatype:

string

default:

"1"

elements:

PHRASE, P, OPT, O, DICTATION

source:

<AttributeType name="MIN" dt:type="string" default="1" required="no">
         <description> The default value for this is 1. The valid range of values for this is 0 to 255 and must be less than the value specified in MAX. Note:  The value specified by MAX will be used when the specified MIN value is greater than the MAX value.  </description>
</AttributeType>

<... NAME="">

Specifies the string identifier that will be associated with a rule.

syntax:

[ NAME = string ]

required:

no

datatype:

string

elements:

ID, RULE, RULEREF, RESOURCE

source:

<AttributeType name="NAME" dt:type="string" required="no">
         <description>Specifies the string identifier that will be associated with a rule.</description>
</AttributeType>

<... OBJECT="">

Specifies the programmatic identifier (ProgID) of the COM object which contains either the CFG interpreter or grammar rule.

syntax:

[ OBJECT = string ]

required:

no

datatype:

string

elements:

RULEREF

source:

<AttributeType name="OBJECT" dt:type="string" required="no">
         <description>Specifies the programmatic identifier (ProgID) of the COM object which contains either the CFG interpreter or grammar rule.</description>
</AttributeType>

<... PRON="">

Specifies the pronunciation for the given phrase tag.

syntax:

[ PRON = string ]

required:

no

datatype:

string

elements:

PHRASE, P, OPT, O

source:

<AttributeType name="PRON" dt:type="string" required="no">
         <description>Specifies the pronunciation for the given phrase tag.</description>
</AttributeType>

<... PROPID="">

Specifies the numeric identifier to be associated with the semantic property (name/value pair).

syntax:

[ PROPID = string ]

required:

no

datatype:

string

elements:

PHRASE, P, OPT, O, L, LIST, RULEREF, DICTATION, TEXTBUFFER

source:

<AttributeType name="PROPID" dt:type="string" required="no">
         <description>Specifies the numeric identifier to be associated with the semantic property (name/value pair).</description>
</AttributeType>

<... PROPNAME="">

Specifies the string identifier to be associated with the semantic property (name/value pair).

syntax:

[ PROPNAME = string ]

required:

no

datatype:

string

elements:

PHRASE, P, OPT, O, L, LIST, RULEREF, DICTATION, TEXTBUFFER

source:

<AttributeType name="PROPNAME" dt:type="string" required="no">
         <description>Specifies the string identifier to be associated with the semantic property (name/value pair).</description>
</AttributeType>

<... REFID="">

Specifies the numeric identifier associated with the rule to be referenced.

syntax:

[ REFID = string ]

required:

no

datatype:

string

elements:

RULEREF

source:

<AttributeType name="REFID" dt:type="string" required="no">
         <description>Specifies the numeric identifier associated with the rule to be referenced.</description>
</AttributeType>

<... TOPLEVEL="">

Specifies that the rule is a top-level rule. The value, "ACTIVE" or "INACTIVE" specifies whether the rule is to be active by default.

syntax:

[ TOPLEVEL = enumeration: INACTIVE | ACTIVE ]

required:

no

datatype:

enumeration

values:

INACTIVE | ACTIVE

default:

"INACTIVE"

elements:

RULE

source:

<AttributeType name="TOPLEVEL" dt:type="enumeration" dt:values="INACTIVE ACTIVE" default="INACTIVE" required="no">
         <description>Specifies that the rule is a top-level rule. The value, "ACTIVE" or "INACTIVE" specifies whether the rule is to be active by default.</description>
</AttributeType>

<... URL="">

Specifies the uniform resource locator (URL) address of the grammar to be referenced.

syntax:

[ URL = string ]

required:

no

datatype:

string

elements:

RULEREF

source:

<AttributeType name="URL" dt:type="string" required="no">
         <description>Specifies the uniform resource locator (URL) address of the grammar to be referenced.</description>
</AttributeType>

<... VAL="">

Specifices the numeric value to be associated with the semantic property (name/value pair).

syntax:

[ VAL = string ]

required:

no

datatype:

string

elements:

ID, PHRASE, P, OPT, O, RULEREF

source:

<AttributeType name="VAL" dt:type="string" required="no">
         <description>Specifices the numeric value to be associated with the semantic property (name/value pair).</description>
</AttributeType>

<... VALSTR="">

Specifices the string value to be associated with the semantic property (name/value pair).

syntax:

[ VALSTR = string ]

required:

no

datatype:

string

elements:

PHRASE, P, OPT, O, RULEREF

source:

<AttributeType name="VALSTR" dt:type="string" required="no">
         <description>Specifices the string value to be associated with the semantic property (name/value pair).</description>
</AttributeType>

<... WEIGHT="">

Specifies the numeric likelihood, or probability, that the transition should be recognized. The combined weights of the transitions leaving a given state should be equal to 1.

syntax:

[ WEIGHT = float ]

required:

no

datatype:

float

elements:

PHRASE, P, OPT, O, RULEREF, TEXTBUFFER

source:

<AttributeType name="WEIGHT" dt:type="float" required="no">
         <description>Specifies the numeric likelihood, or probability, that the transition should be recognized. The combined weights of the transitions leaving a given state should be equal to 1.</description>
</AttributeType>

<... WORDTYPE="">

Specifies the type of the word(s) to be added to the grammar. Value must be the string "LEXICAL" with SAPI 5.0 and SAPI 5.1. See also SPGRAMMARWORDTYPE.

syntax:

[ WORDTYPE = BSTR ]

required:

no

datatype:

BSTR

values:

LEXICAL

default:

"LEXICAL"

elements:

GRAMMAR

source:

<AttributeType name="WORDTYPE" dt:type="BSTR" dt:values="LEXICAL" default="LEXICAL" required="no">
         <description>Specifies the type of the word(s) to be added to the grammar. Value must be the string "LEXICAL" with SAPI 5.0 and SAPI 5.1. See also SPGRAMMARWORDTYPE.</description>
</AttributeType>

GRAMMAR Source

<Schema name="GRAMMAR" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
         <description> This schema describes the SAPI 5.0 SR Command and Control grammar format which is based on the XML framework. The schema is included in the speech grammar compiler tool (gramcomp.exe or gc.exe) and does not need to be included in your grammar files. It is provided as a reference document. 
 
NOTE: This schema is based on the Microsoft schema language and is not fully W3C compliant. This schema will be rewritten and will be compliant with the W3C standard once it has been approved by the W3C.</description>
         <!-- Attribute definitions -->
         <AttributeType name="LANGID" dt:type="int" required="yes">
                 <description>Defines the language ID of the XML grammar. If not specified, the grammar's LangID will default to the current user's UI language. The Speech Recognition engine must support the grammar's language Id for the grammar to successfully be loaded.</description>
         </AttributeType>
         <AttributeType name="WORDTYPE" dt:type="BSTR" dt:values="LEXICAL" default="LEXICAL" required="no">
                 <description>Specifies the type of the word(s) to be added to the grammar. Value must be the string "LEXICAL" with SAPI 5.0 and SAPI 5.1. See also SPGRAMMARWORDTYPE.</description>
         </AttributeType>
         <AttributeType name="LEXDELIMITER" dt:type="string" default="/" required="no">
                 <description>Specifies the delimiter that SAPI should use to separate an explicit lexicon entry in the grammar. The format is "LEXDELIMITER DisplayForm LEXDELIMITER LexicalForm LEXDELIMITER Pronunciation ;"</description>
         </AttributeType>
         <AttributeType name="NAME" dt:type="string" required="no">
                 <description>Specifies the string identifier that will be associated with a rule.</description>
         </AttributeType>
         <AttributeType name="ID" dt:type="string" required="no">
                 <description>Specifies the numeric identifier that will be associated with a rule.</description>
         </AttributeType>
         <AttributeType name="TOPLEVEL" dt:type="enumeration" dt:values="INACTIVE ACTIVE" default="INACTIVE" required="no">
                 <description>Specifies that the rule is a top-level rule. The value, "ACTIVE" or "INACTIVE" specifies whether the rule is to be active by default.</description>
         </AttributeType>
         <AttributeType name="EXPORT" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
                 <description>Specifies that the rule is exportable (i.e. can be loaded by an external grammar). By default, all grammars are not exportable. Dynamic rules or rules that reference dynamic rules cannot be exported.</description>
         </AttributeType>
         <AttributeType name="INTERPRETER" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
                 <description>Specifies that the rule should use the CFG-interpreter. See also the interface, ISpCFGInterpreter.</description>
         </AttributeType>
         <AttributeType name="DYNAMIC" dt:type="enumeration" dt:values="0 NO FALSE 1 YES TRUE" default="0" required="no">
                 <description>Specifies that the rule can be updated (dynamically) at runtime by using the ISpGrammarBuilder API.</description>
         </AttributeType>
         <AttributeType name="PROPNAME" dt:type="string" required="no">
                 <description>Specifies the string identifier to be associated with the semantic property (name/value pair).</description>
         </AttributeType>
         <AttributeType name="PROPID" dt:type="string" required="no">
                 <description>Specifies the numeric identifier to be associated with the semantic property (name/value pair).</description>
         </AttributeType>
         <AttributeType name="VAL" dt:type="string" required="no">
                 <description>Specifices the numeric value to be associated with the semantic property (name/value pair).</description>
         </AttributeType>
         <AttributeType name="VALSTR" dt:type="string" required="no">
                 <description>Specifices the string value to be associated with the semantic property (name/value pair).</description>
         </AttributeType>
         <AttributeType name="PRON" dt:type="string" required="no">
                 <description>Specifies the pronunciation for the given phrase tag.</description>
         </AttributeType>
         <AttributeType name="DISP" dt:type="string" required="no">
                 <description>Specifies the display form for the given phrase tag.</description>
         </AttributeType>
         <AttributeType name="MIN" dt:type="string" default="1" required="no">
                 <description> The default value for this is 1. The valid range of values for this is 0 to 255 and must be less than the value specified in MAX. Note:  The value specified by MAX will be used when the specified MIN value is greater than the MAX value.  </description>
         </AttributeType>
         <AttributeType name="MAX" dt:type="string" default="1" required="no">
                 <description> The default value for this is 1. The valid range of values for this is 1 to 255, or indicated by "INF" in text. This value indicates the maximum number of times valid recognitions of this element's contents may be recognized repeatedly. A value "INF" indicates that any number of recognitions may occur. </description>
         </AttributeType>
         <AttributeType name="WEIGHT" dt:type="float" required="no">
                 <description>Specifies the numeric likelihood, or probability, that the transition should be recognized. The combined weights of the transitions leaving a given state should be equal to 1.</description>
         </AttributeType>
         <AttributeType name="REFID" dt:type="string" required="no">
                 <description>Specifies the numeric identifier associated with the rule to be referenced.</description>
         </AttributeType>
         <AttributeType name="OBJECT" dt:type="string" required="no">
                 <description>Specifies the programmatic identifier (ProgID) of the COM object which contains either the CFG interpreter or grammar rule.</description>
         </AttributeType>
         <AttributeType name="URL" dt:type="string" required="no">
                 <description>Specifies the uniform resource locator (URL) address of the grammar to be referenced.</description>
         </AttributeType>
         <!--Definition of GRAMMAR Element -->
         <ElementType name="GRAMMAR" content="eltOnly" model="closed">
                 <description>The top-level XML element containing all other XML elements needed to declare one Command and Control grammar.</description>
                 <attribute type="LANGID"/>
                 <attribute type="WORDTYPE"/>
                 <attribute type="LEXDELIMITER"/>
                 <element type="DEFINE" minOccurs="0" maxOccurs="1"/>
                 <element type="RULE" minOccurs="1" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of DEFINE Element -->
         <ElementType name="DEFINE" content="eltOnly" model="open">
                 <description>The DEFINE tag contains a group of ID tags.</description>
                 <element type="ID" minOccurs="1" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of ID Element -->
         <ElementType name="ID" content="empty" model="open" order="one">
                 <description> The ID tag defines named constants for rule ID, property value, and property ID elements.</description>
                 <attribute type="NAME"/>
                 <attribute type="VAL"/>
         </ElementType>
         <!-- Definition of RULE Element -->
         <ElementType name="RULE" content="eltOnly" model="open">
                 <description> This element describes the non-terminal RULE element. The contents must be non-empty concatenated recognition contents. Left recursion is not legal in a grammar. It is required that either the NAME or ID attribute is specified. If both are specified, then they must agree. All RULE NAMEs and VALs should be unique. Dynamic rules may not be exported.</description>
                 <attribute type="NAME"/>
                 <attribute type="ID"/>
                 <attribute type="TOPLEVEL"/>
                 <attribute type="EXPORT"/>
                 <attribute type="INTERPRETER"/>
                 <attribute type="DYNAMIC"/>
                 <group order="many" minOccurs="0" maxOccurs="*">
                          <element type="RULEREF"/>
                          <element type="PHRASE"/>
                          <element type="P"/>
                          <element type="L"/>
                          <element type="LIST"/>
                          <element type="O"/>
                          <element type="OPT"/>
                          <element type="TEXTBUFFER"/>
                          <element type="WILDCARD"/>
                          <element type="DICTATION"/>
                          <element type="RESOURCE"/>
                 </group>
         </ElementType>
         <!-- Definition of PHRASE Element -->
         <ElementType name="PHRASE" content="mixed" model="open">
                 <description> This element is used to describe the Phrase element. It is a synonym of the P element. An associated property name and value pair will be generated only if the contents of this element are recognized.It is important to note that an empty PHRASE element is not allowed. Attributes may not be empty.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="VAL"/>
                 <attribute type="VALSTR"/>
                 <attribute type="PRON"/>
                 <attribute type="DISP"/>
                 <attribute type="MIN"/>
                 <attribute type="MAX"/>
                 <attribute type="WEIGHT"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="O" minOccurs="0" maxOccurs="*"/>
                 <element type="OPT" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of P Element -->
         <ElementType name="P" content="mixed" model="open">
                 <description> This element is used to describe the Phrase element. It is a synonym of the PHRASE element. An associated property name and value pair will be generated only if the contents of this element are recognized. It is important to note that a P empty element is not allowed.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="VAL"/>
                 <attribute type="VALSTR"/>
                 <attribute type="PRON"/>
                 <attribute type="DISP"/>
                 <attribute type="MIN"/>
                 <attribute type="MAX"/>
                 <attribute type="WEIGHT"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="O" minOccurs="0" maxOccurs="*"/>
                 <element type="OPT" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of OPT Element -->
         <ElementType name="OPT" content="mixed" model="open">
                 <description>This element is similar to the PHRASE element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the O tag.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="VAL"/>
                 <attribute type="VALSTR"/>
                 <attribute type="PRON"/>
                 <attribute type="DISP"/>
                 <attribute type="MIN"/>
                 <attribute type="MAX"/>
                 <attribute type="WEIGHT"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="O" minOccurs="0" maxOccurs="*"/>
                 <element type="OPT" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of O Element -->
         <ElementType name="O" content="mixed" model="open">
                 <description>This element is similar to the P element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the OPT tag. </description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="VAL"/>
                 <attribute type="VALSTR"/>
                 <attribute type="PRON"/>
                 <attribute type="DISP"/>
                 <attribute type="MIN"/>
                 <attribute type="MAX"/>
                 <attribute type="WEIGHT"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="O" minOccurs="0" maxOccurs="*"/>
                 <element type="OPT" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of L Element -->
         <ElementType name="L" content="eltOnly" model="open">
                 <description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the LIST tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of LIST Element -->
         <ElementType name="LIST" content="eltOnly" model="open">
                 <description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the L tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <element type="RULEREF" minOccurs="0" maxOccurs="*"/>
                 <element type="PHRASE" minOccurs="0" maxOccurs="*"/>
                 <element type="P" minOccurs="0" maxOccurs="*"/>
                 <element type="L" minOccurs="0" maxOccurs="*"/>
                 <element type="LIST" minOccurs="0" maxOccurs="*"/>
                 <element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
                 <element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
                 <element type="DICTATION" minOccurs="0" maxOccurs="*"/>
         </ElementType>
         <!-- Definition of RULEREF Element -->
         <ElementType name="RULEREF" content="empty" model="open">
                 <description>This element describes the RULEREF tag which is non-terminal.  It is used inside the contents of a rule definition (RULE) to reference another defined rule. The RULEREF tag may contain a semantic property (name/value pair) which will be returned if the rule is recognized.</description>
                 <attribute type="NAME"/>
                 <attribute type="REFID"/>
                 <attribute type="OBJECT"/>
                 <attribute type="URL"/>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="VAL"/>
                 <attribute type="VALSTR"/>
                 <attribute type="WEIGHT"/>
         </ElementType>
         <!-- Definition of DICTATION Element -->
         <ElementType name="DICTATION" content="empty" model="open">
                 <description>Specifies that the recognized phrase should match at least MIN and at most MAX words from the dictation grammar. The DICTATION tag may contain an associated semantic tag (name/value pair) which will be returned if the DICTATION tag is recognized.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="MIN"/>
                 <attribute type="MAX"/>
         </ElementType>
         <!-- Definition of RESOURCE Element -->
         <ElementType name="RESOURCE" content="empty" model="open">
                 <description> Specifies the grammar node is a grammar located in a standard Windows Resource grammar.</description>
                 <attribute type="NAME"/>
         </ElementType>
         <!-- Definition of TEXTBUFFER Element -->
         <ElementType name="TEXTBUFFER" content="empty" model="open">
                 <description>Specifies the grammar is from a text buffer, to be specified at runtime by the application. See also ISpRecoGrammar::SetWordSequenceData and ISpRecoGrammar::SetTextSelection.</description>
                 <attribute type="PROPNAME"/>
                 <attribute type="PROPID"/>
                 <attribute type="WEIGHT"/>
         </ElementType>
         <!-- Definition of WILDCARD Element -->
         <ElementType name="WILDCARD" content="empty" model="open">
                 <description>Specifies a garbage word identifier for one or more non-silence sounds. The garbage word may be recognized by the Speech Recognition engine, but will NOT be returned to the application.</description>
         </ElementType>
</Schema>

Schema Attributes Reference:

open model

The element can contain elements, attributes, and text not specified in the content model. This is the default value.

closed model

The element cannot contain elements, attributes, and text except for that specified in the content model. DTDs use a closed model.

textOnly content

The element can contain only text, not elements. Note that if the model attribute is set to "open", the element can contain text and additional elements.

eltOnly content

The element can contain only the elements, not free text. Note that if the model attribute is set to "open", the element can contain text and additional elements.

empty content

The element cannot contain text or elements. Note that if the model attribute is set to "open", the element can contain text and additional elements.

mixed content

The element can contain a mix of named elements and text. This is the default value.

one order

Permits only one of a set of elements.

seq order

Requires the elements to appear in the specified sequence.

many order

Permits the elements to appear (or not appear) in any order. This is the default.

Datatype Reference:

bin.base64 datatype

MIME-style Base64 encoded binary BLOB.

bin.hex datatype

Hexadecimal digits representing octets.

boolean datatype

0 or 1, where 0 == "false" and 1 =="true".

char datatype

String, one character long.

date datatype

Date in a subset ISO 8601 format, without the time data. For example: "1994-11-05".

dateTime datatype

Date in a subset of ISO 8601 format, with optional time and no optional zone. Fractional seconds can be as precise as nanoseconds. For example, "1988-04-07T18:39:09".

dateTime.tz datatype

Date in a subset ISO 8601 format, with optional time and optional zone. Fractional seconds can be as precise as nanoseconds. For example: "1988-04-07T18:39:09-08:00".

entity datatype

Represents the XML ENTITY type.

entities datatype

Represents the XML ENTITIES type.

enumeration datatype

Represents an enumerated type (supported on attributes only).

fixed.14.4 datatype

Same as "number" but no more than 14 digits to the left of the decimal point, and no more than 4 to the right.

float datatype

Real number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 1.7976931348623157E+308 to 2.2250738585072014E-308.

id datatype

Represents the XML ID type.

idref datatype

Represents the XML IDREF type.

idrefs datatype

Represents the XML IDREFS type.

int datatype

Number, with optional sign, no fractions, and no exponent.

nmtoken datatype

Represents the XML NMTOKEN type.

nmtokens datatype

Represents the XML NMTOKENS type.

notation datatype

Represents a NOTATION type.

number datatype

Number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. (Values have same range as most significant number, R8, 1.7976931348623157E+308 to 2.2250738585072014E-308.)

string datatype

Represents a string type.

time datatype

Time in a subset ISO 8601 format, with no date and no time zone. For example: "08:15:27".

time.tz datatype

Time in a subset ISO 8601 format, with no date but optional time zone. For example: "08:1527-05:00".

i1 datatype

Integer represented in one byte. A number, with optional sign, no fractions, no exponent. For example: "1, 127, -128".

i2 datatype

Integer represented in one word. A number, with optional sign, no fractions, no exponent. For example: "1, 703, -32768".

i4 datatype

Integer represented in four bytes. A number, with optional sign, no fractions, no exponent. For example: "1, 703, -32768, 148343, -1000000000".

r4 datatype

Real number, with seven digit precision; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 3.40282347E+38F to 1.17549435E-38F.

r8

Real number, with 15 digit precision; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 1.7976931348623157E+308 to 2.2250738585072014E-308.

ui1 datatype

Unsigned integer. A number, unsigned, no fractions, no exponent. For example: "1, 255".

ui2 datatype

Unsigned integer, two bytes. A number, unsigned, no fractions, no exponent. For example: "1, 255, 65535".

ui4 datatype

Unsigned integer, four bytes. A number, unsigned, no fractions, no exponent. For example: "1, 703, 3000000000".

uri datatype

Universal Resource Identifier (URI). For example, "urn:schemas-microsoft-com:Office9".

uuid datatype

Hexadecimal digits representing octets, optional embedded hyphens that are ignored. For example: "333C7BC4-460F-11D0-BC04-0080C7055A83".