CCXML Voxeo 1.0 Development GuideHome  |  Frameset Home

This documentation is for CCXML 1.0-Voxeo, which has been superceded by CCXML 1.0-W3C. The CCXML-Voxeo platform is not being updated any longer. The CCXML 1.0-W3C version, however, has many new features and is actively being enhanced. If you're writing a new CCXML application, you should use CCXML 1.0-W3C. Click here for the CCXML 1.0-W3C documentation.
<goto>  element

The <goto> element, used in conjunction with the <fetch> element, is used to transfer execution to a separate CCXML document. The <fetch> element allows for a pre-emptive fetch and parse of the target document to ensure that it is well formed and can execute before the <goto> ever executes. Execution returns from this element immediately, and the CCXML interpreter is free to continue while the execution context parses and prepares the target document for execution. If the target is fetchable, and parseable, an event 'ccxml.fetch.done' is sent, and the <goto> may now execute normally. However, if there is a problem with the target page, the event of 'error.fetch' is thrown to the invoking document.



usage
<goto fetchid="(ECMAScript Expression)">


attributes
fetchidData Type: (ECMAScript Expression)Default: none - attribute is required
This attribute indicates the ID of any document referenced in a fetch operation, which is gathered with the fetchid. A sucessful fetch completion additionally provides a property whose value is the fetch ID of the document being fetched.



parents
none


children
none


code samples
<Goto fetchid> sample
<?xml version="1.0" encoding="UTF-8" ?>
<ccxml version="1.0">

<var name="state0" expr="'init'"/>

  <eventhandler statevariable="state0">

    <transition state="'init'" event="ccxml.loaded" name="evt">
      <assign name="state0" expr="'fetching'"/>
      <fetch next="'http://myserver.com/mycool.xml'" fetchid="'fetch1'"/>
    </transition>

<!-- ******* FETCH SUCCESSFUL / GOTO NEW CCXML DOCUMENT ******* -->
    <transition  state="'fetching'" event="ccxml.fetch.done" name="evt">
      <goto fetchid="evt.fetchid"/>
    </transition>

    <transition state="'fetching'" event="error.fetch" name="evt">
      <log expr="'*** FETCH ERROR [' + evt.error + '] ***'"/>
      <exit/>
    </transition>

<!-- ******************* GENERAL EXCEPTIONS ******************** -->
    <transition event="error.*" name="evt">
      <log expr="'*** ERROR HAS OCCURED [' + evt.error + '] ***'"/>
      <exit/>
    </transition>

  </eventhandler>   
</ccxml>



additional links
W3C Specification


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



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