Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6l

Application v 6.6b

  

 

Chapter Eleven — SGML Functions (continued)

HTMLTableMap Function

Overview

The HTMLTableMap function maps the content of an HTML table to allow access to the content and layout of the table.

Syntax/Parameters

Syntax

handle = HTMLTableMap ( string data | handle hObject, [int pos] | [int x, int y] );

Parameters

data

A string containing HTML to map. Or,

hObject

A handle to an SGML, Mapped Text or Edit Object.

pos

If data is provided, an optional int specifying the starting position in characters of the table.

x   y

Option int values specifying the starting position of the <TABLE> tag. If omitted, the table is assumed to start at 0,0 or the beginning of the file. If the data parameter is provided, this is a coordinate mapped position based on the line endings within the information contained in the string.

Return Value

Returns a handle to HTML Table Map Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve a formatted error code. The returned handle must be closed using the CloseHandle function.

On success, the last error will return any coding error information bits. See Remarks.

Remarks

When string data is provided, the HTMLTableWrite function will not return data to the source string.

As the table is mapped, general errors are collected and returned in the form of bits that can be retrieved using the GetLastError function, These are as follow:

  Definition   Bitwise   Description  
  Tagging Order Errors           
    MAP_ERROR_ROW_NEST   0x00000001   Row Nesting Error  
    MAP_ERROR_TABLE_CLOSE   0x00000002   Failure to Close Table  
  Tagging Content Errors           
    MAP_ERROR_IN_CELL   0x00000010   There was as Error in a Cell  
    MAP_ERROR_IN_ROW   0x00000020   There was as Error in a Row  
    MAP_ERROR_IN_COL   0x00000040   There was as Error in COL Groups  
  Text Errors           
    MAP_ERROR_PCDATA_CONTEXT   0x00000100   PC Data Out Of Context  
    MAP_ERROR_ELEMENT_CONTEXT   0x00000200   Element Out Of Context  
  Span Errors           
    MAP_ERROR_ROW_SPAN_OUTSIDE   0x00001000   Row Spanned Outside Table  

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic