Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

3.52 submit

Element type

submit

Attributes

expr | enctype | fetchaudio | fetchhint | fetchtimeout | maxage (2.0) | maxstale (2.0) | method | namelist | next

Parents

block | catch | error | filled | help | if | noinput | nomatch

Children

None.

Description

Instructs the interpreter to pass control to another form with the inclusion of the variables to be passed to the server using HTTP POST or HTTP GET.

DTD

<!ELEMENT submit EMPTY >
<!ATTLIST submit
  %cache.attrs;
  %next.attrs;
  fetchaudio     %uri; #IMPLIED
  %submit.attrs; >

Language model

Attributes

  • enctype : CDATA

    MIME encoding type of the document.

  • expr : expression

    An ECMAScript expression that yields the destination URI.

  • fetchaudio : uri

    The URI of the audio to play while fetching a document.

  • 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 : (get | post)

    Specifies the query method, GET or POST.

  • namelist : field.names

    A list of variables to submit using HTTP.

  • next : uri

    The URI to which the query is submitted.

Children

None.

Examples

Example 3-63 Passing VoiceXML variables over HTTP and transitioning to another document

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="1.0">
  <form id="testSSN">
    <block>Welcome</block>
    <field name="ssn" type="digits?minlength=9;maxlength=9">
      <prompt>For validation purposes, 
        please enter your social security number.</prompt>
      <catch event="nomatch noinput">You must enter 
        your nine digit social security number.</catch>
    </field>
    <filled>
      Validating your access using your social security number:
      <value expr="ssn"/>
      <submit next="validate.cgi" method="post" namelist="ssn"/>
    </filled>
  </form>
</vxml>
  • + Share This
  • 🔖 Save To Your Account