simputer logo simputer mission simputer  
 
 
Simputer:
­ Spec
IML:
· Encoding
IML Encoding

All application data is transferred between IML applications in a simple self-extracting format called IML encoding. The underlying assumption is that all data is in the form of a simple three column table as described in Simputer, IMl and smartcards. Each cell in this table can contain an arbitrary string, including characters that may have special meaning to XML, or to the IML encoding scheme itself. The following example illustrates this coding scheme:

Name     Magic     Value
----------------------------
name      s        Manohar
address   s        CSA Department, IISc, Bangalore 560012
DOB       s  June 21 1960
Status    e567rty  Married
phone    ru87iii89 3092368
choice   t345tyu   pizza
---------------------------------

The table has six rows and 3 columns.

The IMl encoding of the above table will be a single long string as shown below.

S[6,3:4:Name1:s10:S. Manohar7:address1:s38:CSA Department, IISc, Bangalore 5600126:choice7:t345tyu5:pizza3:dob1:s12:June 21 19605:phone9:ru87iii897:30923686:status7:e567rty7:Married

The general format of the string is as follows: start with an 'S[' followed by the number of rows and the number of columns in the table, separated by a comma. The ':' (colon) is used as a separtor between the contents of each cell in the table. For example, in the encoded string above, after the initial "S[6,3:", (indicating a table with six rows and three columns) 4:Name indicates that the next 4 characters are to be read as a key, followed by a single character ('s' for secure varibale), followed by a 10 character string which is the value for the key just encounterd. (The explanation is much more complex than the encoding scheme which can be understood by a simple examination of the encoded string and the actual table. The order of the rows is not preserved in the encoding shown, which sorts the keys alphabetically)

 FAQ
  simputer
[ top ]

The Simputer Trust is a registered non-profit trust with the broad goal of harnessing the potential of Information Technology for the benefit of the weaker sections of society.

Inquiries & questions to <simputer AT csa dot iisc dot ernet> dot in.
design:corrosive

     
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
Copyright © 2000 The Simputer Trust

This page maintained by <manohar AT csa dot iisc dot ernet dot in> with scripts and support from <vinay AT csa dot iisc dot ernet dot in>


simputer