object

object element

Exposes platform-specific functionality for use by a VoiceXML application.

Syntax

<object 
classid = "URI"
fetchhint = "string"
fetchtimeout = "string"
maxage = "seconds"
maxstale = "seconds"
name = "ECMAScript_variable"
/>

Attributes

classid

Required. The URI specifying the location of the object's implementation.

method://rerecognizeIndicates the object should be used to invoke re-recognition.

fetchhint

Defines when the interpreter context may retrieve objects from the server.

prefetchObjects may be prefetched.
safeObjects may only be fetched when needed, never before.

fetchtimeout

The time in seconds (s) or milliseconds (ms) for the VoiceXML interpreter to wait for content to be returned by the HTTP server before throwing an error.badfetch event. The fetchtimeout value is rounded down to the nearest whole second (e.g., 5700ms or 5.7s would be rounded down to 5s). If fetchtimeout has a value less than 1 second, it is reset to the default value. The default value is 15s.

maxage

Sends the max-age Cache-Control HTTP header along with the request for the specified resource. The header indicates that the document is willing to use content whose age is no greater than the specified time in seconds, unless maxstale is also provided. Voice application developers should use extreme caution when setting this attribute. If used improperly, it could have an adverse affect on the performance of your application. You should only consider using this attribute in requests for frequently changing content (e.g. dynamically generated content) hosted on a misconfigured HTTP server that you do not control. To reduce load, some HTTP servers are configured to indicate to clients that content expires some arbitrary time in the future. In that case, set the maxage attribute to 0. If you do control the HTTP server, you should instead configure the HTTP server to omit the expires header and possibly to send the Cache-Control: no-cache header. The former requires the VoiceXML interpreter to check with the server before using any cached content. The latter requires the VoiceXML interpreter to not cache the fetched resource.

maxstale

Instructs the VoiceXML interpreter to send a max-stale Cache-Control header along with the HTTP request for the specified resource. The header indicates that the document is willing to use content that has exceeded its expiration time by no more than the specified number of seconds. Voice application developers should use extreme caution when setting this attribute. If used improperly, your application may present stale content to users. If you do control the HTTP server, you should instead configure the HTTP server to send an expires header with a time in the distant future.

name

Required. When the object is evaluated, this variable is set to an ECMAScript value whose type is defined by the object.

Parents

form

Children

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

Remarks

Currently, re-recognition is the only functionality exposed via the object element on the Tellme platform.

If any of the fetchtimeout, fetchhint, maxage, or maxstale attributes is not specified for an object element, then the value of the fetchtimeout, objectfetchhint, objectmaxage, or objectmaxstale property, respectively, is used.

Currently, the fetchhint, maxage, and maxstale attributes on object are merely validated. These attributes are only relevant for the fetching of objects, and the only object currently supported by the Tellme platform is built into the platform, not fetched. The fetchtimeout attribute (or property, if the attribute is not specified) is used to control the fetching of the grammar(s) specified in a re-recognition object's param element. The grammar-specific properties (grammarfetchhint, grammarmaxage, and grammarmaxstale) can be used to control the fetching semantics of the grammar(s) used by the re-recognition object.

If any of the fetchhint, maxage, or maxstale values is invalid, the interpreter throws error.semantic. If a fetchtimeout value is invalid, the interpreter throws error.badfetch.

See the re-recognition tutorial for an example that demonstrates the use of the object element.