developer_guide:voicexml_references:elements:param

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer_guide:voicexml_references:elements:param [2015/10/27 21:41] (current)
borja created
Line 1: Line 1:
 +====== < param > ======
  
 +===== Description =====
 +
 +The <param> element specifies values that are passed into the <object> or in <subdialog>. When <param> is contained in a <subdialog> element, the values specified are used to initialize <var> declarations in the subdialog that is invoked.  The initialization takes precedence over the expr attribute in <var>.
 +
 +===== Syntax =====
 +
 +<code>
 +<param
 +name="String"
 +value="String"
 +expr="ECMAScript_Expression"
 +valuetype="data" | "ref"
 +type="MIME_type"/>
 +</code>
 +
 +===== Attributes =====
 +
 +|name|The name attribute is the name associated with the parameter. This attribute is required.|
 +|value|The value attribute is the string value of the parameter. This attribute is required and either value or expr is required.|
 +|expr|The expr attribute is an expression that yields the parameter value.  This attribute is required and either value or expr is required.|
 +|valuetype|The valuetype attribute indicates the reference type of the value.  This attribute is not used for <subdialog> This attribute is optional and defaults to data. \\ * data – the value is actual data. \\ * ref – the value referenced by a URI.|
 +|type|The type attribute is the media type of the result provided by a URI if the valuetype is ref.  This is only relevant for the uses of <param> in the <object> element.  This attribute is optional.|
 +
 +===== Parents =====
 +
 +<code>
 +<object>, <subdialog>
 +</code>
 +
 +===== Children =====
 +
 +<code>
 +None.
 +</code>
 +
 +===== Extensions =====
 +
 +<code>
 +None.
 +</code>
 +
 +===== Limitations/Restrictions =====
 +
 +<code>
 +None.
 +</code>
 +
 +===== Example Code =====
 +
 +This represents a document that calls the subdialog:
 +<code>
 +<?xml version="1.0"?>
 +<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 + <form>
 +  <subdialog name="result" src="subdialog.vxml">
 +   <param name="birthday" expr="'2000-02-10'"/>
 +   <param name="age" value="100"/>
 +   <filled>
 +    <submit next="process.vxml"/>
 +   </filled>
 +  </subdialog>
 + </form>
 +</vxml>
 +</code>
 +
 +This represents a document containing the subdialog:
 +<code>
 +<?xml version="1.0"?>
 +<?xml version="1.0"?>
 +<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 + <form id="getdriverslicense">
 +  <var name="birthday"/>
 +  <var name="age"/>
 +  <block>
 +   <prompt>
 +    Hello, your birthday is <value expr="birthday"/>
 +    and you are <value expr="age"/> years old.
 +   </prompt>
 +   <return/>
 +   </block>
 + </form>
 +</vxml>
 +</code>
  • developer_guide/voicexml_references/elements/param.txt
  • Last modified: 2015/10/27 21:41
  • by borja