Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

SGMLGetParameterValue Function

Overview

The SGMLGetParameterValue function returns a parameter as a formatted dword value (PVALUE). The attribute or CSS property can be specified as a string or as a token.

Syntax/Parameters

Syntax

PVALUE = SGMLGetParameterValue ( handle hSGML, TOKEN token | string property );

Parameters

hSGML

A handle to an SGML Object.

token

An optional TOKEN (dword) as a token value for an attribute or CSS property. The token must be defined in the DTD. Or,

property

An optional string specifying a text version of the attribute or CSS property. The property is tested as an attribute and then as a CSS property name. If not found in the DTD, an error is returned. Either the token or property parameter must be provided.

Return Value

A PVALUE (dword) containing the value for the specified attribute/property or 0x00000000 on error. Because a value can legitimately be zero, the GetLastError or IsError function must be used to determine if an error occurs.

If the property name cannot be translated, the value 0x1002 will be ORed bitwise with the error code.

Remarks

An element must be selected in the SGML Object to have any parameters loaded.

Certain types that store data on the heap (ie., strings or CDATA) will return a pvalue type with a heap index.

For HTML, all inline CSS styles parameters are automatically loaded and processed. The ‘STYLE’ attribute is not available for direct reading.

When specifying a CSS property name, adding the prefix ‘+’ will force the name to be translated as only CSS. There are some CSS and HTML attributes with the same name such as ‘color’.

The SGMLGetParameterFlags function can be used to retrieve additional properties about the parameter.

Related Functions

Platform Support

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

Legato IDE, Legato Basic