Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

HTMLGetNames Function

Overview

The HTMLGetNames scans an HTML file and returns a table of named position as declared by the ID and NAME attributes.

Syntax/Parameters

Syntax

string [][] = HTMLGetNames ( handle hObject | string url );

Parameters

hObject

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

url

A string specifying an HTML file.

Return Value

A string table containing a row entry for every reference within the file or an empty array on failure. Use the GetLastError function to retrieve a formatted error code. Scanning a file with no references will result in an ERROR_EOD formatted error code.

Remarks

The function will scan the HTML content for names defined using the ID or NAME attributes. If a context objects is provided, the current table contexts are returned.

A table with the following column keys are returned:

  Key Name   Description  
  Name   The Name as is appears in the source code.  
  x   Decimal zero-based x position of the start of the defining tag.  
  y   Decimal zero-based y position of the start of the defining tag.  
  ElementToken   Hexadecimal version of the element token.  
  Element   String version of the element, as translated by the DTD.  
  AttributeToken   Hexadecimal version of the attribute token.  
  Attribute   String version of the attribute, as translated by the DTD.  
  c_flags   Hexadecimal version of the caller flags.  

 

The META element is ignored when processing names.

Note that the element and attribute text case is dependent on the select DTD. For example, HTML 5 and XHTML have lower case values.

The returned list contains all references from any tag. It is up to the caller to sort through the references to determine which are relevant to the caller’s purpose.

Related Functions

Platform Support

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

Legato IDE, Legato Basic