Page 1 of 1

Validate error with <data> tag

Posted: Tue Aug 07, 2007 9:33 am
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

IVR code for using current DTD file

Posted: Tue Aug 07, 2007 11:18 am
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