We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Validate error with <data> tag

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
bmceachen
Posts: 7
Joined: Mon Jul 30, 2007 3:43 pm

Validate error with <data> tag

Post by bmceachen »

I am working on an application that connects to a remote website to retrieve a set of data. I am using the <data> tag to help facilitate the process.

I am using Altova XMLSpy and the "Plum Group VoiceXML File" style sheet. It appears to be responding with an incorrect validation error regarding the <data> tag.

The validation error I am receiving is:
File C:\Program Files\Altova\XMLSpy2007\web connection test.vxml is not valid.
Content model of element 'block' disallows element 'data'.
Error location: vxml / form / block / data
Details
VC: Element Valid: Content model of element 'block' disallows element 'data'.
According to the reference materials I have found, valid parent tags for the <data> tag are:
Parent Tags
<block>, <catch>, <error>, <filled>, <foreach>, <form>, <help>, <if>, <noinput>, <nomatch>, <vxml>
My code is nesting the <data> tag within a <block> which is within a <form> and I can't seem to get the validation error to cease no matter what parent tags I use. Any suggestions?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vxml PUBLIC "-//The Plum Group//Voice Markup Language 2.0//EN" 
     "http://vxml.plumgroup.com/vxml-221.dtd">
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">

<form id="get_number">
<block>
	<data name="returnnumber" srcexpr="'http://69.64.172.152:1920/PlumVoice/default4.aspx'"/>
	<assign name="document.returnnumber" expr="returnnumber.documentElement"/>
	<goto next="#display_number"/>
</block>
</form>
<form id="display_number">
	<script><![CDATA[
			function GetRoutedNumber(nodata)
			{
				try {
					   			return returnnumber.getElementsByTagName("outboundnumber").item(0).firstChild.toString();
					}
				catch(e)
					{
					   // the value could not be retrieved, so return this instead
					   return nodata;
					}
			}
		]]>		
	</script>
	<block>
		<var name="number" expr="GetRoutedNumber('unknown number')"/>
		<prompt>A
			Testing 
				<say-as type="acronym">
					<value expr="number"/>
				</say-as>
		</prompt>
	</block>


</form>

</vxml>
Thanks,
Ben
-Ben

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code for using current DTD file

Post by support »

Hi,

The DTD file (Version 2.2.1) that you are using is outdated. The <data> tag was implemented in Version 2.5 of the DTD.

You would want to replace this line of IVR code:

Code: Select all

<!DOCTYPE vxml PUBLIC "-//The Plum Group//Voice Markup Language 2.0//EN"
     "http://vxml.plumgroup.com/vxml-221.dtd"> 
with:

Code: Select all

<!DOCTYPE vxml PUBLIC "-//The Plum Group//Voice Markup Language 2.0//EN"
     "http://vxml.plumgroup.com/vxml.dtd"> 
This IVR code will ensure that you are using our current DTD file.

Regards,
Plum Support

Post Reply