www.pudn.com > xvoice-0.8.1.rar > COMMANDS
The xvoice.xml file contains entries with the following structure:There are three kinds of top-level elements which can appear under < .....other apps defined here ....> = "expand" -> | "open file> -> ............ : -- defines a grammar which will be loaded by xvoice automatically when you say "command mode" in a matching window. "name" is the name of the grammar. "expr" is used by xvoice to match the name of the application window. It is a regular expression. E.g. "VIM.*" will match vim windows which dynamically set their title bar. "Netscape.*" will match Netscape windows. -- defines a grammar which is not automatically associated with any application, but can be loaded by xvoice with a event. This is used to provide context grammars. For example if you want different commands for XTerm if you're using bash, ncftp, vim, etc., you can define them as , and define commands like | "shell commands on" -> to load your commands. -- defines a grammar which can be included by a or . This works like a macro, or #include in C. The grammar in a is never complied. It is merely written to a .bnf file. This allows common elements to be declared once and used by many applications, e.g. character commands ("a", "b", ...), or number translations ("two hundred five", etc.). A section must not have a < > element. A or includes the definition by using INCLUDE, e.g. INCLUDE "numbers.bnf" The ".bnf" is required. For details on BNF format, consult the ViaVoice users guide.