Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

HTMLContextCreate Function

Overview

The HTMLContextCreate creates an HTML Context Object and optionally scans the HTML file.

Syntax/Parameters

Syntax

handle = HTMLContextCreate ( handle hObject | string url, [dword flags] );

Parameters

hObject

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

url

A string specifying an HTML file.

flags

A dword specifying what items to track as the file is scanned. If the value is zero or omitted, the content is not scanned.

Return Value

A handle to an HTML Context Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

Creating an HTML Context Object allows for multiple operation to be performed, including determining the element context at a specific location within the file.

The tables within the object are not automatically updated when the source file is altered after a scan.

The flags parameter is a bitwise value which may consist of the following values:

  SDK Definition   Bitwise   Description  
  HFS_GET_STACK_ONLY   0x00000000   No flags, loads only context stack.  
  HFS_GET_NAME_SPACE   0x00000001   Track NAME Space  
  HFS_GET_URI_REFERENCE   0x00000002   Track URI References  
  HFS_GET_CLASS   0x00000004   Track CLASS References  
  HFS_GET_OBJECTS   0x00000008   Track Object/Image Definitions  
  HFS_GET_FIELD   0x00000010   Track Marker Definitions  
  HFS_GET_FONTS   0x00010000   Track Font References  
  HFS_GET_COLORS   0x00020000   Track Color References  

 

At the end of the scan, additional information is returned in a bitwise for within the last error code.

  SDK Definition   Bitwise   Description  
  HFS_RESULT_NESTING   0x00100000   File Contains Stack/Nesting Error(s)  
  HFS_RESULT_MID_ENTITY   0x00200000   Stopped Mid Entity  
  HFS_RESULT_MID_ELEMENT   0x00400000   Stopped Mid Element  
  HFS_RESULT_NOT_VALID_POINT   0x00600000   Combine Above  

 

Note that several of the context functions will reset the last data range position of the underlying parser. If a shared SGML Object is employed, make sure the data range and scan positions are reset prior to using the parser.

Related Functions

Platform Support

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

Legato IDE, Legato Basic