1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview Speech rule store for mathml and mathjax trees.
9 goog
.provide('cvox.MathmlStore');
11 goog
.require('cvox.MathStore');
15 * Rule initialization.
17 * @extends {cvox.MathStore}
19 cvox
.MathmlStore = function() {
22 goog
.inherits(cvox
.MathmlStore
, cvox
.MathStore
);
23 goog
.addSingletonGetter(cvox
.MathmlStore
);
27 * Adds a new MathML speech rule.
28 * @param {string} name Rule name which corresponds to the MathML tag name.
29 * @param {string} domain Domain annotation of the rule.
30 * @param {string} rule String version of the speech rule.
32 cvox
.MathmlStore
.prototype.defineMathmlRule = function(name
, domain
, rule
) {
33 this.defineRule(name
, domain
, rule
, 'self::mathml:' + name
);
38 * Adds a new MathML speech rule for the default.default domain.
39 * @param {string} name Rule name which corresponds to the MathML tag name.
40 * @param {string} rule String version of the speech rule.
42 cvox
.MathmlStore
.prototype.defineDefaultMathmlRule = function(name
, rule
) {
43 this.defineRule(name
, 'default.default', rule
, 'self::mathml:' + name
);