Oracle Application Server Wireless Developer's Guide 10g (9.0.4) Part Number B10948-01 |
|
This appendix contains information about the Oracle XML Grammar Subset.
The Oracle Grammar Subset (OGS) is a subset of the XML Form of the W3C Speech Recognition Grammar Format (SRGS). The primary aims of the subset are:
Grammars in the OGS are not standalone XML documents; they have no XML header or DOCTYPE, but consist only of the root <grammar>
element and contents. Such a <grammar>
element and contents are in the subset if and only if they are legal according to the DTD of the W3C Speech Recognition Grammar Format, and satisfy the following additional restrictions:
<grammar>
element is defined, and is a reference to one of the <rule>
s in the grammar (which must, therefore, define at least one <rule>
). The rule referred to by the root attribute of the <grammar>
will be called the root rule.
<ruleref>
elements have a uri attribute whose value begins with a #; that is, they are references to other rules in the same grammar. No <ruleref>
has a type, alias, or special attribute.
<token>
tags.
<example>
, <alias>
, <meta>
, <metadata>
, or <lexicon>
elements.
<ruleref>
occurring in that rule with a given uri attribute value (In other words, no rule can recognize an utterance that includes more than one <ruleref>
that refers to the same rule).
<tag>
elements contain text in a subset of the format described in W3C Semantic Interpretation for Speech Recognition (SISR), and satisfy the following additional restrictions:
<tag>
is one of the following:
<rule>
For example, all of the following lines are allowed content of a <tag>
:
"sausage" $gender $animal.species what = "animal" where = "New York City"; ; when = "now" who = "me"; why = "because" question = "how" ; how = "by hook or by crook"; ;; food = $order diameter = $order.size what = "pizza"; size = $order.diameter
<tag>
s (we will call such rules void rules)
<tag>
in that rule, that <tag>
is the last thing in the rule that is included in the utterance, and the content of the <tag>
is a double-quote-delimited string, a grammar rule reference attribute, or a property of a grammar rule reference attribute (we will call such rules string rules).
<tag>
in that rule, that <tag>
is the last thing in the rule that is included in the utterance, and the content of the <tag>
is an AssignmentList (we will call such rules structure rules).
<tag>
has content:
$y.z
or
x = $y.z
then the rule with id
y must be a structure rule, and all of the <tag>
s in rule y must include an assignment to identifier z.
<tag>
contains a grammar rule reference attribute with no property, the referenced rule must be a string rule. For example, if a <tag>
has content:
$y
or
x = $y
then the rule with id
y must be a string rule.
<tag>
in the root rule contains an AssignmentList (the term structure rule applies only to non-root rules, so the root rule is not subject to the above restrictions on structure rules).
<tag>
s in that rule that are included in that utterance do not contain more than one assignment to the same identifier (not even if the expression the identifier is assigned to is the same).
<tag>
in that <rule>
, and that <tag>
contains a grammar rule reference attribute $id (standalone or as part of a property), then that utterance must include a <ruleref>
in the same rule as the <tag>
, occurring before the <tag>
in the utterance, with uri= #id.
|
![]() Copyright © 2003 Oracle Corporation. All Rights Reserved. |
|