<property>
Sets properties of the VoiceXML interpreter platform. You can set properties either by specifying them explicitly (using the name and value attributes) or by specifying a context file (using the src/srcexpr attribute). See VoiceXML properties for details.
Attributes
This section describes the attributes you can set for this element.
The <property> element supports the set of properties described in the VoiceXML Specification, Version 2.0 as well as Nuance-specific properties. See VoiceXML properties for details.
Note: If you specify a context file using either the src or srcexpr attribute, you cannot also specify the name and value attributes. Similarly, if you specify the name and value attributes, you cannot specify a context file. Note that src and srcexpr are not valid <property> attributes within a context file.
Name |
Data type |
Default |
---|---|---|
expr (Nuance extension) |
CDATA |
optional One and only one of expr, src, srcexpr, or value must be specified or an error.badfetch error is thrown. |
NMTOKEN |
optional |
|
src (Nuance extension) |
CDATA |
optional |
srcexpr (Nuance extension) |
CDATA |
optional |
CDATA |
optional |
expr
Is a Nuance extension specifying an ECMAScript expression evaluating to the value assigned to the property. Only one of expr, src, srcexpr, or value may be specified.
name
Specifies the name of the property to be activated. Note that all runtime settable Voice Platform service properties are available using the <property> element as follows:
name="nuance.core.NUANCEPROPERTYNAME"
src
Is a Nuance extension that specifies the URI of the context file.
Note: Only one of the src or srcexpr attributes may be specified when using a context file. Only one of expr, src, srcexpr, or value may be specified.
srcexpr
Is a Nuance extension that specifies an ECMAScript expression that evaluates to the URI of the context file. Similar to the src attribute.
Note: Only one of the src or srcexpr attributes may be specified when using a context file. Only one of expr, src, srcexpr, or value may be specified overall.
value
Specifies the value assigned to a service property. Only one of expr, src, srcexpr, or value may be specified.
Children
None.
Parents
Sample code
The following example shows how to set properties implicitly using the name and value attributes.
<property name="timeout" value="10"/>
<form>
<field name="getphone"> What is your phone number?
<grammar src="../grammars/getphone.grxml"/>
<property name="timeout" value="6"/>
<!-- This field has a timeout of 6 seconds ->
</field>
<field name="getssn"> What is your social security number?
<grammar src="../grammars/getssn.grxml"/>
<!-- This field has a timeout of 10 seconds ->
</field>
<filled>
<submit next="/cgi-bin/enroll.cgi" method="post"
namelist="getphone getssn"/>
</filled>
</form>
The following example shows how to set properties using a context file.
<field name="destination">
<property src="../context/context.ctx#Account_Balance"/>
</field>