Using Emacs Major Mode to Edit VoiceXML documents

Emacs is a self-documenting, customizable, extensible real-time display editor that is used in UNIX. More information about Emacs and customization can be found here. This document describes how to customize Emacs with a major mode for VoiceXML. It also provides limited VoiceXML validation capabilities.

1. Requirements

To extend Emacs to support VoiceXML editing, you'll need the following:

  1. UNIX operating system (root access required)
  2. Emacs
  3. PSGML 1.2+
  5. VoiceXML 2.0 DTD.
  6. dictionary-mode.el file
  7. Catalog file
  8. xml.dcl file
  9. .emacs addition
2. Installing major mode for VoiceXML

Follow these steps to install major mode for VoiceXML:

  1. Download, make and install the latest (v1.2+) version of psgml from: You can find Installation instructions here:
  2. Insert the contents of the .emacs file addition at the end of your .emacs file. If the .emacs file does not exist in your home directory, you will have to create one.
  3. Copy the following files to the directory /usr/local/lib/sgml:
3. Testing VoiceXML major mode

Follow these steps to verify that installation of VoiceXML major mode was successful:

4. Adding validation support using nsgml

To add validation support using nsgml, follow these steps:

  1. Download the SP source code from:
  2. Edit the Makefile:
    • Add -DSP_HAVE_SOCKET, under XDEFINES (see
    • Edit the value of the prefix variable. The prefix variables defines where NSGMLS will be installed. The default is
  3. Run "make". If make is successful, run "make install".

Test nsgml by executing the following command, replacing "example.vxml" with the path to a VoiceXML document.

nsgmls -wxml -s example.vxml

Alternatively, you can run nsgml from within Emacs by typing "C-c C-v".

5. Known issues

If you put the public DOCTYPE identifier in a VoiceXML document, nsgml must be able to fetch it. nsgml does not support authentication, so the DTD must not be hosted in a password protected location.

<!DOCTYPE vxml 
  PUBLIC "-//Tellme Networks// DTD VXML//EN" 

If you have a local copy of the VoiceXML 2.0 DTD, you can specify it using the following DOCTYPE identifier:

<!DOCTYPE vxml 
  PUBLIC "-//Tellme Networks// DTD VXML//EN" 

Update the local path to the DTD accordingly.

The validator prints an error message if there is no DOCTYPE declaration in a document, but it recovers by looking it up in the CATALOG.

There are some issues related to how nsgmls and psgml searches for the DTD when it is specified both by a PUBLIC identifier and a SYSTEM identifier as in the above example. psgml requires a SYSTEM identifier; nsgmls does not.

[24]7 Inc.| Terms of Service| Privacy Policy| General Disclaimers