VoiceXML 2.1 Development GuideHome  |  Frameset Home


<value>  element

The value element can be used to insert a variable value for use as a TTS prompt.


usage
<value expr="CDATA">


attributes
exprData Type: CDATADefault: Required
The expr attribute specifies the ECMAScript expression which evaluates to a string to be rendered by the TTS engine.



shadow variables
none


parents
<audio> <block> <catch> <choice> <enumerate> <error> <field> <filled> <help> <if> <initial> <log> <menu> <nomatch> <prompt> <record> <transfer>


children
none


code samples
<Value expr> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F1">

  <var name="MyVar" expr="'Dirk Diggler'"/>
  <block>
  <prompt>
Our favorite movie star is
    <value expr="MyVar"/>.
  </prompt>
  </block>
</form>
</vxml>



additional links
W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
moshe
6/4/2004 10:41 AM (EDT)
<prompt> is also a parent of <value>

The explanation of what <value> does is wong, even though that's what the W3C spec says. <value> transforms an ECMA expression into text, and can be used where the interepreter expects text.

Examples:  Given

<var name="foo" value="'bar'"/>

In a log,

<log>The value was <value expr="foo"/></log>

prints out "The value was bar."

And in a <prompt>,

<prompt>The value was <value expr="foo"/></prompt>

The system will say "The value was bar."

login



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