Using Document Type Definitions
A document type definition (DTD) defines the validity of an XML document. See Appendix B, “VoiceXML Implementation for Cisco Voice Browser,” for the DTD defined for VoiceXML 2.0. You can instruct the parser to validate the document by referencing the document in the document type declaration.
The Cisco Unified CCX Voice Browser includes a custom version of voicexml.dtd with some minor enhancements. The simplest way to use voicexml.dtd is to reference it with the URI (Uniform Resource Identifier) “http://IPAdress:9080/SDocuments/voicexml.dtd” in the <!DOCTYPE> element as in the following example:
<<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vxml SYSTEM "http://10.78.94.224:9080/SDocuments/voicexml.dtd">
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.0"?>
Note | Do not use file protocol to access voicexml.dtd. |
You can also deploy a DTD with your documents on the document server, by providing the URI to access the file in the XML document type definition.
Using a DTD is optional. In the development phase, it can help you catch syntax errors in VoiceXML documents. After you test the code and find no syntax errors, you may choose not to use a DTD in the production phrase to maximize efficient performance (by eliminating the need for parsing the DTD file itself and the validation process).