Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

11.5 HTML Header Management

11.5.1 Overview

A series of functions are provided to allow for easy access and modification of the header section of an HTML file or document.

The principal areas of access are: the DTD, meta information, CSS information, scripts, links and the title of the document.

These functions are presently in beta release. Functions marked with ‡ are shown for a future release. In addition, other functions are planned.

11.5.2 Operation

To use the header functions, a header must be “mapped” by creating an HTML Header Object and specifying a file or a handle to a file like object such as a Mapped Text Object. The HTMLHeaderOpen function maps the data and returns a handle. The CloseHandle function is used to release the object. Closing the handle does not apply any changes to the header.

The header components can then be inspected and changed. Once ready to commit the HTMLHeaderWrite function is called to write a complete header or each section can be updated individually.

11.5.3 Functions

Control

HTMLHeaderOpen — Opens an object’s HTML header or opens a file and maps the header.

HTMLHeaderWrite — Writes revised header to the associated object or file.

Components

HTMLHeaderGetComponents — Returns the component flags for the header.

HTMLHeaderHasDTD — Tests whether the document has an HTML DTD specified.

HTMLHeaderHasHeader — Tests whether the document has an HTML header.

HTMLHeaderHasLinkData — Tests whether the document has HTML link data.

HTMLHeaderHasMetaData — Tests whether the document has HTML meta data.

HTMLHeaderHasScriptData — Tests whether the document header contains a script.

HTMLHeaderHasStyleData — Tests whether the document has style links or data.

HTMLHeaderHasTitle — Tests whether the document has an HTML title.

DTD

HTMLHeaderSetDTD — Sets the DTD for the file.

HTMLHeaderWriteDTD — Writes the DTD component of the header only.

Link Data

HTMLLinkAddItem — Adds a link item to the header.

HTMLLinkClear — Clears the existing meta table (deletes the existing items).

HTMLLinkDeleteItem — Deletes a specified item from the meta list.

HTMLLinkEnumerate — Enumerates all link properties as a single table.

HTMLLinkGetItem — Enumerates the link properties for a specific index item.

HTMLLinkGetItemCount — Returns a count of the link items in the current table.

HTMLLinkSetItem — Sets/replaces link entry data at a specific index position.

HTMLLinkWrite — Writes the link data to the associated object or file.

Meta Data

HTMLMetaAddItem — Adds a meta item to the header.

HTMLMetaClear — Clears the existing meta table (deletes the existing items).

HTMLMetaDeleteItem — Deletes a specified item from the meta list.

HTMLMetaEnumerate — Enumerates all meta properties as a single table.

HTMLMetaGetItem — Enumerates the properties for a specific index item.

HTMLMetaGetItemCount — Returns a count of the meta items in the current table.

HTMLMetaSetItem — Sets/replaces meta data at a specific index position.

HTMLMetaWrite — Writes the meta data to the associated object or file.

Title

HTMLHeaderGetTitle — Returns the document/page title, if specified.

HTMLHeaderSetTitle — Sets the title for the file.

HTMLHeaderWriteTitle — Writes the title component of the header only.

Other

HTMLHeaderGetBase — Returns the base URL, if specified.

HTMLHeaderSetBase — Sets (or clears) the base URL for the file.

HTMLHeaderWriteBase — Writes the base URL component of the header only.