VoiceXML 2.1 Development Guide Home  |  Frameset Home


<mark>  element


Inserts markers into output streams for asynchronous notification.


usage

<mark name="ID" nameexpr="(ECMAScript Expression)">


attributes

name Data Type: ID Default: Required
The name attribute specifies the name of the marker in question.

Note: Either the name or nameexpr attribute is required for the mark element.
nameexpr Data Type: (ECMAScript Expression) Default: Required
An ECMAScript expression which evaluates to the name of the mark when the prompt is queued. If nameexpr cannot be evaluated, an error.semantic event is thrown.

Note: Either the name or nameexpr attribute is required for the mark element.



shadow variables

none


parents

<audio>   <choice>   <emphasis>   <enumerate>   <option>   <paragraph>   <prompt>   <prosody>   <sentence>


children

none


code samples

none


additional links

W3C SSML 1.0 Specification


  ANNOTATIONS: EXISTING POSTS
mtatum111
10/13/2008 1:55 PM (EDT)
Can you give a practical example of how <mark> is used?

Thanks in Advance!
voxeo_chris
10/13/2008 2:33 PM (EDT)
Hello,

The only use we have for the <mark> element is under the shadow variable marktime.  The "Using the Mark Element" is probably your best source for code examples and descriptions regarding the mark element and the marktime shadow variable.  Here is a quick link: http://docs.voxeo.com/voicexml/2.0/t_21.6.htm?search=marktime#anchor.  Take a look over this information and please let us know if you have anymore questions as we would be happy to help.

Regards,
Chris
jeremykentc
9/2/2009 4:00 PM (EDT)
I can't seem to get mark to work and I'm not sure what it is that I'm not doing right. I'm trying to find examples of this and I find very little. What I am trying to do is determine if barge-in has happened or not.

Here's my app:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="guessNumber">
<field name="guess">
<grammar type="text/gsl">
[dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-6 dtmf-7 dtmf-8 dtmf-9]
    </grammar>

<mark name="one"/>
<prompt>
Guess what the computer is thinking! Pick a number between 0 and 9.
<mark name="two"/>
</prompt>
<prompt>
I didn't see or hear anything and I'm not deaf or blind.
<mark name="three"/>
</prompt>
<prompt>
This is your last shot. say something.
<mark name="four"/>
</prompt>

<noinput>
<prompt>
I did not hear you. Please try again.
</prompt>
<reprompt/>
</noinput>

<nomatch>
<prompt>
Is that a number? Please try again.
</prompt>
<reprompt/>
</nomatch>
</field>

    <filled namelist="guess" mode="all">
<if cond="typeof(guess$.markname) == 'string'">
<prompt>
It's a string!
</prompt>
</if>
<if cond="guess$.markname == 'one'">
<prompt>
You exited at one.
</prompt>
</if>
<if cond="guess$.markname == 'two'">
<prompt>
You exited at two.
</prompt>
</if>
<if cond="guess$.markname == 'three'">
<prompt>
You exited at three.
</prompt>
</if>
<if cond="guess$.markname == 'four'">
<prompt>
You exited at four.
</prompt>
</if>
      <prompt>
        You said <value expr="guess" />. Your brain is enormous.
      </prompt>
    </filled>
</form>
</vxml>
MattHenry
9/2/2009 4:23 PM (EDT)

Hello Jeremy,


Have you seen our <mark> tutorial yet, by chance? I suspect that this might well answer your questions in full:

http://www.vxml.org/t_21.6.htm

In context to your specific question of determining whether or not a user barged-in on a prompt, simply check how long the prompt is, and the validate the marktime shadow variable against this value to determine whether or not a bargein occurred.


Cheers!

~Matthew henry

login



© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site