Appendix G. HTML table format specification

STAF GUI provides HTML table format for responses, in addition to STAF default, verbose and raw. This format is converted from STAF raw. Therefore, the response should be in raw format.

Every conversion of a raw format is into a table format. STAF V3 User's Guide defines the raw format as structured data. Conversion from any type of structured data occurs in a table form.

In the following examples, we compare the table format with STAF default. For brevity, response headers have been left out from the table formats. Example requests are taken from the STAF V3 User's Guide.

Example G.1. Simple list

If the response is a simple list, then a single column table will be generated.

C:\>STAF LOCAL FS LIST DIRECTORY C:\STAF
Response
--------
bin
codepage
data
docs
include
install.properties
lib
LICENSE.htm
NOTICES.htm
samples
services
STAFEnv.bat
STAFInstall.log
startSTAFProc.bat
startSTAFProc.ico
Uninstall_STAF

Table G.1. Simple list table
bin
codepage
data
docs
include
install.properties
lib
LICENSE.htm
NOTICES.htm
samples
services
STAFEnv.bat
STAFInstall.log
startSTAFProc.bat
startSTAFProc.ico
Uninstall_STAF

Example G.2. Simple map

If the response is a simple map, then a two column table will be generated.

C:\>STAF LOCAL MONITOR LIST SETTINGS
Response
--------
Max Record Size    : 1024
Resolve Message    : Disabled
Resolve Message Var: Disabled
    
Table G.2. Simple map table
Max Record Size1024
Resolve MessageDisabled
Resolve Message VarDisabled

Example G.3. List of map

If the response is a list of map, then a multi-column table with header will be generated.

[bash@host dir]$ STAF local handle list handles
Response
--------
Handle Handle Name                     State      Last Used Date-Time
------ ------------------------------- ---------- -------------------
1      STAF_Process                    InProcess  20110409-07:34:48
2      STAF/Service/STAFServiceLoader1 InProcess  20110409-07:34:48
3      STAF/Service/MONITOR            InProcess  20110409-07:34:48
4      STAF/Service/LOG                InProcess  20110409-07:34:48
5      STAF/Service/RESPOOL            InProcess  20110409-07:34:48
6      STAF/Service/ZIP                InProcess  20110409-07:34:48
7      STAF/Client                     Registered 20110415-22:00:00
    
Table G.3. List of map table
HandleHandle NameStateLast Used Date-Time
1STAF_ProcessInProcess20110409-07:34:48
2STAF/Service/STAFServiceLoader1InProcess20110409-07:34:48
3STAF/Service/MONITORInProcess20110409-07:34:48
4STAF/Service/LOGInProcess20110409-07:34:48
5STAF/Service/RESPOOLInProcess20110409-07:34:48
6STAF/Service/ZIPInProcess20110409-07:34:48
12STAF/ClientRegistered20110415-22:08:02

Example G.4. Complex

If the response is more complex, then a two column table will be generated. If one data type is included in another, the first column of the data, the one that is included, will be indented. The amount of indentation is proportional to the inclusion hierarchy. If the value of a map is not simple, then the name of that map spans both columns and the values come after the name column. A square bracket delimits a list to differentiate it from a map. Each item of the list is separated by an empty line.

C:\>STAF LOCAL SEM QUERY EVENT Test
Response
--------
{
  State      : Reset
  Last Posted: {
    Machine    : IBM-7E43361B084
    Handle Name: STAF/Client
    Handle     : 154
    User       : none://anonymous
    Endpoint   : local://local
    Date-Time  : 20110415-17:00:52
  }
  Last Reset : {
    Machine    : IBM-7E43361B084
    Handle Name: STAF/Client
    Handle     : 154
    User       : none://anonymous
    Endpoint   : local://local
    Date-Time  : 20110415-17:00:52
  }
  Waiters    : [
    {
      Machine    : IBM-7E43361B084
      Handle Name: STAF/Client
      Handle     : 164
      User       : none://anonymous
      Endpoint   : local://local
      Date-Time  : 20110415-17:12:09
    }
  ]
}
    

Table G.4. Complex table
StateReset
Last Posted
  MachineIBM-7E43361B084
  Handle NameSTAF/Client
  Handle154
  Usernone://anonymous
  Endpointlocal://local
  Date-Time20110415-17:00:52
Last Reset
  MachineIBM-7E43361B084
  Handle NameSTAF/Client
  Handle154
  Usernone://anonymous
  Endpointlocal://local
  Date-Time20110415-17:00:52
Waiters
  [
    MachineIBM-7E43361B084
    Handle NameSTAF/Client
    Handle164
    Usernone://anonymous
    Endpointlocal://local
    Date-Time20110415-17:12:09
  ]