Table of Contents

< object >

Description

The < object > element interacts with custom extensions. A VoiceXML platform may have platform-specific functionality that an application wants to use, such as speaker verification, native components, additional telephony, etc. Such platform-specific objects are accessed using the <object> element, which is analogous to the HTML <OBJECT> element.

Syntax

<object
name="String"
expr="ECMAScript_Expression"
cond="ECMAScript_Expression"
classid="URI"
codebase="URI"
codetype=""
data="URI"
type=""
archive="URI"
fetchhint="prefetch" | "safe"
fetchtimeout="time_interval"
maxage="time_interval"
maxstale="time_interval">
child elements
</object>

Attributes

nameThe name attribute defines the name of the variable when the object is evaluated. This attribute is required.
exprThe expr attribute is the initial value of the variable. This attribute is optional and defaults to undefined.
condThe cond attribute is a Boolean expression that must evaluate to true in order for this object to execute. This attribute is optional and defaults to true.
classidThe classid attribute is the URI specifying the location of the object’s implementation. The platform can access external objects (dynamic installed libraries). To specify one, give the URI like, “extern:name”, where 'name' generates the reference to VXIobject_name.so. Voximal provides an SDK tool kit to develop external objects.
codebaseThe codebase attribute is the base path used to resolve relative URIs specified by classid, data, and archive. This attribute is optional and defaults to the base URI of current document.
codetypeThe codetype attribute is the content type of data expected when downloading the object specified by classid. This attribute is optional and defaults to the value of the type attribute.
dataThe data attribute is the URI specifying the location of the object’s data. If it is a relative URI, it is interpreted as relative to the codebase attribute.
typeThe type attribute is the content type of the data specified by the data attribute.
archiveThe archive attribute is a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes. URIs which are relative are interpreted as relative to the codebase attribute.
fetchtimeout The fetchtimeout attribute is the time interval to wait for an audio file to be fetched before playing the alternate content. This attribute is optional.
fetchhintThe fetchhint attribute defines when the audio file should be retrieved. This attribute is optional.
* prefetch – the audio file may be downloaded when the page is loaded.
* safe – the audio file is loaded only when needed.
maxageThe maxage attribute indicates the maximum time in seconds that this document will use this object before fetching another copy. This attribute is optional.
maxstaleThe maxstale attribute indicates the maximum time in seconds that this document will use an object that exceeded the maxage time. This attribute is optional.

Parents

<vxml>

Children

<audio>, <catch>, <error>, <filled>, <help>, <noinput>, <nomatch>, <param>, <prompt>, <property>, <value>

Extensions

Object , “offset” – can get the offset of the last audio prompted with the property control set to “yes.”
Object , “save” – can save a record locally.
Object , “pick” –  can get a local file and use it to get and post local contents.
Object , “delete” - can delete a local file.

Limitations/Restrictions

The elements: codebase, codetype, data, type, and archive are not used.
No platform-specific objects are currently defined

Example Code

<?xml version = "1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <form>
  <object name="message" classid="extern:shell">
   <param name="command" expr="'ls -al'" />
  </object>
  <block>
   Parameter = ls -al.
   Result = <value expr="message.result" />.
  </block>
 </form>
</vxml>