| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
| enctype | Data Type: (ECMAScript Expression) | Default: application/x-www-form-urlencoded |
| enctype specifies an ECMAScript string expression that denotes the media encoding type of the submitted document, (when the POST method is used). The only allowable value of this attribute is 'application/x-www-form-urlencoded', which specifies that the indicates that the variables in the namelist attribute must be url-encoded. | ||
| maxage | Data Type: (ECMAScript Expression) | Default: Optional |
| The maxage and maxstale attributes specify the maximum acceptable staleness, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes. | ||
| maxstale | Data Type: (ECMAScript Expression) | Default: Optional |
| The maxage and maxstale attributes specify the maximum acceptable staleness, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes. | ||
| method | Data Type: (GET|POST) | Default: Optional (GET) |
| The method attribute specifies the HTTP method to use when sending the request. If unspecified, then the value of ‘GET’, (default) is assumed, unless the submission of multipart/form-data is encountered, in which case the implied method will be ‘POST’. | ||
| namelist | Data Type: STRING | Default: none - attribute is optional |
| The namelist attribute denotes the space-separated list of variable names to be sent along with the fetch. The variables will then be available as a variable/value pair in the resultant URI querystring that is sent to the server. | ||
| next | Data Type: (ECMAScript Expression) | Default: none - attribute is required |
| This attribute simply indicates the URI of the XML document to be fetched. | ||
| sessionid | Data Type: (ECMAScript Expression) | Default: none - attribute is optional |
| The sessionid attribute is an expression resolving to a platform-defined unique identifier that denotes the newly-instantiated thread of control. | ||
| timeout | Data Type: (ECMAScript Expression) | Default: Optional |
| The timeout attribute specifies the amount of time to allow the fetch attempt to be made, specified by the next attribute value. If the new CCXML session is unable to fetch the initial document within the timeout interval denoted, then an error.fetch event will be thrown. | ||
| <?xml version="1.0" encoding="UTF-8"?> <ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml"> <eventprocessor> <transition event="ccxml.loaded"> <log expr="'***** CCXML.LOADED *****'"/> <createccxml next="'CCXML_child.xml'"/> </transition> <transition event="error.createccxml"> <log expr="'***** ERROR.CREATECCXML *****'"/> </transition> <transition event="ccxml.created"> <log expr="'***** CHILD SESSION STARTED: ' + event$.sessionid"/> <log expr="'***** CCXML.CREATED *****'"/> <exit/> </transition> <transition event="ccxml.exit"> <log expr="'***** CHILD SESSION HAS EXITED *****'"/> <exit/> </transition> </eventprocessor> </ccxml> |
| <?xml version="1.0" encoding="UTF-8"?> <ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml"> <eventprocessor> <transition event="ccxml.loaded"> <log expr="'*** CCXML.LOADED:CHILD SESSION ***'"/> </transition> <transition event="ccxml.kill"> <log expr="'*** CCXML.KILL:CHILD SESSION ***'"/> </transition> <transition event="connection.failed"> <log expr="'*** CONNECTION.FAILED:CHILD SESSION ***'"/> <exit/> </transition> <transition event="connection.disconnected"> <log expr="'*** CONNECTION.DISCONNECTED:CHILD SESSION ***'"/> <exit/> </transition> <transition event="connection.connected"> <log expr="'*** CONNECTION.CONNECTED:CHILD SESSION ***'"/> </transition> <transition event="connection.alerting"> <accept/> <log expr="'*** CONNECTION.ALERTING:CHILD SESSION ***'"/> </transition> </eventprocessor> </ccxml> |
| ANNOTATIONS: EXISTING POSTS |
chaubkit
|
|
| Could you please help: when the caller calls to the platform, which does the connectionid belong to? parent or child session? what is the workflow? | |
voxeojeff
|
|
| Hello,
Per the W3C specification, the connectionid will stay with the parent session: "The new CCXML session has no relation to its creator once spawned, and has a wholly separate lifetime and address space. Execution returns from the <createccxml> element immediately, and the CCXML interpreter can continue on while the new CCXML session is established and loads its initial document. If the new session is successfully established or a failure occurs an event is generated and is delivered to the session that executed the <createccxml> element." Hope this helps clarify, Jeff |
|
chaubkit
|
|
| Hi jeff,
Thanks for your soon response, but I wonder that in the code samples above, how can the CCXML_child.xml excute while the connection belongs to the parent session. Do we need to send an event from parent session to child session to kick the child session excute? Thanks a lot. Chau - dhchau@tma.com.vn |
|
voxeojeff
|
|
| Hello Chau,
The connection should not go to the child session, per the specification. It looks like you might be wanting to use something such as <fetch> or <goto>, or possibly even <move>. The <move> element will move the connection to the new child session, but this element only works in Prophecy 8. Can you clarify the intended behavior you are looking for here? Standing by, Jeff |
|
chaubkit
|
|
| Hi Jeff,
I have some confusion about the method "post" of createccxml tag. I do not know how to use it although I tried to skim through its definition. Could you please give me an example of the method "post" for createccxml tag? And please let me know which attributes of createccxml tag are needed when using the method "post". Thanks, Chau |
|
mikethompson
|
|
| Chau,
Using the POST method is simply a way to pass variables to the new script *without* using a querystring. The HTML specifications technically define the difference between "GET" and "POST" so that the former means form data is to be encoded (by a browser) into a URL, while the latter means the form data is to appear within a message body. Whether you fetch the document via POST or GET, your content should be the same. It is just a difference in the way the data is passed if you're using namelist. If you submit some variables in your namelist via POST, then the server-side script on the receiving end needs to be expecting POST so it can properly pull the variables from the message body. If the script is expecting GET, then it will not be able to find the variables, as it will be checking the querystring. I hope this helps clarify, and please let me know if you require further explanation. Best, Mike Thompson Voxeo Corporation |
| login |