Show TOC

Examples of Generated Source CodeLocate this document in the navigation structure

Use

Some source code examples of generated XML pages are listed below. They are intended only to help consolidate understanding of the generated templates and are not suitable as a basis for programming.

Generated Start Dialog with Web AS Error Message:

<vxml:form id="sayOnPageLoad">
<vxml:block>
<vxml:prompt>Nachricht erhalten: Füllen Sie alle Mussfelder aus
</vxml:prompt>
</vxml:block>
</vxml:form>
            

Speech output when displaying the screen in a speech-enabled browser:

BROWSER:

Message received: Complete all required fields.

Generated Command Dialog:

<vxml:form id="sayCommand">
<vxml:property name="timeout" value="5s"/>
<vxml:field name="command">
<vxml:grammar><![CDATA[
#JSGF V1.0 iso-8859-1 DE;
grammar okcode;
public <okcode> = Neu | Zurück | Start | Enter |
Abmelden; ]]>
</vxml:grammar>
<vxml:prompt>Bitte Kommando angeben</vxml:prompt>
<vxml:catch event="noinput nomatch help">
Kommando nicht verstanden. Verfügbare Kommandos sind: Neu Zurück
Start Enter Abmelden.
</vxml:catch>
</vxml:field>
<vxml:filled>Ausgewähltes Kommando: <value expr="command"/>
<vxml:assign name="VoiceOkCode" expr="command"/>
</vxml:filled>
</vxml:form>

            

The two OK code values, "Enter" and "Log Off" are shown in italics in this example to emphasize that these values do not come from pushbutton labels, but rather are added automatically during the generation process. On the associated screen, therefore, only the buttons "New", "Back", and "Start" are displayed.

In the browser, this dialog would be displayed as follows:

BROWSER:

Enter command

USER:

Um

BROWSER:

Command not understood. Available commands are: New Back Start Log Off.

USER:

Log off

BROWSER:

Selected command: Log off

Generated Input Dialog:

<vxml:form id="VRFunc_itstestmobart-artnummer[1]">
<vxml:property name="timeout" value="5s"/> /* Property Timeout */
<vxml:field name="myfield">
<vxml:grammar><![CDATA[
#JSGF V1.0 iso-8859-1 DE;
grammar default;
public <default> = Weiter | Kommando; ]]>
</vxml:grammar>
<vxml:grammar><![CDATA[
#JSGF V1.0 iso-8859-1 DE;
grammar mygrammar;
<mygrammar> = 0 | 1 | 2 | 3 | 4 ; ]]> /* Property
Grammar */
</vxml:grammar> /* Property
PromptText */
<vxml:prompt>Bitte geben Sie eine Artikelnummer an</vxml:prompt>
<vxml:catch event="nomatch noinput help">
Geben Sie eine Nummer zwischen 1 und 4 an. /* Property
HelpText */
</vxml:catch>
</vxml:field>
<vxml:filled>Ihre Eingabe <value expr="myfield"/> /* Property FilledText
*/
<vxml:if cond="myfield == 'Kommando' ">
<vxml:var name="clicked"
expr="document.mobileform.elements['~OkCode'].click()"/>
<vxml:elseif cond="myfield == 'Weiter'"/>
<vxml:assign name="myfield" expr="''"/>
<vxml:else/>
< vxml:assign
name="document.mobileform.elements['itstestmobart-artnummer[1]'].value"
expr="myfield"/>
</vxml:if>
</vxml:filled>
</vxml:form>
            

In the browser, this dialog would be displayed as follows:

BROWSER:

Specify an article number

USER:

um

BROWSER:

Specify a number between 1 and 4.

USER:

1

BROWSER:

Your input 1