Plum DEV Documentation
voicexml:tags:data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
voicexml:tags:data [2017/04/05 09:58]
admin
voicexml:tags:data [2017/08/04 09:59]
admin
Line 5: Line 5:
 ====Attributes==== ====Attributes====
 | src |  The URI specifying the location of the XML data to retrieve.| | src |  The URI specifying the location of the XML data to retrieve.|
-| name | The name of the variable that exposes the DOM. |+| name | The name of the variable that exposes the DOM. This variable will be a Document Object Model (DOM) Level 2 Document Object [[https://​www.w3.org/​TR/​DOM-Level-2-Core/​]] ​|
 | srcexpr | Like src, except that the URI is dynamically determined by evaluating the given ECMAScript expression when the data needs to be fetched. If srcexpr cannot be evaluated, an error.semantic event is thrown. | | srcexpr | Like src, except that the URI is dynamically determined by evaluating the given ECMAScript expression when the data needs to be fetched. If srcexpr cannot be evaluated, an error.semantic event is thrown. |
 | method | (defaults to "​get"​) The request method: get, post, or raw. | | method | (defaults to "​get"​) The request method: get, post, or raw. |
Line 23: Line 23:
  
 Exactly one of "​src"​ and "​srcexpr"​ must be specified. Please refer to the VoiceXML 2.1 Draft for examples and detailed usage information for this tag. NOTE: When setting the "​method"​ attribute to "​post",​ the platform does a normal POST with the variables passed in the namelist encoded as "​application/​x-www-form-urlencoded"​ or "​multipart/​form-data"​. After encoding the namelist, the platform passes the data and tells the server that the data is encoded with whatever format it used to encode. However, when setting the "​method"​ attribute to "​raw",​ the "​raw"​ type is still a POST request, but does two things to change the default behavior, allowing control over both the data and the encoding type reported to the server: 1) Rather than encoding the namelist to create the "​data",​ the platform instead executes the rawexpr javascript expression and uses the result for the data. 2) It passes the encoding that was provided in the "​enctype"​ attribute as the encoding to the web server. Exactly one of "​src"​ and "​srcexpr"​ must be specified. Please refer to the VoiceXML 2.1 Draft for examples and detailed usage information for this tag. NOTE: When setting the "​method"​ attribute to "​post",​ the platform does a normal POST with the variables passed in the namelist encoded as "​application/​x-www-form-urlencoded"​ or "​multipart/​form-data"​. After encoding the namelist, the platform passes the data and tells the server that the data is encoded with whatever format it used to encode. However, when setting the "​method"​ attribute to "​raw",​ the "​raw"​ type is still a POST request, but does two things to change the default behavior, allowing control over both the data and the encoding type reported to the server: 1) Rather than encoding the namelist to create the "​data",​ the platform instead executes the rawexpr javascript expression and uses the result for the data. 2) It passes the encoding that was provided in the "​enctype"​ attribute as the encoding to the web server.
 +
 +Both headers and headersexpr adhere to standard web browser conventions for where overriding certain headers is forbidden for security purposes: [[https://​developer.mozilla.org/​en-US/​docs/​Glossary/​Forbidden_header_name]]
  
 ====XML Example==== ====XML Example====