<mark>

Description

(VoiceXML 2.1 feature) This feature is not supported in Dialogic IP Media Server release 2.4.

As described in section 3.3.2 of [SSML], the <mark> element places a marker into the text/tag sequence. An SSML processor must either allow the VoiceXML interpreter to retrieve information, or must inform the interpreter, when a <mark> is executed during audio output. The <mark> element provides a convenient way to detect at which point a user barge-in has occurred.

For details on using <mark> within SSML, click here.

Note: The <vxml> version attribute must be specified as 2.1 (or higher) to use this feature. If the version is specified otherwise, the <mark> element will not be recognized and will be treated as an invalid child element.

Syntax


<mark
    name="string"
    nameexpr="ECMAScript_Expression"/>

Attributes

Attribute

Description

name

The name of this mark. This name is used when setting appropriate shadow variables as described below. Optional.

nameexpr

An ECMAScript expression to be evaluated and used as the name of the mark, as above. Optional.

Attribute Notes

Shadow Variables

The following two properties on the application.lastresult$ object are set whenever the application.lastresult$ object is assigned (e.g. a <link> is matched) and a <mark> has been executed:

Note: When a <mark> is executed during the processing of a form item (ex. <field>, <record>, etc.), the interpreter also sets itemName$.markname and itemName$.marktime shadow variables for the form item, with the same values used for the lastresult shadow variables above.

Parents

<foreach>, <prompt>

Children

None.

Extensions

None.

Limitations/Restrictions

Example

Note: Some versions of RealSpeak may only support numeric mark names (ex., "1234"). In that case, the following example would need to be modified. Please see vendor documentation for details.


<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
  <var name="played_ad" expr="false"/>
  <form>
    <field name="field1" type="boolean">
      <prompt>
        <mark name="ad_start"/>
        Baseball scores brought to you by Elephant Peanuts.
        There's nothing like the taste of fresh roasted peanuts.
        Elephant Peanuts. Ask for them by name.
        <mark name="ad_end"/>
        <break time="500ms"/>
        Would you like to continue?
      </prompt>
      <filled>
        <if cond="typeof(field1$.markname) == 'string' &amp;&amp; 
           (field1$.markname=='ad_end' || 
           (field1$.markname=='ad_start' &amp;&amp; 
              field1$.marktime &gt;= 5000))">
          <assign name="played_ad" expr="true"/>
        <else/>
          <assign name="played_ad" expr="false"/>
        </if>
      </filled>
    </field>
  </form>   
</vxml>