Motorola 1 manual Rename Element

Page 45

VoxML 1.0 Element Reference

RENAME Element

RENAME Element

The RENAME element is used to rename recognition slots in VoxML grammars, such that the resulting VoxML variable name can be different from the name of the recognition slot defined in the grammar.

The RENAME element can exist only within the INPUT element, and then only when using the GRAMMAR input type.

Syntax

<RENAME RECNAME="value" VARNAME="value" />

Attributes

Attribute Name

Allowed Values

VARNAMEidentifier

RECNAMEidentifier

Examples

1 <INPUT TYPE="GRAMMAR"

2SRC="http://www.foo.com/mygram.grm"

3NEXT="http://www.fancyquotes.com/vmlstocks.asp">

4<RENAME VARNAME="sym" RECNAME="symbol">

5<RENAME VARNAME="detail" RECNAME="quotetype">

6</INPUT>

In this example, the RENAME element is used to account for differences in the variable names collected from a grammar and those expected by another script. In particular, the case imagined here is one where a grammar from foo.com is used to provide input to a VoxML application hosted by fancyquotes.com. Because the grammar and script are imagined to have been developed independently, the RENAME element is used to help connect the grammar and the stock-quoting application.

October 1998

VoxML 1.0 Language Reference 41

Image 45
Contents Revision VoxML Language ReferencePage Contents Appendices What is VoxML OverviewPurpose of this Document DIALOGs and STEPs Structure of a VoxML DocumentBasic Elements VoxML 1.0 Application Development Guide Other Reference DocumentationACK Element SyntaxAttributes Examples Audio Element Break Element Next step URL Cancel ElementExamples Case Element Integer Class ElementExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Data Format Input Element Type DateInput Element Type Digits Input Element Type Grammar Input Element Type Hidden Input Element Type Money Input Element Type None Input Element Type Number Input Element Type Optionlist Input Element Type Phone Input Element Type PROFILE‡ Input Element Type Record Prompt Input Element Type Time Input Element Type Yorn Option Element VoxML 1.0 Element Reference Options Element Syntax Attributes Or ElementPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Prompt Value ElementAppendix a VoxML 1.0 Document Type Definition AppendicesOctober VoxML 1.0 Language Reference Vcard Profile Names and Subtypes Appendix B Vcard Profile Names and SubtypesFirst