Partager via


type Attribute

  Microsoft Speech Technologies Homepage

Specifies the MIME type that corresponds to the grammar format.

HTML <grammar type="type">
JScript grammar.type = type

Remarks

The type attribute can refer to either text or binary formats. The type attribute permits the SALT author to signal the format of a grammar resource and determine compatibility before a potentially lengthy download.

Example

The following example demonstrates the type attribute identifying a World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS) grammar.

<salt:grammar type="application/srgs+xml" xmlns="http://www.w3.org/2001/06/grammar" lang="en-US">
  <grammar root="root" version="1.0" tag-format="semantics-ms/1.0">
    <rule id="root">
      <item repeat="0-1">from </item>
      <ruleref name="#cities" />
    </rule>
    <rule id="cities">
      <one-of>
        <item> Cambridge </item>
        <item> Seattle   </item>
        <item> London    </item>
      </one-of>
    </rule>
  </grammar>
</salt:grammar>

See Also

grammar Element