VoiceXML 2.1 Development Guide Home  |  Frameset Home

  D: VoiceXML 2.1 Porting Guide  |  TOC  |  Menu Modifications  

DTD and Version Changes

Some older VoiceXML platforms require a strict Document Type Definition, (DTD) to be declared immediately preceding the initial <vxml> declaration. The Prophecy VoiceXML browser is more flexible in this regard, so there is actually no need to explicitly declare a DTD in any capacity. In order to keep your code as portable as possible, it is suggested that you do not declare an optional DTD reference within your code at all, (or if you do, then do it via  an 'include' on the server side). Some developers porting from other IVR platforms may already have a DTD specified that is specific to the vendor: In these circumstances, it is strongly suggested that any DTD references be replaced with the W3C DTD (being sure to specify version 2.1, and not 2.0), or that this reference be scrapped entirely.

However, if your application needs require you to declare a DTD, then it is suggested that you utilize a server side language to have an include file that declares the DTD and version number on a global scale, for all documents. This way, you only need to change these lines once to make the changes to all documents in the application:

DTD_sample.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vxml
    PUBLIC "-//W3C//DTD VOICEXML 2.0//EN"
    "http://www.w3.org/TR/voicexml21/vxml.dtd">

<vxml version = "2.1" xmlns="http://www.w3.org/2001/vxml">
<form>
  <block>
    <prompt>Here is a sample document that shows the usage of a document type definition.</prompt>
    <exit/>
  </block>
</form>
</vxml>



Do remember that neither the DTD reference, nor the 'xmlns' attributes are required in order for code to run on the Prophecy IVR software platform, unless you intend on using voxeo-specific extensions to the W3C specification. For the latter case, one would need to specify the following attributes of the <vxml> element:


<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml"
    xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">



More information on Document Type Definitions





  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  D: VoiceXML 2.1 Porting Guide  |  TOC  |  Menu Modifications  

© 2013 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site