GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Eleven — SGML Functions (continued)
The HTML Writer Object provides a simple facility for creating HTML data in the form of a file or string. The object has the ability to create portions or a complete HTML document. The object relieves the programmer of the task of tracking and creating HTML and CSS code.
From a programmer’s perspective, the object provides that ability to easily add paragraphs and tables. In addition, straight HTML code can also be added to the result.
By default, it is assumed that raw text is being added and the text will be encoded into PCDATA (ampersands, less-than and greater-than symbols encoded). However, this can be overridden to allow straight text to be added. The HTMLSetTextMode function controls the method of adding text.
The object breaks into five basic categories: object control, HTML header and footer, paragraph (or block) operations, basic text operations and table operations.
Object control includes the creation and management of the object and writing the result to a string or a file. The HTMLCreateWriterObject function is used to create the HTML Writer Object and returns a handle that is used to later reference the object. When data set creation is complete, the HTMLWriterToFile or HTMLWriterToString function can be used to copy the data. When the object is no long needed, use the CloseHandle function to release the handle.
An HTML envelope is option. If the resulting HTML will be used as the final file, then it should normally contain the HTML wrapper, heading and any other items normally placed at the beginning of the data stream. However, if the HTML being created is to be inserted as part of the larger data set, then the wrapper is optional. Prior to adding the HTML header, the [HTMLAddStyleSheet] and HTMLSetDTD can be used to add a style sheet or to specify the underlying HTML DTD. When ready to open the HTML body, the HTMLAddHead function is called and the heading code is added to the HTML data set. Upon completion of writing the body of the data, the HTMLAddFoot is called and the ending HTML tags are added to the data set.
Paragraph functions allow the addition of basic paragraphs either as an entire chunk of text using the HTMLAddPara function or by opening the paragraph with the HTMLParaOpen function, writing data using HTMLAddText function, and then closing the paragraph with the HTMLParaClose function. The style of the paragraph can be controlled using the HTMLSetBlockClass and HTMLSetBlockStyle functions.
Table operations allow the addition of a complete table or assembly by rows and cells.
11.10.3 HTML Writer Object Functions
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.