<link>

Specifies an action to take when an embedded grammar is recognized. For an overview, see Links.

Attributes

This section describes the attributes you can set for this element.

Name

Data type

Default

dtmf

CDATA

optional

event

NMTOKEN

optional

eventexpr

CDATA

optional

expr

CDATA

optional

fetchaudio

CDATA

optional

fetchhint

(prefetch | safe)

optional

fetchtimeout

CDATA

optional

maxage

CDATA

optional

maxstale

CDATA

optional

message

CDATA

optional

messageexpr

CDATA

optional

next

CDATA

optional

dtmf

The dtmf attribute specifies the dtmf sequence for a link. It is equivalent to a simple DTMF grammar. This attribute can be used at the same time as other grammars. In other words, the link is activated when user input matches a linked grammar or a DTMF sequence.

event

The event attribute specifies an event to throw. The event may be a standard VoiceXML event (like help or nomatch) or a user-defined event.

Note: Only one of the event, eventexpr, next, or expr attributes may be specified.

eventexpr

The eventexpr attribute is similar to the event attribute. The eventexpr attribute specifies an ECMAScript expression which specifies the event to be thrown.

Note: Only one of the event, eventexpr, next, or expr attributes may be specified.

expr

The expr attribute is similar to the next attribute. The expr attribute is an ECMAScript expression which specifies the destination URL.

Note: Only one of the event, eventexpr, next, or expr attributes may be specified.

fetchaudio

The fetchaudio attribute specifies the URI of the audio file to play while waiting for a document to be fetched. If you do not specify a setting for the fetchaudio attribute, the <property> element defines a value for the fetchaudio property. If the fetchaudio property is not set (default), no audio is played during a fetch. See the fetchaudio property for details.

fetchhint

The fetchhint attribute determines when content is retrieved from the server. The settings for the fetchhint attribute are prefetch and safe. The prefetch setting indicates that files or dialogs are downloaded when a page is loaded. The safe setting indicates that files or dialogs are downloaded only when they are actually needed.

If you do not specify a setting for the fetchhint attribute, the <property> element determines the setting by defining a value for the appropriate *fetchhint property, for example:

<property name="documentfetchhint" value="safe"/>

fetchtimeout

The fetchtimeout attribute specifies the amount of time to wait for the content to be fetched before throwing an error.badfetch event.

The value may be specified in seconds (s) or milliseconds (ms). If no unit is specified, the value is interpreted as milliseconds by default. If no value is specified, the fetchtimeout defaults to the value set an applicable <property> element, or to the value set for the browser.loading.fetchtimeout property in the Management Station if no <property> applies. If no other default applies, the platform default of 10000 milliseconds is used.

maxage

The maxage attribute specifies the maximum amount of time a fetched resource may remain in the locale cache without requiring a server revalidation. If a value for the maxage attribute is not specified, revalidation will occur after the expiration of the freshness lifetime (as defined in RFC 2616).

maxstale

The maxstale attribute specifies the maximum amount of time a stale file remains valid before a refetch is required. If a value for the maxstale attribute is not specified, the stale document is refetched.

message

The message attribute specifies a message describing the event being thrown. This message is available in the <catch> element where the event is caught as _message.

messageexpr

The messageexpr attribute specifies an ECMAScript expression that resolves to the message describing the event being thrown. 

next

The next attribute specifies the destination URL.

Note: Only one of the event, eventexpr, next, and expr attributes may be specified.

Children

Parents

Sample code

<vxml>
    <link next="bookmarks.vxml">
        <grammar><item>bookmarks</item></grammar>
    </link>
    <form>
        <field name="a_field"> Where would you like to go now?
        Remember, you can say bookmarks at any time.
            <grammar src="../grammars/destinations.grxml"/>
            <filled>
                <goto expr="a_field"/>
            </filled>
        </field>
    </form>
</vxml>