Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6j

Application v 6.5c

  

 

Chapter ElevenSGML Functions (continued)

11.7 The HTML Element Object†

11.7.1 General

The HTML Element Object provides a platform to aggregate HTML attributes and CSS properties from multiple elements. The underlying HTML element class is used by many functions within the application’s HTML editor to change tag properties.

A lower level SGML Object is relied upon to read data. The object handle can be supplied when the HTML Element Object is created or optionally an internal SGML Object handle will be created if an SGML Object handle is not supplied. The internal handle can be later retrieved to reduce handle management.

HTML Element only aggregates supported attributes and properties — not all HTML attributes and properties are supported

[can be used to load and adjust wide areas of an HTML document

For the sake of simplicity, both HTML attributes and CSS properties shall be referred to as property or properties in this section.

11.7.2 Basic Operation

Generally an HTML Element Object is either created with an associated SGML Object or the default SGML object handle can be retrieved using the HTMLElementGetSGMLObject function. One or more HTML elements can be added by loading the first element and then merging any subsequence elements. The reason for this is that default or implied items must be counted as conflicts. So the first item might be loaded with without text-align and later items merged with text-align will result in a “mixed” condition.

HTML attributes and CSS properties may be individually access using the HTMLElementGetString or HTMLElementGetValue functions, or the entire contents of the object enumerated using the HTMLElementEnumerateItems function.

[Items can be reapplied using the HTMLElementSetItem function. Once changes have been applied to properties, HTML data can be generated using the HTMLElementApply function for a single tag or the HTMLElementWriteArea function or the result can be applied to various parsed HTML tags using the xxx function.

11.7.3 Property Values

[states: default (implied), mixed, error or some value]

[Not all items are supported, important because at an HTML editing level, those items are removed

[error processing 

11.7.4 Reading Properties

[there are two methods to add information to the HTML Element Object: (a) tag by tag where the caller manages the parsing; and (b) reading an area.

[On a tag by tag bases, the caller loads the first parsed item using the HTMLElementLoad and then applying each subsequent item using the HTMLElementMerge function.

11.7.5 Writing Properties

 

11.7.6 Functions

HTMLElementClear — Clears the HTML Element Object.

HTMLElementCreateObject — Creates an HTML Element Object.

HTMLElementGetErrorLog — Returns the log handle for tracking property errors.

HTMLElementGetSGMLObject — Returns a copy of the associated or default SGML Object.

HTMLElementGetProperties — Returns properties of an HTML Element Object.

HTMLElementEnumerateItems — Returns a list of data items within the object.

HTMLElementGetString — Gets a data item from the HTML Element Object.

HTMLElementGetValue — Gets a data item from the HTML Element Object.

HTMLElementSetItem — Sets a specified data item within an HTML Element Object.

HTMLElementSetItems — Sets a specified data item within an HTML Element Object.

HTMLElementLoad — Resets and integrates information from an SGML Object.

HTMLElementMerge — Reads and merges information from an SGML Object.

HTMLElementReadArea — Reads and integrates HTML information from an SGML Object..

HTMLElementApply — Applies the property values to the associated SGML Object.

HTMLElementWriteArea — Writes element(s) back to HTML code for an SGML Object.