legacy:vxi_developer_guide:voicexml_references:elements:param

< param >

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>.

<param
name="String"
value="String"
expr="ECMAScript_Expression"
valuetype="data" | "ref"
type="MIME_type"/>
nameThe name attribute is the name associated with the parameter. This attribute is required.
valueThe value attribute is the string value of the parameter. This attribute is required and either value or expr is required.
exprThe expr attribute is an expression that yields the parameter value. This attribute is required and either value or expr is required.
valuetypeThe 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.
typeThe 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.
<object>, <subdialog>
None.
None.
None.

This represents a document that calls the subdialog:

<?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>

This represents a document containing the subdialog:

<?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>
  • legacy/vxi_developer_guide/voicexml_references/elements/param.txt
  • Last modified: 2017/07/28 23:53
  • by javier