XML to Videotex Translation Commands

Given a request, the XML server manages the Videotex session and generates a response. Both request and response are XML-formatted strings. The request must be an XML invoke object. The response is a single XML object which at is simplest is just OK. All errors from within the XML server are returned as XML error objects. Any other object returned by the server is treated as a successful execution.

The XML server responds to low-level commands so the client can always determine what the current underlying page looks like. Typically, the server will be configured with page maps so that the raw page data never needs to be seen by the client.

Each command request is contained within an invoke object -- this defines the name of the command and contains the command arguments.

The response to any command may be an error -- since the Videotex session may have been lost etc. Even where not explicitly stated, an error object may be returned by a command.

The commands are grouped into the following categories:

low-level commands

session-control commands

mapped commands

service commands


Low-Level commands

The following low-level commands allow full control over the raw Videotex session. These can be necessary if the Videotex provider has changed the service and introduced new pages etc.

status

Return the status of the current session.

Arguments
none
Response
A status object.

identify

Attempt to identify the current Videotex page using the maps loaded into the XML server.

Arguments
none
Response
A page object containing no lines of data. If the page cannot be identified, the name attribute of the returned page holds the value unknown.

send

Send the supplied data through to the Videotex host. This can be sent through raw or with the addition of an underscore _ character as the field terminator.

Arguments
A data object.
Response
A ok object.

download

Fetch the raw page information -- no mapping of the page data is performed other than to turn it into a page object.

Arguments
none
Response
A page object showing the cursor position (if the cursor is on) and the lines of data on the screen.

htmlPage

Scrape the raw Videotex page information and return as HTML.

The value returned is valid HTML and XML -- data is returned within a <div> object which shows the cursor position and contains a <table> representing the raw screen.

Arguments
none
Response
A markup object.

capture

Capture an HTML representation of the current page -- particularly useful when mapping a new Videotex page since this makes it very easy to mark the locations on screen of the various fields of interest.

Arguments
A page object containing the page name and file.
Response
An ok object.

wait

Wait for the arrival of the named page or any new page.

Arguments
A event object.
Response
An ok object -- an error is returned if the timeout expires.


Session-control commands

The following commands allow control over the actual communications session as well as loading up maps etc. into the XML server.

setup

Setup the supplied information within the server -- the particular setup is defined by the supplied argument.

Arguments
One of the following types of object:
Response
An ok object.

connect

Connect the XML server to the previously configured Videotex host.

Arguments
none
Response
An ok object.

session

Return configuration information about the current session.

Arguments
none
Response
A session object.

disconnect

Disconnect the XML server from the connected Videotex host.

Arguments
none
Response
An ok object.


Mapped commands

The detail of the following commands is driven by the map currently loaded into the XML server.

upload

Upload the supplied data into the named fields on the page -- the input fields are defined by the map for the current Videotex page.

Arguments
A formData object.
Response
An ok object.

options

List the options on the current Videotex page -- many Videotex pages are simply a menu asking the user to select the desired option.

Arguments
none
Response
A collection of option objects.

chooseOption

Choose the supplied option from the Videotex page.

Arguments
An option object.
Response
An ok object.

skip

Skip over all pages which support a continue option.

Arguments
none
Response
An ok object.

submit

Submit the supplied data to the form and extract the data from the resultant page.

Arguments
A formData object.
Response
The object returns depends on the mapping defined for the current page -- if no mapping defined then an ok object is returned.

extract

Apply the page-dependent mapping for the current Videotex page and return the resultant data. If the map does not return an XML object, then an ok is returned by default.

Arguments
none
Response
The object returns depends on the mapping defined for the current page -- if no mapping defined then an ok object is returned.


Service commands

The following commands relate to a Tour Operator service -- rather than being related to control of the underlying Videotex session.

describeServices

Request the XML server to describe the services offered by the connected Videotex host.

Arguments
none
Response
A collection of service objects. object.

chooseService

Select the Videotex service from the connected host.

Arguments
A service object.
Response
An ok object.

logon

Log on to the connected Videotex service.

Arguments
A session object.
Response
An ok object.

describeActivities

Request the XML server to describe the activities available on the currently connected Videotex service.

Arguments
none
Response
A collection of activity objects. object.

chooseActivity

Select the desired activity from the Videotex service -- the Tour Operator services all provide a list of activities such as searching for late availability holidays, performing a general search and match etc.

Arguments
An activity object.
Response
An ok object.

htmlFilter

Return the HTML which defines the holiday filter for the connected service -- the HTML form field names must correspond to the names of input fields for the identified activity.

Arguments
An activity object.
Response
A markup object.

installFilter

Install the supplied filter.

Arguments
A collection of fieldData objects.
Response
An ok object.

logoff

Log off from the connected Videotex service.

Arguments
none
Response
An ok object.


Contents Current topic: videotex Related topics: Carapace Hub