3.51. subdialog

Element typesubdialog
Attributescond | enctype | expr | fetchaudio | fetchhint | fetchtimeout | maxage (2.0) | maxstale (2.0) | method | name | namelist | src | srcexpr
Parentsform
ChildrenPCDATA | audio | catch | enumerate | error | filled | help | noinput | nomatch | param | prompt | property | value
DescriptionA form item that calls another form. Upon completion of that form, this form item is considered filled and its containing form continues according to the Form Interpretation Algorithm.

DTD

<!ELEMENT subdialog        
  (%audio; | %event.handler; | filled | param | prompt | property)* >
<!ATTLIST subdialog
  %item.attrs;
  src            %uri;       #REQUIRED
  srcexpr        %expression
  %cache.attrs;
  fetchaudio     %uri;       #IMPLIED
  %submit.attrs; >

Language model



Attributes

cond : expression = true

A guard condition associated with this form item, written as an ECMAScript expression. This expression must evaluate to true for the Form Interpretation Algorithm to visit this form item.

enctype : CDATA

The MIME encoding type for the document containing the subdialog.

expr : expression = undefined

An ECMAScript expression defining an initial value for this form item. The Form Interpretation Algorithm will visit subdialog only if the expression evaluates to undefined.

fetchaudio : uri

The URI of the audio to play while fetching the document containing the subdialog.

fetchhint : (prefetch | safe)

Indicates whether the interpreter may prefetch the destination document specified by this element's next attribute. A value of prefetch indicates the resource may be retrieved at the time the containing VoiceXML document is retrieved. A value of safe indicates that the resource specified by this element should not be prefetched, but should instead be retrieved at the time that the interpreter executes this element.

fetchtimeout : duration

The interval to wait for the content to be returned before throwing an error.badfetch event. If this attribute is not specified, the interpreter derives a value from the most locally scoped fetchtimeout property.

maxage : integer

Indicates the maximum allowable age of the fetched document in seconds. If the cached copy is older than the specified maxage, a new copy will be fetched when the interpreter executes this element. If this attribute is not specified, the interpreter derives a value from the most locally scoped maxage property. If no maxstale attribute is defined and it is impossible to fetch a new copy on the content the interpreter will throw an error.badfetch instead of using stale content.

maxstale : integer

Indicates that the interpreter may use stale content for this element as long as its age is no older than maxage plus the value of maxstale in seconds. If this attribute is not specified, the interpreter derives a value from the most locally scoped maxstale property.

method : (post | get) = get

Indicates whether the variables specified in the namelist attribute are passed to the server via HTTP GET or HTTP POST.

name : field.name

The name associated with this form item. This name can be referred to as a variable whose members correspond to the values returned from the subdialog.

namelist : field.names

A list of variables to submit, using HTTP, to the subdialog. Only valid when the subdialog is in another document.

src : uri

URI of the subdialog.

srcexpr : expression = undefined

An ECMAScript expression defining the src URI for this subdialog element. One and only one of srcexpr and src must be defined.

Children

param elements

These declare parameters to be passed to the subdialog.

prompt elements and audible content

To be rendered upon visiting this subdialog element.

filled elements

To be executed once the subdialog returns with return values (as opposed to an event).

event.handler elements

These remain active while this subdialog is being executed.

property elements

These set system properties for the duration of the subdialog call.

Examples

Example 3-62. A dialog that calls a subdialog
<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="1.0">
  <form>
    <subdialog name="result" src="#returnevent">
      <prompt>Calling subdialog that returns an event, 
        passing a parameter.</prompt>
      <param name="param" expr="'parameter'"/>
      <catch event="returnevent.event">
        Received return event from subdialog, test complete.
        <exit/>
      </catch>
    </subdialog>
  </form>
  <form id="returnevent">
    <var name="param"/>
    <block>
      <prompt>In subdialog, received <value expr="param"/>, 
        returning event.</prompt>
      <return event="returnevent.event"/>
    </block>
  </form>
</vxml>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.205.165