CallXML 2.0 Development Guide Home  |  Frameset Home

This documentation is for CallXML 2, which has been superceded by CallXML 3. The CallXML 2 language is not being updated any longer. CallXML 3, however, has many new features and is actively being enhanced. If you're writing a new CallXML application, you should use CallXML 3. Click here for the CallXML 3.0 documentation.

<goto>  element


This element can either:
Leap to another block of CallXML actions in the current file, by specifying value="#blocklabel", or
Perform an HTTP(S)/FTP to fetch a new CallXML document, by specifying value="url"

The rule for goto is that you can go to:

When used to fetch a new CallXML document, the submit attribute can be used to pass CallXML browser variables with the HTTP(S)/FTP operation used to request the new document.


usage

<goto cache="(yes|no)" method="(GET|POST|BIN|ASC)" submit="(variable name)" value="string - URI">


attributes

cache Data Type: (yes|no) Default: none - attribute is optional
Allows manual override over the caching mechanism. If this attribute is empty the default system caching is used. "yes" should force the system to use the cache all the time, "no" means that no cache should be used at all.
method Data Type: (GET|POST|BIN|ASC) Default: none - attribute is optional
The method attribute specifies the HTTP method to use when sending the request. Allowable values for the method attribute are:
  • "get" for HTTP GET
  • "post" for HTTP POST
  • "bin" for FTP binary transport
  • "asc" for FTP ASCII transport

  • Any other values defined for this attribute will result in a fatal error. If no method is specified, then it will always default to 'GET'.
submit Data Type: (variable name) Default: none - attribute is optional
List of variables to submit to the called URL/URI can be "all" or "*" for everything, or a comma delimited list of variables to submit:

submit = "Variable1, Variable2, Variable3, Variable5, Variable9"

Note that you can also specify "nothing" if no variables are to be submitted. If non-existant variable names are specified a fatal error will result. Also, if "all" or "*" is specified, no other variable names should be listed with it.
value Data Type: string - URI Default: none - attribute is required
Either a full URL (http://MyServer.com/MyDocument.xml) or a local URI pointing to a <block> label in the same CallXML file (e.g., #main_menu).

Supported URL formats include:
  • http://    Read data
  • https://  Read data (over a secure connection)
  • ftp://      Read data
An empty or invalid value will result in a fatal error. Invalid values are:
  • value="[optional url]#"
  • value="[optional url]#foo", and "foo" does not exist as a label in the document
Domain names can contain port numbers and login information, for instance:

value="ftp://me:door@ftp.me.com:2345/myapp/start.xml"



possible events

onerror type="document" Document was unable to be fetched for all the reasons web servers are unavailable
onerror type="execution" Indicates that a child session specified in the <run> tag points to an invalid URI.




code samples

<Goto value>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block label="B1">
    <text>
      Going places is always fun. Lets go to another block.
    </text>
    <goto value="#B3"/>
  </block>

  <block label="B2">
    <text>
      Thats right. this block will be skipped entirely.
    </text>
  </block>

  <block label="B3">
    <text>
      Whee. We are now in block label B 3.
    </text>
  </block>

</callxml>



<Goto cache - submit - method<
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block label="B1">

    <assign var="Var_1" value="Kubrick"/>
    <text>
      Lets go to an entirely separate page.
      While we are at it, lets send our variable along
      for the ride as well.
    </text>

    <goto value="Goto_Target.xml" submit="Var_1" cache="yes" method="get"/>

  </block>
</callxml>



<Goto_Target.xml>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block label="B1">
    <text>     
      Hey, we made it to our second document.
      And our variable, with a value of $Var_1; made it, too!
    </text>
  </block>
</callxml>



additional links

none


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

login



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